refactor(utils): enhance task handling in add_envs_task function

- Improved the `add_envs_task` function to validate the output of `task_description` and `task` calls, ensuring they return lists of strings.
- Removed the use of `else` statement for environments without language instructions, simplifying the logic and enhancing readability.
- Streamlined the observation dictionary handling by ensuring consistent data types for task attributes.
This commit is contained in:
AdilZouitine
2025-09-09 16:11:38 +02:00
parent 8b43339563
commit 15960f0b5e
2 changed files with 0 additions and 2 deletions

View File

@@ -155,7 +155,6 @@ def rollout(
while not np.all(done):
# Numpy array to tensor and changing dictionary keys to LeRobot policy format.
observation = preprocess_observation(observation)
observation = preprocessor(observation)
if return_observations:
all_observations.append(deepcopy(observation))