Skip to content

hidefix adoption: upstream index save/load PR + dependency discussion (compiled reads, #148 offset cache) #155

Description

@espg

🤖 from Claude

Opened at espg's direction on #149 (comment). Decision recorded there: hidefix is the intended mechanism for both the compiled read step and #148's phase (2b) chunk-offset cache — this issue is the dependency discussion (per the repo's add-a-dependency convention) plus the upstream work it's contingent on.

Evidence (PR #150, bench/h5coro/results/REPORT.md + hidefix_spike_notes.md)

  • Byte-identical on the full captured worker workload (sha256 gate, o9 + o10, incl. the 2-D shuffled int8 signal_conf_ph, native hyperslices): 15.5 s (o10) / 20.8 s (o9) vs 93.5 / 129.0 baseline, at ~55–60% of baseline RSS.
  • Those rows include in-process chunk-index construction (~10.6 s of the o10 15.5 s, ≈0.2 s/granule). With a pre-built serialized index the replay is ~4.9 s / ~7.9 s → ~19× / 16×, faster than the C++ shim ceiling (10.3 / 14.2 s) because the shim re-parses HDF5 metadata every run. The hidefix rows are a floor, not a cap.
  • The serialized index (~600 KB per ~1.9 GB granule, bincode/flexbuffers) carries exactly the per-chunk (addr, size, offset) + dtype/shape/filter payload add 88 south stress test shard + benchmark #148's offset cache needs, as public documented crate types.

Blocker: the Python binding surface

The binding today cannot save, load, or enumerate the index (pickle raises TypeError; no save/load methods) — the crate itself supports serialization (the hfxidx CLI proves it). Upstream PR needed: expose index serialize/deserialize (+ ideally chunk enumeration) in the Python binding. Small and self-contained.

Dependency discussion (expanded here, per the #149 thread)

  1. Licenseambiguous upstream; needs clarification (see the correction comment below): the repo's LICENSE file is MIT (added 2023, what GitHub shows), while Cargo.toml/crates.io/PyPI metadata declare LGPL-3.0-or-later on every release incl. 0.12.0. Ask upstream to reconcile. If MIT, this item evaporates; if LGPL, dynamically-linked Python extension use is the normal-case-fine reading, but the Lambda-layer redistribution posture should be confirmed deliberately.
  2. Transitive py-deps — the pip package hard-depends on xarray/netcdf4/pandas. pandas is already pinned in the layer; xarray + netcdf4 are new weight that must be measured against the 250 MB dual-arch gate (or upstream could loosen them to extras).
  3. No linux-aarch64 wheel on PyPI — source build with pinned Rust in the layer pipeline (working recipe: bench/h5coro/Containerfile.hidefix, --locked, maturin pinned) or vendor a wheel the way the spherely fork is handled.
  4. S3 read story — the binding is local-file only. Options: (1) upstream a range-reader/S3 driver, (2) an obstore-backed reader feeding hidefix's decode (obstore already ships in the layer), (3) staged/presigned local reads. Needs a spike; this is the main unknown between "benchmarks well locally" and "works in the Lambda worker".
  5. Maintenance posture — single-maintainer crate (gauteh), MIT-era activity is healthy; upstream receptivity to the save/load PR is the cheapest early signal.

Proposed sequence

  1. Upstream index save/load PR (unblocks everything; also de-risks (5))
  2. S3 read spike against the captured-workload harness (PR h5coro read-path benchmark: profile + 4-variant comparison (issue #149) #150's bench/h5coro/)
  3. Dependency sign-off in this thread
  4. Wire into add 88 south stress test shard + benchmark #148 phase (2b): extraction produces per-granule indices at catalog time; workers read chunks with zero HDF5 metadata I/O

Refs #149, #148; evidence in PR #150.

(Left unlabeled for espg to triage.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions