fix for observations with text

This commit is contained in:
mshukor
2025-06-01 09:35:22 +02:00
parent 496c9d0037
commit 4027d97c70

View File

@@ -109,7 +109,7 @@ def predict_action(observation, policy, device, use_amp):
):
# Convert to pytorch format: channel first and float32 in [0,1] with batch dimension
for name in observation:
if isinstance(observation[name], list):
if not isinstance(observation[name], torch.Tensor):
continue # VLA-like and multirobot policies include textual inputs in the observation
if "image" in name: