Understand observation masks: timestep_pad_mask and pad_mask_dict
mainWhen providing observations to Octo, two mask types are used to control attention:
timestep_pad_mask
Indicates which observations in the history window should be attended to. Octo is typically trained with a history window size of 2 (current + previous observation).
- At the start of a trajectory: Since there is no previous observation, set
timestep_pad_mask=Falsefor the missing index. - Window size of 1: If using a window size of 1,
timestep_pad_maskshould always be[True]. - Automation: If you use the
HistoryWrapperfromocto/utils/gym_wrappers.py, this mask is added to the observation dictionary automatically.
pad_mask_dict
Indicates which elements within a single timestep should be attended to. This is used for modalities that might be missing in a specific dataset.
- Example (No language):
pad_mask_dict["language_instruction"] = False. - Example (No wrist camera):
pad_mask_dict["image_wrist"] = False. - Default behavior: If a key is missing from the
pad_mask_dict, it is treated asFalsefor that key.