fix(robocasa): override RoboCasaGymEnv default split (test -> all)

RoboCasaGymEnv defaults split="test", but create_env only accepts
{None, "all", "pretrain", "target"}, so the out-of-the-box default
crashes with ValueError. Always pass "all" when split is None.

Made-with: Cursor
This commit is contained in:
Pepijn
2026-04-16 21:37:35 +02:00
parent 0416df4bb3
commit 114535c64e
+4 -2
View File
@@ -182,13 +182,15 @@ class RoboCasaEnv(gym.Env):
return
from robocasa.wrappers.gym_wrapper import RoboCasaGymEnv
# RoboCasaGymEnv has a broken default split="test" (invalid for create_env
# which only accepts None/"all"/"pretrain"/"target"). Always pass a valid
# value so we don't hit that default.
kwargs: dict[str, Any] = {
"env_name": self.task,
"camera_widths": self.observation_width,
"camera_heights": self.observation_height,
"split": self.split if self.split is not None else "all",
}
if self.split is not None:
kwargs["split"] = self.split
self._env = RoboCasaGymEnv(**kwargs)