diff --git a/lerobot/common/envs/configs.py b/lerobot/common/envs/configs.py index 6de3cf03..c99fba81 100644 --- a/lerobot/common/envs/configs.py +++ b/lerobot/common/envs/configs.py @@ -32,7 +32,8 @@ class EnvConfig(draccus.ChoiceRegistry, abc.ABC): def type(self) -> str: return self.get_choice_name(self.__class__) - @abc.abstractproperty + @property + @abc.abstractmethod def gym_kwargs(self) -> dict: raise NotImplementedError() diff --git a/lerobot/common/robots/robot.py b/lerobot/common/robots/robot.py index 7368863e..e5af9e79 100644 --- a/lerobot/common/robots/robot.py +++ b/lerobot/common/robots/robot.py @@ -49,15 +49,18 @@ class Robot(abc.ABC): return f"{self.id} {self.__class__.__name__}" # TODO(aliberts): create a proper Feature class for this that links with datasets - @abc.abstractproperty + @property + @abc.abstractmethod def observation_features(self) -> dict: pass - @abc.abstractproperty + @property + @abc.abstractmethod def action_features(self) -> dict: pass - @abc.abstractproperty + @property + @abc.abstractmethod def is_connected(self) -> bool: pass @@ -66,7 +69,8 @@ class Robot(abc.ABC): """Connects to the robot.""" pass - @abc.abstractproperty + @property + @abc.abstractmethod def is_calibrated(self) -> bool: pass diff --git a/lerobot/common/teleoperators/teleoperator.py b/lerobot/common/teleoperators/teleoperator.py index 5a1ed184..d8715a55 100644 --- a/lerobot/common/teleoperators/teleoperator.py +++ b/lerobot/common/teleoperators/teleoperator.py @@ -47,15 +47,18 @@ class Teleoperator(abc.ABC): def __str__(self) -> str: return f"{self.id} {self.__class__.__name__}" - @abc.abstractproperty + @property + @abc.abstractmethod def action_features(self) -> dict: pass - @abc.abstractproperty + @property + @abc.abstractmethod def feedback_features(self) -> dict: pass - @abc.abstractproperty + @property + @abc.abstractmethod def is_connected(self) -> bool: pass @@ -64,7 +67,8 @@ class Teleoperator(abc.ABC): """Connects to the teleoperator.""" pass - @abc.abstractproperty + @property + @abc.abstractmethod def is_calibrated(self) -> bool: pass diff --git a/lerobot/configs/policies.py b/lerobot/configs/policies.py index 22eae05f..1302db1f 100644 --- a/lerobot/configs/policies.py +++ b/lerobot/configs/policies.py @@ -78,15 +78,18 @@ class PreTrainedConfig(draccus.ChoiceRegistry, HubMixin, abc.ABC): def type(self) -> str: return self.get_choice_name(self.__class__) - @abc.abstractproperty + @property + @abc.abstractmethod def observation_delta_indices(self) -> list | None: raise NotImplementedError - @abc.abstractproperty + @property + @abc.abstractmethod def action_delta_indices(self) -> list | None: raise NotImplementedError - @abc.abstractproperty + @property + @abc.abstractmethod def reward_delta_indices(self) -> list | None: raise NotImplementedError