mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-22 03:59:42 +00:00
and paligemma task with newline
This commit is contained in:
@@ -1162,6 +1162,9 @@ class PI0OpenPIPolicy(PreTrainedPolicy):
|
|||||||
batch_size = batch[next(iter(batch.keys()))].shape[0]
|
batch_size = batch[next(iter(batch.keys()))].shape[0]
|
||||||
tasks = ["Pick up the object"] * batch_size
|
tasks = ["Pick up the object"] * batch_size
|
||||||
|
|
||||||
|
# PaliGemma prompt has to end with a new line
|
||||||
|
tasks = [task if task.endswith("\n") else f"{task}\n" for task in tasks]
|
||||||
|
|
||||||
# Tokenize with max_length padding to match OpenPI's expected format
|
# Tokenize with max_length padding to match OpenPI's expected format
|
||||||
tokenized = self.tokenizer(
|
tokenized = self.tokenizer(
|
||||||
tasks,
|
tasks,
|
||||||
|
|||||||
Reference in New Issue
Block a user