github NVIDIA/ncore v20.0.0-alpha.2

pre-release3 hours ago

Highlights

Second pre-release of NCore 20, for testing in downstream projects before the 20.0 release. Install with pip install --pre nvidia-ncore or nvidia-ncore==20.0.0a2. It adds asynchronous APIs at the sequence level, faster opening of remote sequences, and lower memory use of opened sequences; see the v20.0.0-alpha.1 release for the zarr-python 3 support, faster reads and API changes of NCore 20.

Asynchronous compat API

  • AsyncSequenceLoaderProtocol and the asynchronous sensor / labels / point-cloud protocols (ncore.data) extend the synchronous protocols with *_async reads (e.g. get_frame_data_async, get_frame_point_cloud_async). SequenceLoaderV4 implements them via the asynchronous component reads; use isinstance(loader, AsyncSequenceLoaderProtocol) to check a loader.
  • SequenceLoaderProtocol.query_camera_labels returns a Sequence instead of a List.

Opening sequences

  • Remote .itar component stores (asynchronous fsspec filesystems, e.g. s3fs) are opened with a single suffix range request (one more if the index doesn't fit into itar_index_tail_read_size), instead of five requests per store. This applies to the existing synchronous APIs as well.
  • SequenceLoaderV4.open_async / SequenceComponentGroupsReader.open_async open sequences without blocking the event loop, so opening many sequences concurrently overlaps their requests; max_concurrent_requests bounds the stores opened at once (a number, or an asyncio.Semaphore shared by sequences). 64 sequences of 2 stores on an S3-compatible object store open in 0.10 s per sequence with open_async, compared to 2.7 s per sequence one after another and 0.59 s with 16 threads before.
  • s3fs bounds the requests in flight by its connection pool (max_pool_connections, default 10); raise it to open many stores concurrently.

Memory of opened sequences

  • Readers release the tail read of each .itar store (the end of the archive read when opening it, up to 1 MiB) once its hierarchy is opened from its consolidated metadata, and only keep the decoded index: 0 MiB instead of 22 MiB of tail reads held for the 35 stores of the test sequence. Records near the end of the archives are read from storage when accessed. itar_index_tail_retention="keep" restores the previous behavior, "keep_complete_archives" keeps the tail reads of small stores that fit into them completely.

Camera models

  • The inverse of OpenCVFisheyeCameraModel (image points to rays) converges for calibrations where it previously didn't (errors of more than 1 rad, or NaN): Newton iterations safeguarded by a bracket on the increasing branch of the polynomial. newton_iterations is an upper bound now (default 20 instead of 3); well-conditioned calibrations cost the same as before.

Changes below the components since v20.0.0-alpha.1

  • IndexedTarArchive is restructured: its index (de)serialization, record index and record sources are separate internal classes. Its public methods are unchanged; IndexedTarArchive.open_async / IndexedTarZarrStore.open_async are added.
  • Readers no longer check .itar paths for existence before opening them (requests that added latency on remote storage): a missing archive still raises FileNotFoundError, from reading its index.

Changes since v20.0.0-alpha.1

➕ Added

🪲 Fixed

  • (sensors) apply the converged Newton step in the bracketed fisheye inverse (16d2f65) - @janickm
  • (sensors) bracket the OpenCV fisheye inverse to the monotonic branch (71a0602) - @janickm

⚡ Performance

  • (data) release index tail reads of opened archives (10c2609) - @janickm
  • (data) open remote indexed tar archives with a single request (f57784c) - @janickm

🔄 Changed

⚙️ CI

  • release notes tool in Python, commit check in build-and-test (069aee8) - @janickm

🏗️ Build

All changes since v19.8.0

➕ Added

🪲 Fixed

  • (sensors) apply the converged Newton step in the bracketed fisheye inverse (16d2f65) - @janickm
  • (sensors) bracket the OpenCV fisheye inverse to the monotonic branch (71a0602) - @janickm
  • (data) read single poses with their stored dtype (1de0192) - @janickm
  • type narrowing in ncore_export_ply and the argoverse2 converter test (348262a) - @janickm
  • (kitti) keep lidar point timestamps integer (5bf8f9f) - @janickm

⚡ Performance

  • (data) release index tail reads of opened archives (10c2609) - @janickm
  • (data) open remote indexed tar archives with a single request (f57784c) - @janickm
  • (data) direct chunk reads with zarr-python 3 (979882a) - @janickm
  • (data) node cache for component readers (0d6c43d) - @janickm
  • (data) cache decoded label types and schemas in CameraLabelDescriptor.from_dict (1813046) - @janickm
  • (data) load label and point-cloud reader data on first use (fe6eaf2) - @janickm

🔄 Changed

  • (data) restructure IndexedTarArchive (fd9a4f0) - @janickm
  • BREAKING (data) implement IndexedTarArchive independently of zarr-python (cd3078f) - @janickm

⚙️ CI

🏗️ Build

🎨 Style

🧪 Tests

Changes since v20.0.0-alpha.1: v20.0.0-alpha.1...v20.0.0-alpha.2
Full diff: v19.8.0...v20.0.0-alpha.2

Don't miss a new ncore release

NewReleases is sending notifications on new releases.