class_docstr: Worker class used in all Samplers.
class_docstr_tok: ["Worker","class","used","in","all","Samplers","."]
docstr: Initialize a worker.
  
  Args:
      seed (int): The seed to use to intialize random number generators.
      max_episode_length (int or float): The maximum length of episodes
          which will be sampled. Can be (floating point) infinity.
      worker_number (int): The number of the worker this update is
          occurring in. This argument is used to set a different seed for
          each worker.
  
  Should create fields the following fields:
      agent (Policy or None): The worker's initial agent.
      env (Environment or None): The worker's environment.
docstr_tok: ["Initialize","a","worker",".","Args",":","seed","(","int",")",":","The","seed","to","use","to","intialize","random","number","generators",".","max_episode_length","(","int","or","float",")",":","The","maximum","length","of","episodes","which","will","be","sampled",".","Can","be","(","floating","point",")","infinity",".","worker_number","(","int",")",":","The","number","of","the","worker","this","update","is","occurring","in",".","This","argument","is","used","to","set","a","different","seed","for","each","worker",".","Should","create","fields","the","following","fields",":","agent","(","Policy","or","None",")",":","The","worker","'s","initial","agent",".","env","(","Environment","or","None",")",":","The","worker","'s","environment","."]
code: def __init__(self, *, seed, max_episode_length, worker_number):
      """Initialize a worker.
  
      Args:
          seed (int): The seed to use to intialize random number generators.
          max_episode_length (int or float): The maximum length of episodes
              which will be sampled. Can be (floating point) infinity.
          worker_number (int): The number of the worker this update is
              occurring in. This argument is used to set a different seed for
              each worker.
  
      Should create fields the following fields:
          agent (Policy or None): The worker's initial agent.
          env (Environment or None): The worker's environment.
  
      """
      self._seed = seed
      self._max_episode_length = max_episode_length
      self._worker_number = worker_number
  
file_path: garage/src/garage/sampler/worker.py
imports: import abc
label_desc: Use image node_id 1 to create a new Worker object from inherited base classes: abc with example: obj = Worker()