Skip to content

eval: overlay videos play at the source rate under DDP - #666

Draft
RyanPCo wants to merge 1 commit into
ryanco/hpt-devicefrom
ryanco/eval-video-fps
Draft

RyanPCo wants to merge 1 commit into
ryanco/hpt-devicefrom
ryanco/eval-video-fps

Conversation

@RyanPCo

@RyanPCo RyanPCo commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

_video_fps divided 30 fps by world_size to undo a DistributedSampler stride
that never applies: the val heads are CombinedLoaders Lightning does not
shard (every rank runs every val batch; 1 rank = 223 val steps, 8 ranks =
8 x 223 in the 2026-09-16 DDP check), so rank 0 renders every frame and the
8-GPU videos came out as 8x slow motion (416 frames at 4 fps).

🤖 Generated with Claude Code

https://claude.ai/code/session_01HjCQBqQCr2igFEMR7yUovw

RyanPCo commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@RyanPCo
RyanPCo force-pushed the ryanco/eval-video-fps branch from 4bbefe4 to f0507d5 Compare September 20, 2026 19:09
@RyanPCo
RyanPCo force-pushed the ryanco/deterministic-eval-mixin branch 2 times, most recently from ad1ccef to 2dee1f0 Compare September 21, 2026 18:45
@RyanPCo
RyanPCo force-pushed the ryanco/eval-video-fps branch from f0507d5 to ec1546b Compare September 21, 2026 18:45
@RyanPCo
RyanPCo force-pushed the ryanco/deterministic-eval-mixin branch from 2dee1f0 to 249e508 Compare September 22, 2026 13:18
@RyanPCo
RyanPCo force-pushed the ryanco/eval-video-fps branch from ec1546b to 1f628fa Compare September 22, 2026 13:18
@RyanPCo
RyanPCo force-pushed the ryanco/eval-video-fps branch from b6f9d4d to 26eb53e Compare October 12, 2026 21:50
@RyanPCo
RyanPCo force-pushed the ryanco/eval-video-fps branch from 26eb53e to 362dd61 Compare October 12, 2026 23:19
@RyanPCo RyanPCo mentioned this pull request Oct 19, 2026
@RyanPCo
RyanPCo force-pushed the ryanco/eval-video-fps branch 2 times, most recently from 65fea4d to 9d8c5a2 Compare October 19, 2026 20:22
@RyanPCo
RyanPCo force-pushed the ryanco/eval-video-fps branch from 9d8c5a2 to 2679b17 Compare October 30, 2026 18:27

@RyanPCo RyanPCo left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Automated adversarial review (read-only; findings were checked by a second skeptical pass before posting): 1 medium, 1 nit.

Comment thread egomimic/eval/eval_video.py Outdated
sampler stride that never applied, which made every multi-GPU video a
``world_size``-times slow-motion (416 frames at 4 fps instead of 30).
"""
return int(source_fps)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

medium (correctness): This is only right when val_dataloader returns a list. With a single head (train_viz=false, no unseen-op split, no video episodes), val_dataloader returns a bare CombinedLoader. Lightning then injects a DistributedSampler into its inner DataLoaders, so rank 0 renders every W-th frame and a fixed 30 fps gives a W-times fast-forward video. Either always return a list from val_dataloader so sharding does not depend on the number of heads, or keep the world_size division for the single-loader case, and add a test for that path.

Comment thread egomimic/eval/eval_video.py Outdated
sampler stride that never applied, which made every multi-GPU video a
``world_size``-times slow-motion (416 frames at 4 fps instead of 30).
"""
return int(source_fps)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

nit (simplification): _video_fps now just returns int(source_fps), and its only caller uses the default. Consider a VIDEO_FPS = 30 constant with a one-line why ('val loaders are unsharded, so rank 0 renders every frame') in place of the 11-line docstring with the 2026-09-16 measurement and the account of the old bug. Later PRs in the stack (eval_video._write_video, pl_data_utils._video_gate) point to 'see _video_fps', so those references would need to move too. The world_size loop in the test then has nothing to test.

_video_fps divided 30 fps by world_size to undo a DistributedSampler stride
that never applies: the val heads are CombinedLoaders Lightning does not
shard (every rank runs every val batch; 1 rank = 223 val steps, 8 ranks =
8 x 223 in the 2026-09-16 DDP check), so rank 0 renders every frame and the
8-GPU videos came out as 8x slow motion (416 frames at 4 fps).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01THTuWdgk6M6pZ5Ya7ihZEF
@RyanPCo

RyanPCo commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Review findings: status after the fixup pass. The fixes are squashed into this PR's commits, and the whole stack was force-pushed.

Fixed

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