Skip to content

imspy_predictors RT: default to Chronologer#398

Merged
theGreatHerrLebert merged 1 commit into
mainfrom
feature/chronologer-default-rt
May 20, 2026
Merged

imspy_predictors RT: default to Chronologer#398
theGreatHerrLebert merged 1 commit into
mainfrom
feature/chronologer-default-rt

Conversation

@theGreatHerrLebert
Copy link
Copy Markdown
Owner

Summary

  • load_deep_retention_time_predictor() now defaults to Chronologer (Searle Lab residual-CNN, Apache-2.0) — roughly 4× tighter median residual than the imspy transformer on timsTOF data, per rt_im_exploration.ipynb benchmarks
  • Legacy transformer still reachable via load_deep_retention_time_predictor(backend="transformer")
  • pretrained/hub.py gains a per-model "url" override; the new rt/chronologer_base.pt entry pulls Chronologer_20220601193755.pt directly from the upstream Searle Lab repo — no re-hosting, so upstream fixes propagate automatically. SHA-256 locked (1a500c24…) so corruption surfaces immediately on download

Why now

Cross-deposit reproducibility analysis on six modern timsTOF deposits showed the imspy transformer RT was the weakest of the three predictors we ship. Chronologer's residual-CNN architecture wins consistently. Now that the vendor-free Chronologer adapter is in imspy_predictors.rt (landed in PR #397), wiring it as the default is mechanical.

This is Chunk A of a three-chunk plan. Chunks B (CCS goto = fine-tuned) and C (intensity goto = fine-tuned) are deferred until the production fine-tune notebook (claudius-proteomics/notebook/production_finetune.ipynb) runs and produces weights on disk.

Backward compatibility

  • Existing load_deep_retention_time_predictor() and load_deep_retention_time_predictor(backend=None) calls now return Chronologer — behavior change, but the call signature is unchanged
  • Existing load_deep_retention_time_predictor(backend="transformer") calls preserve the previous behavior exactly
  • If the upstream chronologer Python package isn't installed, or the base-weights download is unreachable, the function logs a warning and falls back to the transformer path. No hard breakage

Test plan

  • Existing tests/test_predictors.py::test_deep_chromatography_apex still passes (the test only checks class importability, not loader defaults)
  • Fresh-env smoke test: python -c "from imspy_predictors.rt import load_deep_retention_time_predictor; m = load_deep_retention_time_predictor(); print(type(m).__name__)" returns Chronologer (or, in a env without the upstream chronologer package, prints a warning and returns the transformer)
  • python -c "from imspy_predictors.rt import load_deep_retention_time_predictor; m = load_deep_retention_time_predictor(backend='transformer'); print(type(m).__name__)" returns the legacy model

Make Chronologer the goto retention-time predictor (it reaches ~4× tighter
median residual than the imspy transformer baseline on timsTOF data, per
rt_im_exploration.ipynb benchmarks). The transformer is still reachable via
load_deep_retention_time_predictor(backend="transformer").

hub.py gains a per-model "url" override field; the new entry
rt/chronologer_base.pt pulls Chronologer_20220601193755.pt straight from
the upstream Searle Lab repo (Apache-2.0, attribution kept in the
chronologer.py docstring). We deliberately don't re-host — any upstream
fix or retraining propagates automatically. SHA-256 is locked
(1a500c24...) so corruption surfaces immediately.

Backward-compatible: existing callers passing backend=None get the new
default; passing backend="transformer" preserves the previous behavior.
The Chronologer branch falls back to the transformer if the upstream
chronologer package isn't installed or the download is unreachable.
@theGreatHerrLebert theGreatHerrLebert merged commit 77f5e57 into main May 20, 2026
2 checks passed
animesh pushed a commit to animesh/rustims that referenced this pull request May 28, 2026
PR theGreatHerrLebert#398 made load_deep_retention_time_predictor() default to Chronologer,
but DeepChromatographyApex.__init__ calls it with no args and then runs
self.model.to(self._device). Chronologer is a wrapper class with its own
internal device handling and no .to() method, so DCA now raises
AttributeError on instantiation when no explicit model is passed.

Fix: DCA explicitly requests backend="transformer" — it's the model class
DCA was designed around, and other callers can keep using the no-arg
default (Chronologer) without surprises.

Caught by an end-to-end integration run on monster3's primitives DIA
pipeline: cell A (--rt-model dca) of the v4 production-weights comparison
failed immediately at the RT step.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant