fix preprocessor

This commit is contained in:
Jade Choghari
2026-01-02 08:33:23 +01:00
parent 7dfbd57913
commit 5f2e5f8a56
2 changed files with 2 additions and 2 deletions

View File

@@ -80,7 +80,7 @@ class Pi05PrepareStateTokenizerProcessorStep(ProcessorStep):
for i, task in enumerate(tasks):
cleaned_text = task.strip().replace("_", " ").replace("\n", " ")
state_str = " ".join(map(str, discretized_states[i]))
full_prompt = f"Task: {cleaned_text}, State: {state_str};\nAction: "
full_prompt = f"Task: {cleaned_text}, State: {state_str};\n"
full_prompts.append(full_prompt)
transition[TransitionKey.COMPLEMENTARY_DATA][self.task_key] = full_prompts

View File

@@ -157,7 +157,7 @@ class TokenizerProcessorStep(ObservationProcessorStep):
# Tokenize the task (this will create CPU tensors)
tokenized_prompt = self._tokenize_text(task)
breakpoint()
# Detect the device from existing tensors in the transition to ensure consistency
target_device = self._detect_device(self.transition)