# garage.sampler.env_update¶

A callable that “updates” an environment.

class EnvUpdate[source]

A callable that “updates” an environment.

Implementors of this interface can be called on environments to update them. The passed in environment should then be ignored, and the returned one used instead.

Since no new environment needs to be passed in, this type can also be used to construct new environments.

class NewEnvUpdate(env_constructor)[source]

EnvUpdate that creates a new environment every update.

Parameters

env_constructor (Callable[Environment]) – Callable that constructs an environment.

class SetTaskUpdate(env_type, task, wrapper_constructor)[source]

EnvUpdate that calls set_task with the provided task.

Parameters
• env_type (type) – Type of environment.

• wrapper_constructor (Callable[garage.Env, garage.Env] or None) – Callable that wraps constructed environments.

class ExistingEnvUpdate(env)[source]

EnvUpdate that carries an already constructed environment.

Parameters

env (Environment) – The environment.