class_docstr: Runner config for multi-process training, based on ESSubprocDistributedRollouts.
class_docstr_tok: ["Runner","config","for","multi-process","training",",","based","on","ESSubprocDistributedRollouts","."]
docstr: use multi-process rollout generation
docstr_tok: ["use","multi-process","rollout","generation"]
code: def create_distributed_rollouts(
      self,
      env: Union[StructuredEnv, StructuredEnvSpacesMixin],
      shared_noise: SharedNoiseTable,
      agent_instance_seed: int,
  ) -> ESDistributedRollouts:
      """use multi-process rollout generation"""
      BColors.print_colored(
          "Determinism by seeding of the ES algorithm with the Local runner can not be "
          "guarantied due to the asynchronicity of the implementation.",
          BColors.WARNING,
      )
      n_workers = self.n_train_workers + self.n_eval_workers
      return ESSubprocDistributedRollouts(
          env_factory=self.env_factory,
          n_training_workers=self.n_train_workers,
          n_eval_workers=self.n_eval_workers,
          shared_noise=self.shared_noise,
          env_seeds=[
              self.maze_seeding.generate_env_instance_seed()
              for _ in range(n_workers)
          ],
          agent_seed=agent_instance_seed,
          start_method=self.start_method,
      )
  
imports: import dataclasses
  from abc import abstractmethod, ABC
  from typing import Union, Optional
  from maze.core.agent.policy import Policy
  from maze.core.agent.torch_model import TorchModel
  from maze.core.utils.factory import Factory
  from omegaconf import DictConfig
  from maze.core.agent.torch_policy import TorchPolicy
  from maze.core.annotations import override
  from maze.core.env.structured_env import StructuredEnv
  from maze.core.env.structured_env_spaces_mixin import StructuredEnvSpacesMixin
  from maze.train.trainers.common.model_selection.best_model_selection import BestModelSelection
  from maze.train.trainers.common.model_selection.model_selection_base import ModelSelectionBase
  from maze.train.trainers.common.training_runner import TrainingRunner
  from maze.train.trainers.es.distributed.es_distributed_rollouts import ESDistributedRollouts
  from maze.train.trainers.es.distributed.es_dummy_distributed_rollouts import ESDummyDistributedRollouts
  from maze.train.trainers.es.distributed.es_subproc_distributed_rollouts import ESSubprocDistributedRollouts
  from maze.train.trainers.es.es_shared_noise_table import SharedNoiseTable
  from maze.train.trainers.es.es_trainer import ESTrainer
  from maze.utils.bcolors import BColors
label_desc: Use image node_id 1 for calling the ESLocalRunner obj's underlying member method code with example usage: obj.create_distributed_rollouts(env, shared_noise, agent_instance_seed) and returns: ESSubprocDistributedRollouts