MCPcopy Create free account
hub / github.com/nv-tlabs/pacer / VecTaskPythonWrapper

Class VecTaskPythonWrapper

pacer/env/tasks/vec_task_wrappers.py:28–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26
27
28class VecTaskPythonWrapper(VecTaskPython):
29
30 def __init__(self, task, rl_device, clip_observations=5.0):
31 super().__init__(task, rl_device, clip_observations)
32
33 self._amp_obs_space = spaces.Box(np.ones(task.get_num_amp_obs()) * -np.Inf, np.ones(task.get_num_amp_obs()) * np.Inf)
34 return
35
36 def reset(self, env_ids=None):
37 self.task.reset(env_ids)
38 return torch.clamp(self.task.obs_buf, -self.clip_obs, self.clip_obs).to(self.rl_device)
39
40 @property
41 def amp_observation_space(self):
42 return self._amp_obs_space
43
44 def fetch_amp_obs_demo(self, num_samples):
45 return self.task.fetch_amp_obs_demo(num_samples)

Callers 1

parse_taskFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…