Skip to content

egocap: remove the capture server's GMSL frame-feed source - #1550

Merged
gareth-morgan-nv merged 2 commits into
mainfrom
gmorgan/EgocapRemoveGmslFeed
Nov 19, 2026
Merged

gareth-morgan-nv merged 2 commits into
mainfrom
gmorgan/EgocapRemoveGmslFeed

Conversation

@gareth-morgan-nv

@gareth-morgan-nv gareth-morgan-nv commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Removes the capture server's optional GMSL frame-feed camera source. The --gmsl-ipc mode made CaptureServer read camera frames directly from the receiver's CUDA IPC slots, JPEG-encode them and serve them as station cameras. Camera video reaches consumers through LiveKit and the launcher never used this mode, so it was a second direct reader of the receiver's GPU slots and extra surface to maintain.

What changed

  • Deletes the gmsl_ipc package (feed client, CUDA slot mapper, camera source) and its tests.
  • Removes the GMSL source factory from launch.py and the --gmsl-ipc, --gmsl-camera and --gmsl-fps options and their setup from server.py.
  • Removes the gmsl optional-dependency extra from pyproject.toml and the cupy and fastrlock entries from uv.lock; nothing else depended on them.
  • README: drops the --gmsl-camera reference and keeps the rule that a LiveKit stream name may not equal a configured camera name.
  • The sensing_gmsl camera type in operator settings is a different thing and is unchanged.

Validation

  • tests/capture_server: 779 passed, 0 failed (the 21 fewer than before are the removed GMSL tests); capture_server coverage 93%.
  • tests/tools: 120 passed, 2 skipped (those need tools from other PRs).
  • uv.lock and pyproject.toml parse; no cupy, fastrlock or gmsl references remain, and no repo references to the removed names remain.
  • capture-server --help has no GMSL options and --mock still parses; --gmsl-ipc is now rejected as an unrecognised argument.
  • ruff, ruff format and the pre-commit hooks on the changed files.
  • uv lock --check was not run: the installed uv cannot parse the project file, so the lock file was edited by hand and checked by parsing and grep only.

Known limitations / follow-ups

  • Anyone still running capture-server --gmsl-ipc loses that mode; the launcher and the LiveKit bridge path are unaffected.

Test plan

  • CI
  • Reviewer: confirm nothing outside this tree depends on --gmsl-ipc, and regenerate the lock with a current uv if preferred.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Changes
    • GMSL IPC camera-feed capture is no longer available in the example capture server. Its related command-line options and camera setup have been removed.
    • The optional GMSL dependency is no longer included.
    • LiveKit stream-name collision guidance now applies to any configured camera name, not only cameras specified with --gmsl-camera.

The optional --gmsl-ipc mode made CaptureServer read camera frames directly
from the receiver's CUDA IPC slots, JPEG-encode them and serve them as station
cameras. Camera video reaches consumers through LiveKit, so the mode was a
second direct reader of the GPU slots and extra surface to maintain.

Removes the gmsl_ipc package, the source factory and the --gmsl-ipc,
--gmsl-camera and --gmsl-fps options, their tests, and the gmsl dependency
extra with its lock entries.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Gareth Morgan <gmorgan@nvidia.com>
@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The egocap capture server no longer supports GMSL IPC camera feeds. The change removes the feed client, frame-source pipeline, launch integration, CLI options, related tests, and optional CuPy dependency. The standard source-factory setup remains. The README now states that LiveKit stream names must not match configured camera names.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Merge Risk: Minimal · previous review 685bb

This removes the unused optional GMSL camera feed mode from the capture server. The launcher and LiveKit camera path are unaffected, so merge risk is minimal. Anyone still running the removed --gmsl-ipc option will lose that mode.

Architecture risk: Medium · up to 685bb

The change affects 1 system.

Changed systems: examples

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — examples (service) was modified; 9 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in examples/egocap/capture_server/README.md: The README changes the LiveKit name-collision rule from names configured with --gmsl-camera to configured camera names generally.
  • observed — Modified behavior in examples/egocap/capture_server/capture_server/gmsl_ipc/init.py: The gmsl_ipc package initializer was deleted, including its module documentation and re-exports of the feed-related public names.
  • observed — Modified behavior in examples/egocap/capture_server/capture_server/gmsl_ipc/cuda_slots.py: The entire cuda_slots.py module was removed, including its CUDA IPC slot mapping and host-copy reader, idempotent handle-closing logic, lazy CuPy import, and FeedError handling for missing CuPy or mapping failures.
  • observed — Modified behavior in examples/egocap/capture_server/capture_server/gmsl_ipc/feed.py: The entire feed.py module was deleted. It defined feed errors and stream/frame data types, socket and handshake handling, a catalog probe, and FeedClient subscription, slot mapping, latest-notice and wait APIs, reader-failure reporting, and cleanup. The handshake required a hello, rejected unsupported publishers lacking subscriptions, sent a stream subscription, and required a subscribed reply; client connection also failed if requested streams were absent or slot mapping failed.

