feat(data): migrate zarr v2 → v3 (3.1.6) with zero-dead-space itar writes#68
Draft
janickm wants to merge 1 commit intoNVIDIA:mainfrom
Draft
feat(data): migrate zarr v2 → v3 (3.1.6) with zero-dead-space itar writes#68janickm wants to merge 1 commit intoNVIDIA:mainfrom
janickm wants to merge 1 commit intoNVIDIA:mainfrom
Conversation
…ites Migrate ncore data layer from zarr-python 2.x to zarr-python 3.1.6. New .zarr.itar files are written in zarr format 3; existing v2 .zarr.itar files remain readable (backwards compatible). Core changes: - Rewrite IndexedTarStore as zarr3 Store ABC implementation with async methods, byte range support, and consolidated metadata intercept - All zarr.json writes are deferred in memory and flushed once on close(), guaranteeing zero dead space in tar archives - Root zarr.json is intercepted at flush time and compressed as zarr.cbor.xz (CBOR+LZMA consolidated metadata format) - Transparent fallback for legacy v2 .zmetadata.cbor.xz on read - Update components.py to zarr3 APIs (create_array, attrs.update, group.members/groups, LocalStore, consolidated metadata) Cleanup: - Drop Python 3.8 support: remove toolchain, pip targets, lockfiles - Remove sys.version_info guards in types.py, base.py, transformations.py - Simplify dataclass decorators to unconditional slots=True, kw_only=True Dependencies: - zarr>=3.1.6, cbor2>=5.9.0, python_requires>=3.11 - Lockfile regeneration blocked by numpy<2 / torch constraint conflict
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
Migrate the ncore data layer from zarr-python 2.x to zarr-python 3.1.6. New
.zarr.itarfiles are written in zarr format 3; existing v2.zarr.itarfiles remain fully readable (backwards compatible).Core changes
StoreABC with async methods, byte range support, and consolidated metadata interceptzarr.jsonwrites are deferred in memory and flushed exactly once onclose()— no duplicate records in the tar archive regardless of how many times zarr3 rewrites metadatazarr.jsonintercepted at flush time → compressed aszarr.cbor.xz(CBOR+LZMA).zmetadata.cbor.xzfilescreate_array(),attrs.update(),group.members()/group.groups(),LocalStore, consolidated metadataPython 3.8 dropped
sys.version_infoguards intypes.py,base.py,transformations.py@dataclassdecorators to unconditionalslots=True, kw_only=TrueDependencies
zarr>=3.1.6,cbor2>=5.9.0,python_requires>=3.11Files changed (14 files, +650 / -671)
ncore/impl/data/stores.pyncore/impl/data/stores_test.pyncore/impl/data/v4/components.pyncore/impl/data/v4/components_test.pyncore/impl/data/types.pyncore/impl/data_converter/base.pyncore/impl/common/transformations.pydeps/pip/requirements_ncore.inncore/BUILD.bazelMODULE.bazelpyproject.tomldeps/pip/BUILD.bazeldeps/pip/requirements_3_8.indeps/pip/requirements_3_8.txtTest Plan
stores_test.py— 3/3 pass (consolidated metadata round-trip, reserialization)components_test.py— 6/6 pass (reload itar, reload directory, new component extension)compat_test.py— requires Bazel +@test-data-v4archive (cannot run outside Bazel)numpy<2/torch==1.13.0constraint conflictKnown blockers
zarr>=3.1.6requiresnumpy>=2.0, buttorch==1.13.0+cu116requiresnumpy<2. Lockfile cannot be regenerated until torch is upgraded.@test-data-v4archive from GitHub Packages.