Skip to content

feat: add timestamp_interval_us filtering to get_cuboid_track_observations()#50

Merged
janickm merged 1 commit intoNVIDIA:mainfrom
janickm:feat/timestamp-interval-cuboid-filtering
Mar 17, 2026
Merged

feat: add timestamp_interval_us filtering to get_cuboid_track_observations()#50
janickm merged 1 commit intoNVIDIA:mainfrom
janickm:feat/timestamp-interval-cuboid-filtering

Conversation

@janickm
Copy link
Collaborator

@janickm janickm commented Mar 17, 2026

Summary

  • Add an optional timestamp_interval_us: Optional[HalfClosedInterval] parameter to SequenceLoaderProtocol.get_cuboid_track_observations() that restricts returned observations to those whose timestamp_us falls within the half-closed interval [start, stop).
  • When None (default), all observations are returned — fully backward compatible.
  • Implement the filtering in SequenceLoaderV4.

Changes

  • ncore/impl/data/compat.py — Updated protocol signature with new optional parameter and docstring
  • ncore/impl/data/v4/compat.py — V4 implementation: iterates observations and yields only those matching the interval
  • ncore/impl/data/v4/compat_test.py — Comprehensive tests covering:
    • None returns all observations (backward compat)
    • Full interval returns all observations
    • Narrow interval correctly filters; all results satisfy the predicate
    • Disjoint interval returns 0 observations
    • Half-closed boundary semantics: start inclusive, stop exclusive

Related

  • Companion MR in ncore-internal implements the same for SequenceLoaderV3 with frame-range optimization.

@janickm janickm self-assigned this Mar 17, 2026
@janickm janickm force-pushed the feat/timestamp-interval-cuboid-filtering branch 2 times, most recently from 0e30e3e to 4b074fa Compare March 17, 2026 09:41
…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.
@janickm janickm force-pushed the feat/timestamp-interval-cuboid-filtering branch from 4b074fa to f70773b Compare March 17, 2026 13:01
@janickm janickm merged commit 9832a44 into NVIDIA:main Mar 17, 2026
5 checks passed
@janickm janickm deleted the feat/timestamp-interval-cuboid-filtering branch March 17, 2026 13:17
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