• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

openvax / topiary / 24415576156
88%
master: 90%

Build:
Build:
LAST BUILD BRANCH: v5.16.2
DEFAULT BRANCH: master
Ran 14 Apr 2026 06:24PM UTC
Jobs 3
Files 32
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Apr 2026 06:16PM UTC coverage: 88.271% (+0.1%) from 88.127%
24415576156

Pull #130

github

iskandr
CachedPredictor — serve predictions from a pre-computed table (part 1 of #128)

Core class + four loaders, no sharding or version-match tests yet.
Implements enough of the mhctools predictor protocol
(predict_peptides_dataframe, predict_proteins_dataframe, alleles,
default_peptide_lengths) to drop into TopiaryPredictor(models=cache).

Core invariant: a single CachedPredictor holds predictions from
exactly one (prediction_method_name, predictor_version) pair — never
mixes versions.  Enforced at construction and on the first fallback
call (lazy version-check against the fallback's output).

Fallback semantics:
- fallback=None (default): miss raises KeyError with missed peptides.
- fallback=<predictor>: miss delegates to the fallback, result is
  merged back into the cache so subsequent queries serve locally.
  No populate-on-miss flag — caching fallback hits is always the
  right default for the expected (batch prediction) workload.

Loaders:
- from_dataframe: in-memory, with optional predictor_name /
  predictor_version backfill for DataFrames that lack those columns.
- from_topiary_output: Parquet / TSV round-trip of topiary's own
  predict_* output schema.
- from_tsv: generic tab- or comma-delimited third-party files with a
  caller-supplied column-name mapping.
- from_mhcflurry: mhcflurry-predict CSV — maps the mhcflurry_*
  columns onto canonical affinity / percentile_rank / score.

Defer to follow-up PRs:
- from_netmhcpan (.xls parsing is meatier; separate scope).
- concat / from_directory sharding.

23 tests covering construction, version invariant (mixed versions
rejected, name/version round-trips as string), predict_peptides +
predict_proteins sliding-window, fallback hit + miss + version
mismatch, all four loaders, and end-to-end integration with
TopiaryPredictor(models=cache).
Pull Request #130: Add CachedPredictor — predictions-as-data core (part 1 of #128)

170 of 187 new or added lines in 2 files covered. (90.91%)

3176 of 3598 relevant lines covered (88.27%)

2.65 hits per line

Uncovered Changes

Lines Coverage ∆ File
17
90.86
topiary/cached.py
Jobs
ID Job ID Ran Files Coverage
1 python-3.10 - 24415576156.1 14 Apr 2026 06:25PM UTC 32
88.27
GitHub Action Run
2 python-3.11 - 24415576156.2 14 Apr 2026 06:24PM UTC 32
88.27
GitHub Action Run
3 python-3.12 - 24415576156.3 14 Apr 2026 06:24PM UTC 32
88.27
GitHub Action Run
Source Files on build 24415576156
  • Tree
  • List 32
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24415576156
  • Pull Request #130
  • PR Base - master (#24411959128)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc