Configs

[source]

LossConfig

polyaxon.libs.configs.LossConfig(module, params=None)

The LossConfig holds information needed to create a Loss.

  • Args:
    • module: str, module loss to use.
    • params: dict, extra information to pass to the loss.

[source]

Configurable

polyaxon.libs.configs.Configurable()

Configurable is an abstract class for defining an configurable objects.

A configurable class reads a configuration (YAML, Json) and create a config instance.


[source]

RunConfig

polyaxon.libs.configs.RunConfig(master=None, num_cores=0, log_device_placement=False, gpu_memory_fraction=1.0, tf_random_seed=None, save_summary_steps=100, save_checkpoints_secs=600, save_checkpoints_steps=None, keep_checkpoint_max=5, keep_checkpoint_every_n_hours=10000, evaluation_master='', model_dir=None, cluster_config=None)

[source]

PipelineConfig

polyaxon.libs.configs.PipelineConfig(module=None, name=None, subgraph_configs_by_features=None, dynamic_pad=True, bucket_boundaries=False, batch_size=64, num_epochs=1, min_after_dequeue=5000, num_threads=3, shuffle=False, allow_smaller_final_batch=True, params=None)

The PipelineConfig holds information needed to create a Pipeline.

  • Args:
    • module: str, the pipeline module to use.
    • name: str, name to give for the pipeline.
    • dynamic_pad: bool, If True the pipleine uses dynamic padding.
    • bucket_boundaries:
    • batch_size: int, the batch size.
    • num_epochs: number of epochs to iterate over in this pipeline.
    • min_after_dequeue: int, number of element to have in the queue.
    • num_threads: int, number of threads to use in the queue.
    • shuffle: If true, shuffle the data.
    • num_epochs: Number of times to iterate through the dataset. If None, iterate forever.
    • params: dict, extra information to pass to the pipeline.

[source]

InputDataConfig

polyaxon.libs.configs.InputDataConfig(input_type=None, pipeline_config=None, x=None, y=None)

The InputDataConfig holds information needed to create a InputData.

  • Args:
    • input_type: str, the type of the input data, e.g. numpy arrays.
    • pipeline_config: The pipeline config to use.
    • x: The x values, only used with NUMPY and PANDAS types.
    • y: The y values, only used with NUMPY and PANDAS types.

[source]

EnvironmentConfig

polyaxon.libs.configs.EnvironmentConfig(module, env_id, params=None)

The EnvironmentConfig holds information needed to create an Environment.

  • Args:
    • module: str, module loss to use.
    • params: dict, extra information to pass to the loss.

[source]

MetricConfig

polyaxon.libs.configs.MetricConfig(module, params=None)

The MetricConfig holds information needed to create a Metric.

  • Args:
    • module: str, name to give for the metric.
    • params: dict, extra information to pass to the metric.

[source]

ExplorationConfig

polyaxon.libs.configs.ExplorationConfig(module, params=None)

The ExplorationConfig holds information needed to create a Exploration.

  • Args:
    • module: str, name to give for the exploration.
    • params: dict, extra information to pass to the exploration.

[source]

OptimizerConfig

polyaxon.libs.configs.OptimizerConfig(module, learning_rate=0.0001, decay_type='', decay_steps=10000, decay_rate=0.99, start_decay_at=0, stop_decay_at=2147483647, min_learning_rate=1e-12, staircase=False, sync_replicas=0, sync_replicas_to_aggregate=0, params=None)

The OptimizerConfig holds information needed to create a Optimizer.

  • Args:
    • module: str, optimizer optimizer to use.
    • learning_rate: A Tensor or a floating point value. The learning rate to use.
    • decay_steps: How often to apply decay.
    • decay_rate: A Python number. The decay rate.
    • start_decay_at: Don't decay before this step
    • stop_decay_at: Don't decay after this step
    • min_learning_rate: Don't decay below this number
    • decay_type: A decay function name defined in tf.train possible Values: exponential_decay, inverse_time_decay, natural_exp_decay, piecewise_constant, polynomial_decay.
    • staircase: Whether to apply decay in a discrete staircase, as opposed to continuous, fashion.
    • sync_replicas:
    • sync_replicas_to_aggregate:
    • params: dict, extra information to pass to the optimizer.

[source]

MemoryConfig

polyaxon.libs.configs.MemoryConfig(module, params=None)

The MemoryConfig holds information needed to create a Memory for an agent.

  • Args:
    • module: str, name to give for the memory.
    • params: dict, extra information to pass to the memory.

[source]

SubGraphConfig

polyaxon.libs.configs.SubGraphConfig(modules, kwargs, features=None, module=None)

The configuration used to create subgraphs.

Handles also nested subgraphs.

  • Args:
    • name: str. The name of this subgraph, used for creating the scope.
    • modules: list. The modules to connect inside this subgraph, e.g. layers
    • features: list. The list of features to use for this subgraph.
    • module: str. The Subgraph module to use. e.g.

