MCPcopy Create free account
hub / github.com/MotrixLab/insactor / AutoResetWrapper

Class AutoResetWrapper

diffmimic/brax_lib/wrappers.py:23–30  ·  view source on GitHub ↗

Automatically resets Brax envs that are done.

Source from the content-addressed store, hash-verified

21
22
23class AutoResetWrapper(wrappers.AutoResetWrapper):
24 """Automatically resets Brax envs that are done."""
25
26 def reset_ref(self, rng: jp.ndarray, ref_traj: jp.ndarray, mask: jp.ndarray) -> brax_env.State:
27 state = self.env.reset_ref(rng, ref_traj, mask)
28 state.info['first_qp'] = state.qp
29 state.info['first_obs'] = state.obs
30 return state
31
32
33class EpisodeWrapper(wrappers.EpisodeWrapper):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected