Repository navigation
Ask a cellmap export which of its two shapes it runs at - #153
Merged
Merged
Conversation
#150 made the cellmap model type read the metadata's inference shapes, which fixed jrc_mus-livers_16nm_to_8nm_mito (traced at its inference 288³, it fails at its training 216³) and broke mito_aff_unet_setup_16 (traced at its training 178³ → 56³, it answers 56³ to the inference 378³, so every chunk failed shape validation, after a 378³ forward that on a CPU outlived the local launcher's startup timeout). cellmap_models traces at whichever shape the exporter passed and records both without saying which, so the type now probes: a forward at the training shape that answers the training output means the training shapes, anything else the inference shapes. The probe is the cheap one (the smaller input; a mismatch fails fast): 3.7 s for the liver model and 9.1 s for setup_16 on a CPU, model load included. Claude-Session: https://claude.ai/code/session_01EzWMS4pG3tm1ZtvKULfSfW
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.
#150's fix for the
cellmapmodel type read the metadata's inference shapes, which madejrc_mus-livers_16nm_to_8nm_mitowork (its TorchScript is traced at the inference 288³ and fails at the training 216³) and brokemito_aff_unet_setup_16, which is traced the other way round (training 178³ → 56³; fed the inference 378³ it still answers 56³). Found in tonight's live try: every chunk failed shape validation, after a 378³ forward that on a CPU outlived the local launcher's 300 s startup timeout.cellmap_models traces the export at whichever shape the exporter passed and records both shapes without saying which, so the type now asks the model (
runs_at): a forward at the training shape that answers the training output means the training shapes; a failure or another output means the inference shapes. The probe is the cheap direction (the smaller input; a mismatch fails fast): 3.7 s for the liver model and 9.1 s for setup_16 on a CPU, model load included; milliseconds on a GPU.Checked on both real models (liver → 288³/212³, setup_16 → 178³/56³) and with three stand-ins in
tests/utils/test_cellmap_model_type.py. Also merged into #152's branch for the live test.https://claude.ai/code/session_01EzWMS4pG3tm1ZtvKULfSfW