Repository navigation
5.9.0
This release makes per-slide extraction results available to callers as they land rather than only at the end of a run, clears a crash in distributed HuggingFace authentication, and aligns preprocessing with hs2p 4.4.3.
Added
- Per-slide completion callback.
Pipeline.run_with_coordinatesandModel.embed_tilesaccept an optionalon_slide_persistedcallable, invoked in the calling process once per persisted(sample_id, annotation)unit with that unit'sTileEmbeddingArtifact(orHierarchicalEmbeddingArtifact), after the artifact is complete on disk. Withnum_gpus > 1it fires as each rank reports a finished slide, so a caller can act on one slide while the others are still running — no more splitting extraction into repeated calls that relaunch torchrun and reload the encoder on every rank. Zero-tile slides, resume-skipped slides, and failed slides do not fire it; an exception raised inside it propagates out of the entry point. Omitting the argument leaves every return value unchanged. (#311)
Fixed
- Distributed extraction no longer dies during HuggingFace login.
load_modelcalledhuggingface_hub.login()on every model load. Under distributed extraction every rank re-ran it per chunk, andlogin()truncates and re-reads the sharedstored_tokensfile without a lock, so concurrent ranks raced and failed withValueError: Token ... not found.load_modelnow exports an explicittoken=asHF_TOKENfor the process and never touches disk. Gated weights still authenticate — but note that nothing logs in implicitly any more, so setHF_TOKEN(or passtoken=) when pulling gated repos. (#308)
Changed
- Requires hs2p >= 4.4.3. The hs2p public API is unchanged from 4.4.2; the release is preprocessing-internal, lowering tiling and mask-decoding memory use. Existing coordinate and embedding artifacts stay valid. (#312)
- Codebase cleanup. 208 net lines removed across 20 files — unused inference imports, unreachable fallbacks, redundant CUDA detection and window helpers, repeated process-list reads, and tests keyed to filenames or line counts. Inference, artifact, and configuration behavior is unchanged. (#309)