Reliability and maintainability

  • inferred — Risk-relevant change factors for examples: blast_radius_1; direct_dependents_1
Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: removal of the GMSL frame-feed source from the egocap capture server. The changeset deletes the gmsl_ipc package, the source factory, the GMSL CLI options, the gmsl ex…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: removal of the GMSL frame-feed source from the egocap capture server. The changeset deletes the gmsl_ipc package, the source factory, the GMSL CLI options, the gmsl extra, and the GMSL tests. The title matches the objectives and the file-level summaries.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 9fb23f6 and 685bbc5.

Files ignored due to path filters: 1

  • examples/egocap/uv.lock is excluded by !**/*.lock
Files selected for processing: 9

  • examples/egocap/capture_server/README.md
  • examples/egocap/capture_server/capture_server/gmsl_ipc/__init__.py
  • examples/egocap/capture_server/capture_server/gmsl_ipc/cuda_slots.py
  • examples/egocap/capture_server/capture_server/gmsl_ipc/feed.py
  • examples/egocap/capture_server/capture_server/gmsl_ipc/source.py
  • examples/egocap/capture_server/capture_server/launch.py
  • examples/egocap/capture_server/capture_server/server.py
  • examples/egocap/pyproject.toml
  • examples/egocap/tests/capture_server/test_gmsl_ipc.py
Files with no reviewable changes: 7

  • examples/egocap/capture_server/capture_server/gmsl_ipc/init.py
  • examples/egocap/capture_server/capture_server/gmsl_ipc/cuda_slots.py
  • examples/egocap/capture_server/capture_server/gmsl_ipc/feed.py
  • examples/egocap/capture_server/capture_server/gmsl_ipc/source.py
  • examples/egocap/capture_server/capture_server/launch.py
  • examples/egocap/pyproject.toml
  • examples/egocap/tests/capture_server/test_gmsl_ipc.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.

@NVshawnhwang

Copy link
Copy Markdown
Collaborator

Automated review

The PR removes the optional GMSL frame-feed source (the gmsl_ipc package, the launch.py factory, the CLI options in server.py, the gmsl extra, and the cupy/fastrlock lock entries). I found no dangling references: repo-wide greps for gmsl-ipc, gmsl_camera, FeedError, slot_mapper, and cupy/fastrlock in the egocap pyproject and lock came back empty. The LiveKit stream-name clash check still exists in ServerConfig (server.py:210), so the README rewording is accurate. The only residual risk is the hand-edited uv.lock, which the author already flagged.

No issues found.

✅ Nothing blocking left from my side — auto-review of this one is now finished.


🤖 Sent by Shawn's Claude — automatic reply. Shawn hasn't reviewed this personally yet; treat it as a first pass.

@NVdejung NVdejung left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🤖 Automated first-pass review (Claude, for Dejun) — I'll follow up personally where needed.

Summary — This PR deletes the capture server's optional GMSL frame-feed source: the gmsl_ipc package and its tests, the GMSL factory in launch.py, the three --gmsl-* options, and the gmsl extra with its lock entries. The removal is complete. Nothing in this repository still imports the deleted modules or passes the removed flags or extra (the launcher never did, and sensing_gmsl is only an operator label, see operator_settings.py:45). Deployments outside the repository are the one thing I can't check. Two small suggestions, nothing blocking.

Must fix

None found. The internal-name scan of the added lines, title and description found nothing.

Suggestions

  • examples/egocap/uv.lock:254 — The lock was edited by hand, and uv lock --check was never run. No checked-in CI job will catch a problem either: neither .github/workflows, .gitlab-ci.yml nor the pre-commit config runs this tree's tests or checks its lock. So the "CI" box in the test plan tells you nothing about examples/egocap. I read the lock at head. It removes exactly what uv would: the cupy-cuda12x and fastrlock blocks, the gmsl optional-dependency group, its requires-dist row and the provides-extras entry. fastrlock had no other dependent, and removing a package only drops constraints, so a re-lock should leave the file unchanged. Still, please run uv lock --check (or regenerate the lock) with a uv that parses the project before merging. It takes one command and settles the unchecked box.
  • examples/egocap/capture_server/capture_server/server.py:2194 — The comment no longer mentions FeedError, but the except still catches RuntimeError, which the old comment said was there for the feed. Nothing in the try block raises it directly any more: load_episode raises EpisodeFormatError/FileNotFoundError, and the remaining raise RuntimeError sites all run during a session. Either drop it, or keep it on purpose (for example, for zarr or OpenCV errors during episode load) and say so in the comment. Otherwise an unexpected setup RuntimeError prints as a one-line capture-server: error with exit 2 instead of a traceback. Low priority.

Conflicts

  • With main: 0 commits behind (the merge-base is main's head), and the local 3-way merge is clean, so no rebase is needed. GitHub's blocked state is branch protection, not a conflict.
  • With open PRs: #1551, #1552 and #1553 (dependabot bumps of opentelemetry-api, certifi and pillow) also change examples/egocap/uv.lock. There is no textual conflict, because their hunks are nowhere near the removed blocks. There is no semantic one either: none of those packages depends on cupy or fastrlock. They can merge in any order. If dependabot rebases one of them after this PR lands, it regenerates the lock from the new pyproject.toml, which also independently checks this hand edit.
Change-by-change (10 files)

Paths are relative to examples/egocap/. I read the deleted files in full to confirm nothing else depends on them.

File / area What changed Makes sense?
capture_server/README.md (L1253) LiveKit name-clash rule no longer tied to --gmsl-camera ✅ matches the check in server.py:209 (cameras plus known_cameras), tested at test_livekit_streams.py:246
capture_server/capture_server/gmsl_ipc/ (__init__.py, feed.py, cuda_slots.py, source.py) Package deleted: feed client, CUDA IPC slot mapper, frame-feed Pipeline ✅ nothing in the repo imports it any more
capture_server/capture_server/launch.py (L27) Removes GmslCamera, gmsl_station_cameras, build_gmsl_source_factory, _FeedAcquisition, the dataclass and type-checking imports, and their __all__ entries ✅ every remaining import is still used
capture_server/capture_server/server.py CLI (L1993, L2217) Removes --gmsl-ipc (from the source group), --gmsl-camera, --gmsl-fps, _gmsl_cameras, _gmsl_setup, the _run_cli branch and the two main checks; rewords the --camera error ✅ --camera with --mock or --replay is still rejected and tested (test_cli.py:13, test_replay.py:390); the untouched group comment ("with neither flag…") is accurate again
capture_server/capture_server/server.py _run_cli (L2194) Setup-error comment no longer mentions FeedError ⚠️ nothing in the try block raises RuntimeError directly any more (see suggestions)
pyproject.toml (L59) gmsl extra removed ✅
uv.lock (L254) cupy-cuda12x, fastrlock and the gmsl extra metadata removed by hand ⚠️ consistent by inspection, not checked by uv (see suggestions)
tests/capture_server/test_gmsl_ipc.py Deleted (21 tests) ✅ tested only the deleted code; its shared helpers still have other users

Reviewed at 685bbc5 · 10 files · 2026-11-18 14:39 PST

@NVshawnhwang NVshawnhwang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed at 685bbc5. No actionable findings.

The GMSL frame-feed removal is complete: no remaining references to the removed API or flags were found under examples/egocap, and the launcher continues to use the unchanged LiveKit path. The deleted tests cover the removed functionality.

Independently validated locally:

  • Capture-server and tools suites: 899 passed, 2 skipped.
  • uv lock --check --offline with uv 0.13.7: passed, closing the lockfile validation gap noted in the description.
  • Ruff lint and formatting checks on the changed Python files: passed.
  • CLI help and parsing: --mock parses and --gmsl-ipc is rejected as intended.

External deployments that still use --gmsl-ipc remain outside the scope of repository verification.

Reviewed with Codex.

The setup except clause caught RuntimeError for the removed GMSL frame
feed. Nothing in setup raises it directly any more, so an unexpected
one now shows a traceback instead of a one-line error.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Gareth Morgan <gmorgan@nvidia.com>
@gareth-morgan-nv
gareth-morgan-nv enabled auto-merge (squash) November 19, 2026 02:12
@gareth-morgan-nv

Copy link
Copy Markdown
Contributor Author

@NVdejung thanks for the review. Both suggestions are handled:

  • uv.lock: Shawn ran uv lock --check --offline with uv 0.13.7 and it passed, which covers the hand-edited lock.
  • RuntimeError in the setup except: removed in 566c8d9. Nothing in that block raises it directly any more, so an unexpected one now shows a traceback instead of a one-line error. The capture-server tests (779) and ruff pass.

🤖 Generated with Claude Code

@gareth-morgan-nv
gareth-morgan-nv merged commit 6de5102 into main Nov 19, 2026
43 checks passed
@gareth-morgan-nv
gareth-morgan-nv deleted the gmorgan/EgocapRemoveGmslFeed branch November 19, 2026 02:17

This branch was successfully deployed

1 active deployment
dev — 566c8d90 Deployed Nov 19, 2026 by gareth-morgan-nv via publish-wheel #7104
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants