feat: add timestamp_interval_us filtering to get_cuboid_track_observations()#50
Merged
janickm merged 1 commit intoNVIDIA:mainfrom Mar 17, 2026
Conversation
0e30e3e to
4b074fa
Compare
…tions() Add an optional HalfClosedInterval parameter to SequenceLoaderProtocol.get_cuboid_track_observations() that restricts returned observations to those whose timestamp_us falls within [start, stop). When None (default), all observations are returned (backward compatible). Implements filtering in SequenceLoaderV4 and adds comprehensive tests covering half-closed interval semantics, boundary conditions, and disjoint intervals.
4b074fa to
f70773b
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
timestamp_interval_us: Optional[HalfClosedInterval]parameter toSequenceLoaderProtocol.get_cuboid_track_observations()that restricts returned observations to those whosetimestamp_usfalls within the half-closed interval[start, stop).None(default), all observations are returned — fully backward compatible.SequenceLoaderV4.Changes
ncore/impl/data/compat.py— Updated protocol signature with new optional parameter and docstringncore/impl/data/v4/compat.py— V4 implementation: iterates observations and yields only those matching the intervalncore/impl/data/v4/compat_test.py— Comprehensive tests covering:Nonereturns all observations (backward compat)Related
ncore-internalimplements the same forSequenceLoaderV3with frame-range optimization.