Repository navigation
feat(dynacell): add dynacell-stain-{predict,train,eval} agent skills - #545
Draft
alxndrkalinin wants to merge 6 commits into
Draft
alxndrkalinin wants to merge 6 commits into
alxndrkalinin wants to merge 6 commits into
Conversation
Agent skill for Biohub MCP: predict organelles from Phase3D with the released FNet3D, VSCyto3D/UNeXt2 and CELL-Diff checkpoints on public DynaCell archives or the user's own OME-Zarr. The predict configs are the ones that reproduced the internal evaluation on the public A549 ER test archive at runtime commit b67a38b. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015kuht3npKtb2o5E6h19xbA
Agent skill for Biohub MCP: fit FNet3D or CELL-Diff on public DynaCell training archives or the user's paired data on one GPU with TensorBoard logging. Both configs ran 20 steps with validation and checkpointing on the public A549 ER training archive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015kuht3npKtb2o5E6h19xbA
Agent skill for Biohub MCP: pixel and mask metrics with dynacell evaluate, instance AP for nucleus and membrane via Cellpose-DINO, and model comparison with dynacell report. The feature tier stays off because its references and checkpoints are not public. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015kuht3npKtb2o5E6h19xbA
All 48 released fnet3d, vscyto3d, unext2 and celldiff checkpoints load into the stain skill's model blocks with strict key matching (an fnet3d checkpoint in the VSCyto3D block fails, as a control), so the unext2 caveat is no longer needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015kuht3npKtb2o5E6h19xbA
200,000 steps at the measured ~4.2 s per step is about 10 days, not a week. Angle-bracket placeholders in mermaid labels would render as HTML tags on GitHub, so name the channel TARGET_prediction instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015kuht3npKtb2o5E6h19xbA
…in,eval} Consistent product-prefixed names so the three skills read as one command family (dynacell stain predict / train / eval). Skill names allow only lowercase letters, digits and hyphens, so the words are joined with hyphens. Folders, name fields, skill:// resource paths, eval skill_name fields and cross-references move together. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015kuht3npKtb2o5E6h19xbA
This branch has not been deployed
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.
Summary
Adds three agent skills,
dynacell-stain-predict,dynacell-stain-trainanddynacell-stain-eval, for virtual staining with DynaCell, written for import into Biohub MCP. They follow the layout of theembedandphenotypeskills in #540.dynacell-stain-predictPhase3Dwith released checkpoints (FNet3D, VSCyto3D/UNeXt2, CELL-Diff) or a user-trained one, on public DynaCell data or the user's own OME-Zarrdynacell predict -c predict.ymldynacell-stain-traindynacell fit -c fit.ymldynacell-stain-evaldynacell evaluate ...,dynacell report ...The PR contains Markdown and JSON only, with no code changes. It does not depend on #540, because these skills use
fit,predictandevaluate, which are already onmain.Decisions for reviewers
dynacell-stain-evalcovers pixel and mask metrics, plus instance AP for nucleus and membrane. The feature tier (CP, DINOv3, DynaCLR and CellDINO distances, KID/FID) needs a cell segmentation store, CP reference statistics and checkpoints that aren't public, so the skill tells agents to passcompute_feature_metrics=false. The roadmap's "fidelity, biology, utility" needs those released first.dynacell-stain-train), although the roadmap's v1 list has only stain, embed, phenotype and eval stain.dynacell-stain-predict,dynacell-stain-trainanddynacell-stain-eval, one command family read as "dynacell stain predict / train / eval". Skill names allow only lowercase letters, digits and hyphens, hence the hyphens. feat(dynacell): add embed and phenotype skills and commands #540'sembedandphenotypewould need the same prefix for the family to be consistent.registry.jsondoesn't exist yet, and the Hugging Face checkpoint repo is private. The skills therefore read checkpoints from the publics3://dynacell/v1/models/and itscheckpoints.csv. They can switch to the registry once it is published.dynacell-stain-predictdeclares them out of scope. VSCyto2D is not in the public release.dynacell-stain-predictrecommends VSCyto3D first, andjointwhen the user is unsure of their domain. That is a judgement call, not a benchmark result; please confirm it or replace it with the paper's ranking.Verification
All of the following ran at runtime commit
b67a38b0(currentmain) on one 48 GB A40. Each run used a fresh worktree with its own venv from the documenteduv sync --locked --package dynacell --extra eval --extra eval_gpucommand, and read the public data and checkpoints without modifying them.dynacell-stain-predict: each predict block inreferences/configs.mdis identical to the config that ran ontest/SEC61B_mock.ozx, apart from paths..zarrwritten with iohub, with no statistics, failed predict as expected (KeyError: 'norm_meta'). Afterviscy preprocessit gave VSCyto3D predictions with voxel PCC > 0.9999 against the archive run. Copying the archive's statistics into the store made the output bit-identical.dynacell-stain-train:configs/examples/fnet3d/fit.ymlfails in four separate ways. The skill config fixes all four.dynacell-stain-eval: the ER pixel + mask run and the membrane run (cpdino+ instance AP) match the internal evaluation:dynacell reportran on the outputs.fnet3d,vscyto3d,unext2andcelldiffcheckpoints load into the skill's model blocks with strict key matching. As a control, anfnet3dcheckpoint loaded into the VSCyto3D block fails.dynacell-stain-predictconfigs, anddynacell fit --ckpt_path last.ckptresumes a run ("Restored all states", stops at the newmax_steps).Not verified:
git clone+git checkout --detachsequence. The runs used a worktree at the same commit with the sameuv sync.evals/evals.json, which were written but not executed against an agent;The skills flag these gaps where they matter.
Biohub MCP import
applications/dynacell/skills/dynacell-stain-{predict,train,eval}.SKILL.md, a BSD-3-ClauseLICENSE.md,references/*.mdandevals/evals.json(4 cases each, including a client without shell access).b67a38b0c0b9556b83291526935ce06f98ab9ec4.Found while verifying, not fixed here
configs/examples/*fail on public data. They expect aFluorescencechannel, list it as a predict normalization key, have no training crop, request 4-GPU DDP by default, and useCSVLogger, which crashes on image logging.unext2example:configs/examples/unext2builds theUNeXt2architecture, but the releasedunext2andvscyto3dcheckpoints arefcmae.target_name=sec61b(not a valid target) and omits required keys;dynacell reportneeds+results_dirs.<name>=....pip install 'dynacell[...]', butdynacellisn't on PyPI.s3://dynacell/v1/models/checkpoints.csv(columnsdst_path,src_ckpt,config_src) and the trainingconfig.yamlfiles expose internal storage paths. The skills use only thetrain_set,organelle,modelandpub_filenamecolumns.models/README.md: it says all models take 15 Z planes; the real windows are 32 (FNet3D), 15 (VSCyto3D/UNeXt2) and 8 (UNetViT3D, CELL-Diff tiles).🤖 Generated with Claude Code
https://claude.ai/code/session_015kuht3npKtb2o5E6h19xbA