From adb4af5d51557366daa9e89fd03bed34980a9396 Mon Sep 17 00:00:00 2001 From: mshukor Date: Wed, 2 Apr 2025 17:32:26 +0200 Subject: [PATCH] Update lerobot/common/envs/utils.py Co-authored-by: Remi --- lerobot/common/envs/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lerobot/common/envs/utils.py b/lerobot/common/envs/utils.py index 9bb9d81f..b34b77d8 100644 --- a/lerobot/common/envs/utils.py +++ b/lerobot/common/envs/utils.py @@ -115,7 +115,8 @@ def check_env_attributes_and_types(env: gym.vector.VectorEnv) -> None: ) -def infer_envs_task(env: gym.vector.VectorEnv, observation: dict[str, Any]) -> dict[str, Any]: +def add_envs_task(env: gym.vector.VectorEnv, observation: dict[str, Any]) -> dict[str, Any]: + """ Adds task feature to the observation dict with respect to the first environment attribute. """ if hasattr(env.envs[0], "task_description"): observation["task"] = env.call("task_description") elif hasattr(env.envs[0], "task"):