class_docstr: TaskSampler where the environment can sample "task objects".
  
  This is used for environments that implement `sample_tasks` and `set_task`.
  For example, :py:class:`~HalfCheetahVelEnv`, as implemented in Garage.
  
  Args:
      env_constructor (type): Type of the environment.
      env (garage.Environment or None): Instance of env_constructor to sample
          from (will be constructed if not provided).
      wrapper (Callable[garage.Environment, garage.Environment] or None):
          Wrapper function to apply to environment.
class_docstr_tok: ["TaskSampler","where","the","environment","can","sample","``","task","objects","''",".","This","is","used","for","environments","that","implement","`","sample_tasks","`","and","`","set_task","`",".","For","example",",",":","py",":","class",":","`","~HalfCheetahVelEnv","`",",","as","implemented","in","Garage",".","Args",":","env_constructor","(","type",")",":","Type","of","the","environment",".","env","(","garage.Environment","or","None",")",":","Instance","of","env_constructor","to","sample","from","(","will","be","constructed","if","not","provided",")",".","wrapper","(","Callable","[","garage.Environment",",","garage.Environment","]","or","None",")",":","Wrapper","function","to","apply","to","environment","."]
code: def __init__(self, env_constructor, *, env=None, wrapper=None):
      self._env_constructor = env_constructor
      self._env = env or env_constructor()
      self._wrapper = wrapper
  
imports: import abc
  import copy
  import math
  import numpy
  from garage.envs import GymEnv, TaskNameWrapper, TaskOnehotWrapper
  from garage.sampler.env_update import ExistingEnvUpdate, NewEnvUpdate, SetTaskUpdate
label_desc: Use image node_id 1 to create a new SetTaskSampler object from inherited base classes: TaskSampler with example: obj = SetTaskSampler(env_constructor)