Repository navigation
Conversation
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.
Follows up on #45, where the suggestion was to avoid silently applying parser defaults for magnification and patch size during feature extraction while keeping preferred settings documented in the README.
Both CLIs now stop with an error only when an omitted
--magor--patch_sizewould give the chosen encoder something other than its preferred value, printing both copyable flag options (preferred and default). Explicit flags are always honoured, so multi-magnification and non-preferred runs remain possible.Changes
trident/patch_encoder_models/load.py: addPREFERRED_MAG_AND_PATCH_SIZEnext toRESIZE_SUPPORTED_PATCH_ENCODERS(matching the README encoder table) andresolve_patching_defaultsto fill omitted flags or error on mismatch.run_batch_of_slides.pyandrun_single_slide.py: run the check for feature extraction while leaving the parsers' numeric defaults unchanged. Slide encoders are checked against their patch encoder, exceptmadeleine(which uses its documented10x/256grid).--task feat --coords_diris exempt because the coordinate file decides the grid;--task allstill checks since it can generate a grid.README.md,.claude/skills/trident/SKILL.md, and.claude/skills/trident/reference.md: document the check and rename the README column toPreferred args.tests/test_run_batch_of_slides.py,tests/test_run_single_slide.py, andtests/test_patch_encoder_resize.py: cover registry alignment, unchanged numeric defaults, matching defaults, explicit overrides, slide-encoder/Madeleine handling,--coords_dir, and error messages.Behaviour change
--task all, or--task featwithout--coords_dir) with an encoder whose preferred pair differs from20x/512(e.g.uni_v1,madeleine) now stop and ask you to pass the mismatched flag(s) explicitly.run_single_slide.pywith its defaultconch_v15now stops and asks for--patch_size 512or--patch_size 256, because the script's default (256) differs from CONCH v1.5's preferred512.Verification
34 focused CLI tests pass; all 35 preferred pairs checked against the README and the encoder registry.