Support DROID policy server for Cosmos3 OpenPI (#4282)

Signed-off-by: yuzhud <yuzhudong@gmail.com>
This commit is contained in:
Yuzhu Dong authored and GitHub committed 2026-06-15 21:22:59 +08:00
1 parent ae937320ff
commit e2e79177db
16 files changed
+1397 -154

No files matched your search

@@ -40,7 +40,9 @@ def _json_unpack(data):
def _engine_with_policy_config(policy_config=None):
od_config = SimpleNamespace(model_config={"policy_server_config": policy_config or TEST_POLICY_SERVER_CONFIG})
if policy_config is None:
policy_config = TEST_POLICY_SERVER_CONFIG
od_config = SimpleNamespace(model_config={"policy_server_config": policy_config})
return SimpleNamespace(get_diffusion_od_config=lambda: od_config)
@@ -172,6 +174,15 @@ def test_create_policy_server_returns_none_without_policy_config():
assert serving is None
def test_policy_server_config_allows_explicit_empty_config():
serving = openpi_serving.ServingRealtimeRobotOpenPI(
engine_client=_engine_with_policy_config(policy_config={}),
model_name="nvidia/Cosmos3-Nano-Policy-DROID",
)
assert serving.policy_server_config.to_dict() == {}
def test_policy_server_config_reads_engine_model_config():
policy_config = {"custom_model_key": "custom-value"}
engine_client = SimpleNamespace(model_config=SimpleNamespace(policy_server_config=policy_config))