mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-28 04:06:00 +00:00
fix(eval): catch AttributeError and NotImplementedError explicitly for task description
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -169,10 +169,10 @@ def rollout(
|
|||||||
# env.call() works with both SyncVectorEnv and AsyncVectorEnv.
|
# env.call() works with both SyncVectorEnv and AsyncVectorEnv.
|
||||||
try:
|
try:
|
||||||
observation["task"] = list(env.call("task_description"))
|
observation["task"] = list(env.call("task_description"))
|
||||||
except Exception:
|
except (AttributeError, NotImplementedError):
|
||||||
try:
|
try:
|
||||||
observation["task"] = list(env.call("task"))
|
observation["task"] = list(env.call("task"))
|
||||||
except Exception:
|
except (AttributeError, NotImplementedError):
|
||||||
observation["task"] = [""] * env.num_envs
|
observation["task"] = [""] * env.num_envs
|
||||||
|
|
||||||
# Apply environment-specific preprocessing (e.g., LiberoProcessorStep for LIBERO)
|
# Apply environment-specific preprocessing (e.g., LiberoProcessorStep for LIBERO)
|
||||||
|
|||||||
Reference in New Issue
Block a user