Migrate dense_slide_extraction off hs2p's removed TilingConfig.tissue_threshold (#97)#103
Merged
Merged
Conversation
…_threshold (#97) hs2p 4.2.0 (clemsgrs/hs2p#158) collapsed the derived TilingConfig.tissue_threshold scalar into the resolved min_coverage map (min_coverage["tissue"] is the tissue threshold, the single source of truth). soma's slide-manifest dense path constructed hs2p.TilingConfig(tissue_threshold=...) directly, which now raises TypeError. - dense_slide_extraction._build_tiling_config: feed min_coverage={"tissue": ...} instead of the removed scalar. The per-class sampling map still flows separately through _resolve_sampling_spec_from_masks(masks, ...); this tiling-level entry only feeds the result's binary min_tissue_fraction provenance, so ROI coordinates and the dense cache key (which never referenced TilingConfig) are unchanged. - pyproject: bump hs2p >=4.1.1 -> >=4.2.0 and slide2vec[fm] >=4.8.0 -> >=5.0.0. The bumps are coupled: slide2vec must be >=5.0.0 to run on hs2p 4.2.0 (4.8.0 still reads the removed field), and the existing >=4.8.0 floor already resolved to 5.0.0 -> hs2p>=4.2.0, so soma was already broken on a fresh install. Full suite green against hs2p 4.2.0 + slide2vec 5.0.0 (1106 passed, 3 skipped, 1 xfailed; test_sphinx_docs_build deselected for a missing docutils env dep). Closes #97
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.
Context
hs2p 4.2.0 (clemsgrs/hs2p#158) collapsed the derived
TilingConfig.tissue_thresholdscalar into the resolvedmin_coveragemap —min_coverage["tissue"]is now the single source of truth for the tissue threshold. soma's slide-manifest dense path constructedhs2p.TilingConfig(tissue_threshold=...)directly, which now raisesTypeError.soma was in fact already broken on a fresh install: the existing
slide2vec[fm]>=4.8.0floor resolves to slide2vec 5.0.0, which requireshs2p>=4.2.0— dragging in the field removal regardless of soma's own hs2p pin.Changes
dense_slide_extraction._build_tiling_config: feedmin_coverage={"tissue": ...}instead of the removed scalar. The per-class sampling map still flows separately through_resolve_sampling_spec_from_masks(masks, …); this tiling-level entry only feeds the result's binarymin_tissue_fractionprovenance, so ROI coordinates — and the dense cache key, which never referencedTilingConfig— are unchanged.pyproject.toml: bumphs2p>=4.1.1→>=4.2.0andslide2vec[fm]>=4.8.0→>=5.0.0. The bumps are coupled: slide2vec must be>=5.0.0to run on hs2p 4.2.0 (4.8.0 still reads the removed field). soma does not touch the one breaking public API in slide2vec 5.0.0 (Model.embed_slidesnested dict, slide2vec#178) — it drives the lower-level runtime, whose 4.8.0→5.0.0 delta is small and additive.Testing
Full suite green against hs2p 4.2.0 + slide2vec 5.0.0: 1106 passed, 3 skipped, 1 xfailed.
test_sphinx_docs_builddeselected for a missingdocutilsenv dep (unrelated).Acceptance criteria
tissue_threshold=scalar intohs2p.TilingConfighs2p>=4.2.0pin (+ coupledslide2vec>=5.0.0)TilingConfig)Closes #97