[source]

BridgeConfig

polyaxon.libs.configs.BridgeConfig(module, state_size=None)

The BridgeConfig class holds information neede to create a Bridge for a generator model.


[source]

ModelConfig

polyaxon.libs.configs.ModelConfig(loss_config=None, optimizer_config=None, module=None, graph_config=None, encoder_config=None, decoder_config=None, bridge_config=None, summaries='all', eval_metrics_config=None, clip_gradients=5.0, clip_embed_gradients=0.1)

The ModelConfig holds information needed to create a Model.

  • Args:
    • loss_config: The loss configuration.
    • optimizer_config: The optimizer configuration.
    • graph_config: The graph configuration.
    • module: str, The type of the model (classifier, 'regressor, or generator).
    • summaries: str or list, the summary levels.
    • eval_metrics_config: The evaluation metrics configuration.
    • clip_gradients: float, The value to clip the gradients with.
    • params: dict, extra information to pass to the model.

[source]

EstimatorConfig

polyaxon.libs.configs.EstimatorConfig(module='Estimator', output_dir=None, params=None)

The EstimatorConfig holds information needed to create a Estimator.

  • Args:
    • module: str, estimator class to use.
    • output_dir: str, where to save training and evaluation data.
    • params: dict, extra information to pass to the estimator.

[source]

AgentConfig

polyaxon.libs.configs.AgentConfig(module='Agent', memory_config=None, output_dir=None, params=None)

The EstimatorConfig holds information needed to create a Estimator.

  • Args:
    • module: str, estimator class to use.
    • output_dir: str, where to save training and evaluation data.
    • params: dict, extra information to pass to the estimator.

[source]

ExperimentConfig

polyaxon.libs.configs.ExperimentConfig(name, output_dir, run_config, train_input_data_config, eval_input_data_config, estimator_config, model_config, train_hooks_config=None, eval_hooks_config=None, eval_metrics_config=None, eval_every_n_steps=1000, train_steps=10000, eval_steps=10, eval_delay_secs=0, continuous_eval_throttle_secs=60, delay_workers_by_global_step=False, export_strategies=None, train_steps_per_iteration=1000)

The ExperimentConfig holds information needed to create a Experiment.

  • Args:
    • name: str, name to give for the experiment.
    • output_dir: str, where to save training and evaluation data.
    • run_config: Tensorflow run config.
    • train_input_data_config: Train input data configuration.
    • eval_input_data_config: Eval input data configuration.
    • estimator_config: The estimator configuration.
    • model_config: The model configuration.
    • train_hooks_config: The training hooks configuration.
    • eval_hooks_config: The evaluation hooks configuration.
    • eval_metrics_config: The evaluation metrics config.
    • eval_every_n_steps: int, the frequency of evaluation.
    • train_steps: int, the number of steps to train the model.
    • eval_steps: int, the number of steps to eval the model.
    • eval_delay_secs: int, used to delay the evaluation.
    • continuous_eval_throttle_secs: Do not re-evaluate unless the last evaluation was started at least this many seconds ago for continuous_eval().
    • delay_workers_by_global_step: if True delays training workers based on global step instead of time.
    • export_strategies: A list of ExportStrategys, or a single one, or None.
    • train_steps_per_iteration: (applies only to continuous_train_and_evaluate).

[source]

RLExperimentConfig

polyaxon.libs.configs.RLExperimentConfig(name, output_dir, run_config, environment_config, agent_config, model_config, train_hooks_config=None, eval_hooks_config=None, eval_metrics_config=None, eval_every_n_steps=1000, train_steps=10000, train_episodes=100, first_update=5000, update_frequency=15, eval_steps=10, eval_delay_secs=0, continuous_eval_throttle_secs=60, delay_workers_by_global_step=False, export_strategies=None, train_steps_per_iteration=1000)

The RLExperimentConfig holds information needed to create a RLExperiment.

  • Args:
    • name: str, name to give for the experiment.
    • output_dir: str, where to save training and evaluation data.
    • run_config: Tensorflow run config.
    • environment_config: Eval environment configuration.
    • run_config: The agent configuration.
    • model_config: The model configuration.
    • train_hooks_config: The training hooks configuration.
    • eval_hooks_config: The evaluation hooks configuration.
    • eval_metrics_config: The evaluation metrics config.
    • eval_every_n_steps: int, the frequency of evaluation.
    • train_steps: int, the number of steps to train the model.
    • eval_steps: int, the number of steps to eval the model.
    • eval_delay_secs: int, used to delay the evaluation.
    • continuous_eval_throttle_secs: Do not re-evaluate unless the last evaluation was started at least this many seconds ago for continuous_eval().
    • delay_workers_by_global_step: if True delays training workers based on global step instead of time.
    • export_strategies: A list of ExportStrategys, or a single one, or None.
    • train_steps_per_iteration: (applies only to continuous_train_and_evaluate).