fix(health): recognise slim HF mirror for chrombpnet + add alphagenome_pt probe#77
Merged
lucapinello merged 1 commit intomainfrom Apr 30, 2026
Merged
Conversation
…e_pt probe Two stale checks in `chorus/core/weights_probe.py` were causing `chorus health` to falsely report healthy 0.4.0 installs as "⚠ Not installed": 1. **chrombpnet probe** only looked at the legacy `downloads/chrombpnet/DNASE_K562/` ENCODE-tarball-extracted directory. In 0.3.0+ that directory is empty by default — chrombpnet weights stream from the slim HF mirror at `models--lucapinello--chorus-chrombpnet-slim` (#59 / #60). Fix: accept *either* the slim-mirror snapshot cache (manifest.json present) *or* the legacy ENCODE directory. The runtime path was already 0.3.0-correct; only the probe was stale. 2. **alphagenome_pt** was missing from `_ARTIFACT_PROBES` entirely (only added to the oracle registry in #62; the health probe was never updated). Fix: new `_probe_alphagenome_pt()` checks the HF cache at `models--gtca--alphagenome_pytorch/snapshots/<rev>/ *.safetensors`. Also factored a small helper `_hf_cache_dir()` so both new probes honour `HF_HOME` / `HF_HUB_CACHE` env vars via `huggingface_hub.constants.HF_HUB_CACHE`, with a defensive fallback to the documented default `~/.cache/huggingface/hub`. Verified end-to-end on this machine: a fresh `chorus health` now reports 7/7 ✓ Healthy, where before it reported 5/7 with two false- alarm warnings on chrombpnet + alphagenome_pt. `pytest -m "not integration and not slow"`: 368 passed, 1 skipped, 5 deselected (no regression). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
fix(health): recognise slim HF mirror for chrombpnet + add alphagenome_pt probe
Two stale checks in
chorus/core/weights_probe.pywere causingchorus healthto falsely report healthy 0.4.0 installs as⚠ Not installed.Symptom
On a fresh
chorus setup --oracle allagainst 0.4.0:…even though both flagged oracles load and predict cleanly (
oracle.load_pretrained_model()succeeds in <8 s, end-to-endoracle._predict()returns the expected outputs). I.e. the runtime path is fine; only the probe is stale.Root cause
chrombpnet probe (
_probe_chrombpnet) was looking at the legacy ENCODE-tarball-extracted directory:In 0.3.0+ that directory is empty by default — chrombpnet weights stream from the slim HF mirror at
lucapinello/chorus-chrombpnet-slim(ChromBPNet HF slim mirror + chrombpnet_nobias default (0.3.0) #59 / fix(chrombpnet): F1 — huggingface_hub missing in env yaml + v30 scorched-earth audit #60). The legacy directory only gets populated if a user explicitly requestsmodel_type='chrombpnet'(bias-aware) orfold ≠ 0, both of which fall through to ENCODE.alphagenome_pt was missing from
_ARTIFACT_PROBESentirely. The oracle was added to the registry in AlphaGenome PyTorch backend (opt-in spike) #62 but the health probe was never updated. So the probe-dispatcher never had an entry for it; it always fell through to the missing-marker code path.Fix
_probe_chrombpnet: accept either the slim-mirror snapshot cache (manifest.jsonpresent undermodels--lucapinello--chorus-chrombpnet-slim/snapshots/<rev>/) or the legacy ENCODE directory._probe_alphagenome_pt: checks the HF cache atmodels--gtca--alphagenome_pytorch/snapshots/<rev>/*.safetensors(the upstream port's published weights)._hf_cache_dir()helper: both new probes route through it so they honourHF_HOME/HF_HUB_CACHEenv vars viahuggingface_hub.constants.HF_HUB_CACHE, with a defensive fallback to~/.cache/huggingface/hub.Verification
End-to-end on macOS arm64:
7/7 ✓, was 5/7 before.
pytest -m "not integration and not slow": 368 passed, 1 skipped, 5 deselected (no regression).Out of scope
chorus healthafter setup, or a unit test that mocks the HF cache path. Tracked as a follow-up; the fix itself is small enough to inspect by reading.🤖 Generated with Claude Code