Pre commit#9
Closed
HsingjuiKu wants to merge 13 commits into
Closed
Conversation
fix: record rollouts with multiple ranks
feat: log slurm env vars to wandb config
Fixing reward normalizer
3 tasks
shuheng-liu
added a commit
that referenced
this pull request
May 24, 2026
Resolves the four new concerns surfaced by the review on f05e60e: - Per-call warning flood (#9): the explicit-`backend="torchcodec"` fallback warning used to fire on every `decode_video_frames` call (~96k copies over a 2k-step run with batch_size=8, 3 video keys). Move it behind `_warn_explicit_torchcodec_unloadable()`, a `@functools.cache`'d sentinel that emits exactly once per process. - Redundant `@functools.cache` on `get_safe_default_codec` (#11): the inner `_load_torchcodec_videodecoder` is already cached, and caching the str-translating wrapper additionally violates `default_factory`'s fresh-instance-per-call contract if the return type ever broadens past `str`. Dropped. - Fragile "see prior warning" raise (#12): the probe's logged exception could be silently dropped (probe fires before init_logging) or rotated out. Probe now returns `(VideoDecoder, exc) | (None, exc)`, and `decode_video_frames_torchcodec` raises with the cached exception's repr and chains it via `raise ... from probe_exc`. Failure mode is now self-contained. - Silent explicit-backend downgrade undocumented (#10): added a paragraph to `decode_video_frames`'s docstring naming the fallback, pointing out that pyav and torchcodec pick frames via non-equivalent logic, and telling strict callers to consult `_load_torchcodec_videodecoder()` before dispatch.
3 tasks
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 this does
Explain what this PR does. Feel free to tag your PR with the appropriate label(s).
Examples:
How it was tested
Explain/show how you tested your changes.
Examples:
test_somethingintests/test_stuff.py.new_featureand checked that training converges with policy X on dataset/environment Y.some_function, it now runs X times faster than previously.How to checkout & try? (for the reviewer)
Provide a simple way for the reviewer to try out your changes.
Examples:
SECTION TO REMOVE BEFORE SUBMITTING YOUR PR
Note: Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR. Try to avoid tagging more than 3 people.
Note: Before submitting this PR, please read the contributor guideline.