mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-30 18:31:25 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
@@ -174,7 +174,7 @@ class LiberoEnv(gym.Env):
|
||||
self.camera_name = camera_name.split(
|
||||
","
|
||||
) # agentview_image (main) or robot0_eye_in_hand_image (wrist)
|
||||
#TODO: jadechoghari, check mapping
|
||||
# TODO: jadechoghari, check mapping
|
||||
self.camera_name_mapping = {
|
||||
"agentview_image": OBS_IMAGE,
|
||||
"robot0_eye_in_hand_image": OBS_IMAGE_2,
|
||||
@@ -222,7 +222,7 @@ class LiberoEnv(gym.Env):
|
||||
"agent_pos": spaces.Box(
|
||||
low=-1000.0,
|
||||
high=1000.0,
|
||||
shape=(8,), #TODO: jadechoghari, check compatible
|
||||
shape=(8,), # TODO: jadechoghari, check compatible
|
||||
dtype=np.float64,
|
||||
),
|
||||
}
|
||||
@@ -309,6 +309,7 @@ class LiberoEnv(gym.Env):
|
||||
print(self.task, self.task_id, done, is_success)
|
||||
truncated = False
|
||||
return observation, reward, terminated, truncated, info
|
||||
|
||||
def step(self, action):
|
||||
assert action.ndim == 1
|
||||
raw_obs, reward, done, info = self._env.step(action)
|
||||
|
||||
@@ -189,7 +189,6 @@ def rollout(
|
||||
running_success_rate = (
|
||||
# einops.reduce(torch.stack(all_successes, dim=1), "b n -> b", "any").numpy().mean() #TODO: changed by jade
|
||||
einops.reduce(torch.stack(all_successes, dim=1), "b n -> b", "max")
|
||||
|
||||
)
|
||||
progbar.set_postfix({"running_success_rate": f"{running_success_rate.item() * 100:.1f}%"})
|
||||
progbar.update()
|
||||
|
||||
Reference in New Issue
Block a user