Skip to content

feat(imitation): publish validated episode JSON and HUD status - #4393

Merged
TomCC7 merged 4 commits into
mainfrom
cc/feat/episode-json-status
Oct 7, 2026
Merged

TomCC7 merged 4 commits into
mainfrom
cc/feat/episode-json-status

Conversation

@TomCC7

@TomCC7 TomCC7 commented Oct 2, 2026

Copy link
Copy Markdown
Member

What is this feature?

Represent EpisodeStatus as a typed Python model and publish its versioned JSON through existing std_msgs.String. Keep episode commands/status consistent, validate documents before HUD use, and preserve source timestamps in the G1 recorder. Adapt the existing Python collection recorder and extractor so they continue working before the profile migration.

Why do we need this?

Episode boundaries must survive live publication, recording and replay without a new generated LCM type. Depends on the generic JSON recorder branch; OpenYAM integration remains in #4343.

How to Test

uv run pytest dimos/imitation/collection/test_episode.py dimos/imitation/collection/test_episode_monitor.py dimos/imitation/dataprep/test_core.py dimos/teleop/webxr/test_module.py dimos/robot/unitree/g1/test_g1_teleop.py

120 focused episode, extraction, HUD and G1 tests passed; commit hooks passed. Wire version 1 handling is retained. Physical Quest/G1 operation has not been verified.

Which issue(s) does this PR close?

None. This is a review slice of #4343, following the Manipulation SDK preview. It does not close or replace the integration PR.

Checklist

  • I have read and approved the CLA.

AI assistance: Codex assisted with the split, validation, and description.

@github-actions github-actions Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go2 replay realtime

Details
Benchmark suite Current: f4fd947 Previous: cdfaef0 Ratio
first frame wall 10.234 s 9.891 s 1.03
first frame cpu 20.971 s 21.456 s 0.98
run cpu 34.702 s 33.75 s 1.03
run cpu (user) 26.344 s 26.257 s 1.00
run cpu (system) 8.358 s 7.493 s 1.12
peak memory 2683.492 MB 2699.734 MB 0.99
peak threads 414 threads 394 threads 1.05
disk read 29.469 MB 20.871 MB 1.41
disk write 11.207 MB 11.098 MB 1.01
network (transport) 2736.248 MB 2722.56 MB 1.01
network (external rx) 0.06 MB 0.139 MB 0.43
network (external tx) 0.15 MB 0.342 MB 0.44

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions github-actions Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'go2 replay realtime'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.08.

Benchmark suite Current: f4fd947 Previous: cdfaef0 Ratio
run cpu (system) 8.358 s 7.493 s 1.12
disk read 29.469 MB 20.871 MB 1.41

This comment was automatically generated by workflow using github-action-benchmark.

@codecov

codecov Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.10744% with 7 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
dimos/imitation/collection/episode.py 83.87% 5 Missing ⚠️
dimos/imitation/collection/episode_monitor.py 94.28% 1 Missing and 1 partial ⚠️
@@            Coverage Diff             @@
##             main    #4393      +/-   ##
==========================================
+ Coverage   79.94%   79.96%   +0.01%     
==========================================
  Files        1598     1600       +2     
  Lines      150728   150869     +141     
  Branches    12815    12820       +5     
==========================================
+ Hits       120502   120636     +134     
- Misses      26663    26669       +6     
- Partials     3563     3564       +1     
Components Coverage Δ
Tests 94.93% <100.00%> (+<0.01%) ⬆️
Flag Coverage Δ
OS-macos-latest 75.40% <94.21%> (+0.02%) ⬆️
OS-ubuntu-24.04-arm 75.32% <94.21%> (+0.02%) ⬆️
OS-ubuntu-latest 76.11% <97.10%> (+0.02%) ⬆️
Py-3.10 76.11% <97.10%> (+0.02%) ⬆️
Py-3.11 76.10% <97.10%> (+0.02%) ⬆️
Py-3.12 76.11% <97.10%> (+0.02%) ⬆️
SelfHosted-Large 32.13% <39.66%> (-0.01%) ⬇️
SelfHosted-Linux 36.69% <39.66%> (+0.01%) ⬆️
SelfHosted-macOS 37.06% <39.66%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
dimos/imitation/collection/blueprint.py 88.23% <ø> (ø)
dimos/imitation/collection/recorder.py 92.00% <100.00%> (+3.11%) ⬆️
dimos/imitation/collection/test_blueprint.py 100.00% <100.00%> (ø)
dimos/imitation/collection/test_episode.py 100.00% <100.00%> (ø)
dimos/imitation/collection/test_episode_monitor.py 99.47% <100.00%> (+0.11%) ⬆️
dimos/imitation/dataprep/core.py 92.57% <100.00%> (+0.15%) ⬆️
dimos/imitation/test_datacollection_e2e.py 96.50% <100.00%> (+0.07%) ⬆️
...t/unitree/g1/blueprints/basic/unitree_g1_teleop.py 93.02% <100.00%> (+2.39%) ⬆️
dimos/robot/unitree/g1/test_g1_teleop.py 100.00% <100.00%> (ø)
dimos/teleop/webxr/module.py 81.25% <100.00%> (+0.26%) ⬆️
... and 3 more

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@greptile-apps

greptile-apps Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 3/5

[Medium risk] Refactors episode status from object to JSON string transport.

Not safe to merge until the blueprint startup and short-tap failures are fixed.

Findings

  1. P1 Collection blueprints cannot start ▶
  2. P1 Quick taps lose take markers ▶

Summary

The PR moves episode status into a versioned JSON document carried by String. The shipped XArm, Piper, and G1 collection blueprints fail configuration validation, and quick WebXR button taps can lose episode markers. Both failures should be fixed before merging.

Reviews (1) · Last reviewed commit: "test(imitation): align inherited wiring ..."

@github-actions github-actions Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go2 replay realtime (arm64)

Details
Benchmark suite Current: 20caea8 Previous: 943ce13 Ratio
peak memory 2020.48 MB 2035.031 MB 0.99
peak threads 398 threads 397 threads 1.00
network (transport) 2737.361 MB 2729.585 MB 1.00
disk write 2.402 MB 2.184 MB 1.10
instructions 149.187 G 149.136 G 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions github-actions Bot added the ready-to-merge Required CI checks have passed on this PR label Oct 2, 2026
Base automatically changed from cc/feat/native-json-recording to main October 2, 2026 22:12
@mustafab0
mustafab0 force-pushed the cc/feat/episode-json-status branch from 3d48ac1 to 510c6a7 Compare October 2, 2026 22:12
@github-actions github-actions Bot removed the ready-to-merge Required CI checks have passed on this PR label Oct 2, 2026
@github-actions github-actions Bot added the ready-to-merge Required CI checks have passed on this PR label Oct 2, 2026
@github-actions github-actions Bot added ready-to-merge Required CI checks have passed on this PR and removed ready-to-merge Required CI checks have passed on this PR labels Oct 3, 2026
@TomCC7
TomCC7 removed this pull request from stack #4397 October 6, 2026 09:22
@TomCC7
TomCC7 added this pull request to stack #4448 October 6, 2026 09:22
@mustafab0

Copy link
Copy Markdown
Contributor

I am not sure about the converting to json method.

We should just make a custom msg type in dimos msgs to keep things consistent.

@TomCC7
TomCC7 merged commit aea28cf into main Oct 7, 2026
37 checks passed
@TomCC7
TomCC7 deleted the cc/feat/episode-json-status branch October 7, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Required CI checks have passed on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants