[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot]
2025-08-10 05:33:22 +00:00
parent a25480d363
commit c20bf75ba0
2 changed files with 3 additions and 3 deletions

View File

@@ -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)

View File

@@ -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()