mtrl.env package¶
Subpackages¶
Submodules¶
mtrl.env.builder module¶
-
mtrl.env.builder.
build_dmcontrol_vec_env
(domain_name: str, task_name: str, prefix: str, make_kwargs: omegaconf.dictconfig.DictConfig, env_id_list: List[int], seed_list: List[int], mode_list: List[str]) → mtrl.env.vec_env.VecEnv[source]¶
mtrl.env.types module¶
Collection of types used in the env.
mtrl.env.vec_env module¶
-
class
mtrl.env.vec_env.
MetaWorldVecEnv
(env_metadata: Dict[str, Any], env_fns, observation_space=None, action_space=None, shared_memory=True, copy=True, context=None, daemon=True, worker=None)[source]¶ Bases:
gym.vector.async_vector_env.AsyncVectorEnv
Return only every skip-th frame
-
property
ids
¶
-
property
mode
¶
-
reset
()[source]¶ Reset all sub-environments and return a batch of initial observations.
- Returns
observations – A batch of observations from the vectorized environment.
- Return type
sample from observation_space
-
step
(actions)[source]¶ Take an action for each sub-environments.
- Parameters
actions (iterable of samples from action_space) – List of actions.
- Returns
observations (sample from observation_space) – A batch of observations from the vectorized environment.
rewards (np.ndarray instance (dtype np.float_)) – A vector of rewards from the vectorized environment.
dones (np.ndarray instance (dtype np.bool_)) – A vector whose entries indicate whether the episode has ended.
infos (list of dict) – A list of auxiliary diagnostic information dicts from sub-environments.
-
property
-
class
mtrl.env.vec_env.
VecEnv
(env_metadata: Dict[str, Any], env_fns, observation_space=None, action_space=None, shared_memory=True, copy=True, context=None, daemon=True, worker=None)[source]¶ Bases:
gym.vector.async_vector_env.AsyncVectorEnv
Return only every skip-th frame
-
property
ids
¶
-
property
mode
¶
-
reset
()[source]¶ Reset all sub-environments and return a batch of initial observations.
- Returns
observations – A batch of observations from the vectorized environment.
- Return type
sample from observation_space
-
step
(actions)[source]¶ Take an action for each sub-environments.
- Parameters
actions (iterable of samples from action_space) – List of actions.
- Returns
observations (sample from observation_space) – A batch of observations from the vectorized environment.
rewards (np.ndarray instance (dtype np.float_)) – A vector of rewards from the vectorized environment.
dones (np.ndarray instance (dtype np.bool_)) – A vector whose entries indicate whether the episode has ended.
infos (list of dict) – A list of auxiliary diagnostic information dicts from sub-environments.
-
property