docs(env_processor): remove deprecated add_envs_task from pipeline example

add_envs_task is replaced by env.call("task_description") in this PR.
Remove it from the pipeline walkthrough and renumber the steps (8→7).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Pepijn
2026-04-08 14:15:27 +02:00
parent 76129ab130
commit a4b76c22fd
+5 -8
View File
@@ -25,31 +25,28 @@ raw_observation = env.step(action)
# 2. Convert numpy to torch, normalize images [0,1] # 2. Convert numpy to torch, normalize images [0,1]
observation = preprocess_observation(raw_observation) observation = preprocess_observation(raw_observation)
# 3. Add task metadata (for multi-task environments) # 3. ENVIRONMENT-SPECIFIC preprocessing (NEW!)
observation = add_envs_task(env, observation)
# 4. ENVIRONMENT-SPECIFIC preprocessing (NEW!)
# - Flatten robot states # - Flatten robot states
# - Rotate images to match dataset conventions # - Rotate images to match dataset conventions
# - Handle environment-specific coordinate systems # - Handle environment-specific coordinate systems
observation = env_preprocessor(observation) observation = env_preprocessor(observation)
# 5. POLICY-SPECIFIC preprocessing # 4. POLICY-SPECIFIC preprocessing
# - Normalize with dataset statistics # - Normalize with dataset statistics
# - Add batch dimensions # - Add batch dimensions
# - Move to GPU # - Move to GPU
# - Tokenize language instructions # - Tokenize language instructions
observation = preprocessor(observation) observation = preprocessor(observation)
# 6. Policy inference # 5. Policy inference
action = policy.select_action(observation) action = policy.select_action(observation)
# 7. POLICY-SPECIFIC postprocessing # 6. POLICY-SPECIFIC postprocessing
# - Unnormalize actions # - Unnormalize actions
# - Remove batch dimensions # - Remove batch dimensions
action = postprocessor(action) action = postprocessor(action)
# 8. ENVIRONMENT-SPECIFIC postprocessing (NEW!) # 7. ENVIRONMENT-SPECIFIC postprocessing (NEW!)
# - Convert action formats if needed # - Convert action formats if needed
# - Apply environment-specific constraints # - Apply environment-specific constraints
action_transition = {"action": action} action_transition = {"action": action}