serving: unwrap {"method":"infer","obs":...} client payloads - #2
Open
anthony-liang-tri wants to merge 1 commit into
Open
serving: unwrap {"method":"infer","obs":...} client payloads#2anthony-liang-tri wants to merge 1 commit into
anthony-liang-tri wants to merge 1 commit into
Conversation
openpi-client's WebsocketClientPolicy sends the inference payload wrapped as
{"method": "infer", "obs": {...}} (+ optional "noise"), but the server passed the
raw unpacked message straight to policy.infer(), which expects the bare obs dict.
Unwrap it (preserving noise) so both the yam_eval eval client and
deployment/openpi_bridge.py work against this server.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Unwrap
{"method": "infer", "obs": {...}}-wrapped payloads inWebsocketPolicyServerbefore handing them topolicy.infer().Why
openpi-client'sWebsocketClientPolicysends the inference request wrapped as{"method": "infer", "obs": {...}}(with an optional top-level"noise"), but the server passed the raw unpacked message straight topolicy.infer(), which expects the bare obs dict. Without unwrapping, inference gets a malformed obs. This unwraps it (preservingnoise) so both the yam_eval eval client anddeployment/openpi_bridge.pywork against this server.This has been running as a local patch on the russet YAM rig; upstreaming so it isn't lost on a clean checkout.
Note
+9 lines, backward-compatible (only unwraps when the
method:inferenvelope is present; bare-obs clients unaffected).