Sync load_physical_aiavdataset docstring with the code#83
Open
lonexreb wants to merge 1 commit intoNVlabs:mainfrom
Open
Sync load_physical_aiavdataset docstring with the code#83lonexreb wants to merge 1 commit intoNVlabs:mainfrom
lonexreb wants to merge 1 commit intoNVlabs:mainfrom
Conversation
Two small accuracy issues: 1. ``t0_us`` was documented as "If None, uses a timestamp 5.1s seconds into the clip." The signature is ``t0_us: int = 5_100_000`` — there is no None-handling, and passing None raises ``TypeError`` at the ``t0_us <= history_time_range_us`` comparison. Update the doc to describe the actual default and the precondition the function enforces. 2. The default ``camera_features`` order in the doc didn't match the code. Same set of four cameras, but listed in a different sequence, which is misleading when readers cross-reference. Update the doc to match the code order, and note that the returned ``image_frames`` are sorted by camera index regardless of input order (so this list controls *which* cameras load, not *in what order* they appear in the output). Pure docstring change — no behavioral effect. Signed-off-by: lonexreb <[email protected]>
8061a83 to
23c8147
Compare
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.
Summary
Two small accuracy issues in the `load_physical_aiavdataset()` docstring:
1. `t0_us` doesn't actually accept None
The doc says:
But the signature is `t0_us: int = 5_100_000` and there's no None-handling. Passing `None` crashes at the precondition check:
```python
Updated to describe the actual default (`5_100_000`) and surface the implicit precondition (`t0_us > num_history_steps * time_step * 1_000_000`).
2. Default `camera_features` order is misleading
The doc listed the cameras in a different order from the code. Same set of four, just rearranged. Cross-referencing a doc'd order against the code order is needlessly confusing. Updated to match the actual code ordering and added a note that `image_frames` is sorted by camera index in the output regardless of the input order — so this argument controls which cameras load, not the output sequence.
Test plan
Out of scope
This doesn't change the parameter annotation to `int | None`. If maintainers want the docstring promise honored at the code level instead, I'm happy to swap the fix direction in a follow-up.