ESMasterRunner

class maze.train.trainers.es.es_runners.ESMasterRunner(state_dict_dump_file: str, dump_interval: int | None, spaces_config_dump_file: str, normalization_samples: int, shared_noise_table_size: int)

Baseclass of ES training master runners (serves as basis for dev and other runners).

abstract create_distributed_rollouts(env: StructuredEnv | StructuredEnvSpacesMixin, shared_noise: SharedNoiseTable, agent_instance_seed: int) ESDistributedRollouts

Abstract method, derived runners like ESDevRunner return an appropriate rollout generator.

Parameters:
  • env – The one and only environment.

  • shared_noise – Noise table to be shared by all workers.

  • agent_instance_seed – The agent seed to be used.

Returns:

A newly instantiated rollout generator.

run(n_epochs: int | None = None, distributed_rollouts: ESDistributedRollouts | None = None, model_selection: ModelSelectionBase | None = None) None

(overrides TrainingRunner)

See run(). :param distributed_rollouts: The distribution interface for experience collection. :param n_epochs: Number of epochs to train. :param model_selection: Optional model selection class, receives model evaluation results.

setup(cfg: omegaconf.DictConfig) None

(overrides TrainingRunner)

Setup the training master node.

shared_noise_table_size: int

Number of float values in the deterministically generated pseudo-random table (250.000.000 x 32bit floats = 1GB)