mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-23 01:41:54 +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:
@@ -309,6 +309,7 @@ class LiberoEnv(gym.Env):
|
|||||||
print(self.task, self.task_id, done, is_success)
|
print(self.task, self.task_id, done, is_success)
|
||||||
truncated = False
|
truncated = False
|
||||||
return observation, reward, terminated, truncated, info
|
return observation, reward, terminated, truncated, info
|
||||||
|
|
||||||
def step(self, action):
|
def step(self, action):
|
||||||
assert action.ndim == 1
|
assert action.ndim == 1
|
||||||
raw_obs, reward, done, info = self._env.step(action)
|
raw_obs, reward, done, info = self._env.step(action)
|
||||||
|
|||||||
@@ -189,7 +189,6 @@ def rollout(
|
|||||||
running_success_rate = (
|
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", "any").numpy().mean() #TODO: changed by jade
|
||||||
einops.reduce(torch.stack(all_successes, dim=1), "b n -> b", "max")
|
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.set_postfix({"running_success_rate": f"{running_success_rate.item() * 100:.1f}%"})
|
||||||
progbar.update()
|
progbar.update()
|
||||||
|
|||||||
Reference in New Issue
Block a user