diff --git a/src/lerobot/async_inference/configs.py b/src/lerobot/async_inference/configs.py index 24f889df1..d1768a323 100644 --- a/src/lerobot/async_inference/configs.py +++ b/src/lerobot/async_inference/configs.py @@ -142,11 +142,6 @@ class RobotClientConfig: default=False, metadata={"help": "Visualize the action queue size"} ) - # Verification configuration - verify_robot_cameras: bool = field( - default=True, metadata={"help": "Verify that the robot cameras match the policy cameras"} - ) - @property def environment_dt(self) -> float: """Environment time step, in seconds""" diff --git a/src/lerobot/async_inference/helpers.py b/src/lerobot/async_inference/helpers.py index 54fad8c54..f73cbc1da 100644 --- a/src/lerobot/async_inference/helpers.py +++ b/src/lerobot/async_inference/helpers.py @@ -62,15 +62,6 @@ def visualize_action_queue_size(action_queue_size: list[int]) -> None: plt.show() -def validate_robot_cameras_for_policy( - lerobot_observation_features: dict[str, dict], policy_image_features: dict[str, PolicyFeature] -) -> None: - image_keys = list(filter(is_image_key, lerobot_observation_features)) - assert set(image_keys) == set(policy_image_features.keys()), ( - f"Policy image features must match robot cameras! Received {list(policy_image_features.keys())} != {image_keys}" - ) - - def map_robot_keys_to_lerobot_features(robot: Robot) -> dict[str, dict]: return hw_to_dataset_features(robot.observation_features, OBS_STR, use_video=False) diff --git a/src/lerobot/async_inference/robot_client.py b/src/lerobot/async_inference/robot_client.py index 8c4425c6b..f9d70a64e 100644 --- a/src/lerobot/async_inference/robot_client.py +++ b/src/lerobot/async_inference/robot_client.py @@ -48,7 +48,6 @@ import torch from lerobot.cameras.opencv.configuration_opencv import OpenCVCameraConfig # noqa: F401 from lerobot.cameras.realsense.configuration_realsense import RealSenseCameraConfig # noqa: F401 -from lerobot.configs.policies import PreTrainedConfig from lerobot.robots import ( # noqa: F401 Robot, RobotConfig, @@ -76,7 +75,6 @@ from .helpers import ( TimedObservation, get_logger, map_robot_keys_to_lerobot_features, - validate_robot_cameras_for_policy, visualize_action_queue_size, ) @@ -98,14 +96,6 @@ class RobotClient: lerobot_features = map_robot_keys_to_lerobot_features(self.robot) - if config.verify_robot_cameras: - # Load policy config for validation - policy_config = PreTrainedConfig.from_pretrained(config.pretrained_name_or_path) - policy_image_features = policy_config.image_features - - # The cameras specified for inference must match the one supported by the policy chosen - validate_robot_cameras_for_policy(lerobot_features, policy_image_features) - # Use environment variable if server_address is not provided in config self.server_address = config.server_address diff --git a/tests/async_inference/test_e2e.py b/tests/async_inference/test_e2e.py index ebaef2ef1..11941ce32 100644 --- a/tests/async_inference/test_e2e.py +++ b/tests/async_inference/test_e2e.py @@ -139,7 +139,6 @@ def test_async_inference_e2e(monkeypatch): policy_type="test", pretrained_name_or_path="test", actions_per_chunk=20, - verify_robot_cameras=False, ) client = RobotClient(client_config) diff --git a/tests/async_inference/test_robot_client.py b/tests/async_inference/test_robot_client.py index dfdb8ce42..5b138d91b 100644 --- a/tests/async_inference/test_robot_client.py +++ b/tests/async_inference/test_robot_client.py @@ -51,7 +51,6 @@ def robot_client(): policy_type="test", pretrained_name_or_path="test", actions_per_chunk=20, - verify_robot_cameras=False, ) client = RobotClient(test_config)