Skip to content

2026-09-18 NanoVirDx scalar samples and conda release

Refactored NanoVirDx to scalar path-backed samples, isolated DiffSim compatibility, and added internal conda release automation.

Work Done

  • Replaced every NanoVirDx *Batch struct-of-lists with scalar *Sample dataclasses. Predictors now consistently accept and return lists while preserving input order and top-level cardinality.
  • Preserved the intentional one-to-many Histo preprocessing relationship as PreprocessingOutputSample.components: list[WSISample].
  • Moved fine28 mapping, nine-tissue parameters, sparse Histo v2 region loading, and DiffSim 0.1.100 compatibility into inference/simulation/_compat.py. Reduced diffsim.py to simulation sequencing and output translation.
  • Finished the user’s vxData adapter extraction. Both get_*_by_uid functions accept an optional client, instantiate their own fallback only for non-empty inputs, preserve requested ordering and duplicates, handle local/S3 paths, and include nuclei maps.
  • Added a NanoVirDx conda recipe and manual release workflow. The workflow reads the hardcoded pyproject.toml version and uploads only to the internal Artifactory virdx channel.
  • Removed stale README examples for APIs that are not implemented and documented the list-of-samples contract.
  • Validated Ruff, Pyright, compileall, focused mocked contracts, full synthetic fine28 simulation, finite MRI outputs, wheel contents, conda render, actionlint, module boundaries, and diff checks.
  • Committed and pushed mono commits 791be45a and 67a029d2 to origin/fk/nanovirdx.
  • Added ISUPGradePredictor and PICAIPredictor placeholder interfaces whose setup() and predict() methods explicitly raise NotImplementedError; pushed mono commit 1d6c28c5.
  • Added Gleason, tissue, and expanded-cell component predictors as projections of the Histo v2 domain pipeline; removed the unsupported WSIEmbeddingSample placeholder because Histo has no persisted FeatureGrid contract; pushed mono commit 1b37a2b1.
  • Added EmbeddingGenerator writing a slide-level H-optimus token mosaic with valid-core ownership over Histo’s super-window lattice; reinstated WSIEmbeddingSample(path) as a NanoVirDx-owned Zarr artifact contract; pushed mono commit 26f2a957. Correction: Histo has a stable in-memory FeatureGrid API; only the persisted format was missing.
  • Rebuilt Gleason, tissue, and cell predictors on Histo’s official head pathways (load_gleason_head/run_gleason_segmentation, load_tissue_head/run_tissue_segmentation, load_cell_head/run_cell_detection) via a shared WsiHeadSweep over Histo’s super-window lattice; renamed the settings bridge to _compat_dr_v2_config.yaml; typed settings as PipelineSettings; pushed mono commit bb61748a.
  • Added explicit nanovirdx.inference.__init__ exports (from nanovirdx.inference import DomainRepresentationPredictor, ISUPGradePredictor, ...) plus empty subpackage __init__.py files; heavy runtimes stay lazy in setup(); pushed mono commit 0330a4d1.

Lessons Learned: Pitfalls

  • Running independent workers in one shared worktree requires strict file ownership. The broad sample migration worker therefore produced a read-only design while the other workers owned only new, non-overlapping files.
  • Domain-representation downloads need one coherent directory per resource because DiffSim discovers conventionally named maps from a directory. Downloading multiple representations into one flat destination risks collisions.
  • Empty predictor inputs should return before model setup; otherwise predict([]) can needlessly load large Histo or DiffSim state.

Lessons Learned: Improvements

  • Add a small NanoVirDx project/test target so the scalar sample and optional-client contracts run in CI rather than only through focused validation scripts.
  • Remove _compat.py after DiffSim publishes Cedrik’s region_ids-aware name mapping support.
  • Remove the vendored Histo settings after Histo packages a supported default-settings resource.
Navigation

Type to search…

↑↓ navigate↵ selectEsc close