Skip to content

Add simple client CPU-only dry run#952

Draft
Travor278 wants to merge 1 commit into
Physical-Intelligence:mainfrom
Travor278:add-simple-client-dry-run
Draft

Add simple client CPU-only dry run#952
Travor278 wants to merge 1 commit into
Physical-Intelligence:mainfrom
Travor278:add-simple-client-dry-run

Conversation

@Travor278
Copy link
Copy Markdown

Description

Adds a CPU-only dry-run policy server for examples/simple_client and an optional --show-action-chunk client flag. This lets users validate the websocket path, fake observation payloads, and returned actions chunk shape before downloading checkpoints, using a GPU, or connecting robot hardware.

The existing simple client defaults are unchanged. The fake server is an example-only utility and does not affect model loading or real policy serving.

Related Issue

Related to #828 and #826.

Motivation and Context

Several users are trying to understand the remote policy server/client workflow, including which config/checkpoint pair to serve and what a basic action chunk response looks like. A lightweight dry run makes it easier to separate websocket/client setup issues from model checkpoint, GPU, or robot deployment issues.

How Has This Been / Can This Be Tested?

Tested locally on Windows with Anaconda py311 / Python 3.11.15 using the simple-client dependencies.

D:\Dev\conda-envs\py311\python.exe -m py_compile examples/simple_client/main.py examples/simple_client/fake_policy_server.py
uvx ruff check examples/simple_client/main.py examples/simple_client/fake_policy_server.py
uvx ruff format --check examples/simple_client/main.py examples/simple_client/fake_policy_server.py

Smoke-tested the dry-run websocket path:

D:\Dev\conda-envs\py311\python.exe examples/simple_client/fake_policy_server.py --host 127.0.0.1 --port 8766 --action-horizon 4 --action-dim 3
D:\Dev\conda-envs\py311\python.exe examples/simple_client/main.py --host 127.0.0.1 --port 8766 --env DROID --num-steps 2 --show-action-chunk --max-action-rows 2

The client printed actions shape=(4, 3) and timing stats for the fake server response.

Checklist

  • Added a CPU-only example path that does not require model weights or GPU access.
  • Documented both the fake-server dry run and the real policy:checkpoint server command.
  • Preserved existing simple-client defaults and real policy behavior.
  • Ran focused syntax, lint, format, and websocket smoke checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant