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

openvax / topiary / 25811341902
90%

Build:
DEFAULT BRANCH: master
Ran 13 May 2026 04:18PM UTC
Jobs 3
Files 34
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

13 May 2026 04:10PM UTC coverage: 89.625% (-0.02%) from 89.641%
25811341902

push

github

web-flow
Backfill value from score for [0,1]-score predictor kinds (#165) (#166)

* Backfill value from score for [0,1]-score predictor kinds (#165)

`_format_prediction_df` now fills `value` from `score` wherever `value`
is NaN. mhctools only populates `value` when the kind has a distinct
unit (IC50 nM for affinity, half-life for stability); for the other
kinds — most visibly `pMHC_presentation` — `value` came back as NaN
even though `score` carried the predictor's primary [0, 1] output.

NaN-in-value bit downstream consumers reading `value` uniformly across
kinds: strict `simplejson.dumps` rejects NaN/Inf, `sorted()` is
undefined on NaN keys, and arithmetic on `value` silently propagated.
Vaxrank just hit this on real data (vaxrank#289, fix in vaxrank#290).

Rows that already carry a unit-bearing `value` are untouched, so
affinity (IC50 nM) and stability (half-life) keep their semantics.
The `affinity` column continues to be populated only for
`pMHC_affinity` rows.

* Address review: kind-gated backfill, cover CachedPredictor path

- Extract `_backfill_value_from_score` helper that skips kinds in
  `mhctools.VALUE_BEST_DIRECTIONS` (pMHC_affinity, pMHC_stability).
  A NaN ``value`` on a unit-bearing kind means the unit is genuinely
  unknown; falling back to ``score`` there would falsely advertise a
  [0, 1] score as IC50 nM or hours.
- Apply the helper in `cached.py:_bindings_to_dataframe` and
  `_predictions_to_dataframe` so CachedPredictor's standalone path
  (mhcflurry class1_presentation, NetMHCpan ``-BA`` parsing, ...)
  gets the same fix, not just the TopiaryPredictor wrapper.
- Add end-to-end test through `predict_from_named_sequences` with a
  predictor that emits both affinity and presentation rows.
- Add regression tests for both cached.py helpers and for the
  unit-bearing-kind skip case.

14 of 16 new or added lines in 3 files covered. (87.5%)

4276 of 4771 relevant lines covered (89.62%)

2.69 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
93.43
-0.28% topiary/predictor.py
Jobs
ID Job ID Ran Files Coverage
1 python-3.11 - 25811341902.1 13 May 2026 04:18PM UTC 34
89.62
GitHub Action Run
2 python-3.10 - 25811341902.2 13 May 2026 04:18PM UTC 34
89.62
GitHub Action Run
3 python-3.12 - 25811341902.3 13 May 2026 04:18PM UTC 34
89.62
GitHub Action Run
Source Files on build 25811341902
  • Tree
  • List 34
  • Changed 3
  • Source Changed 3
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25811341902
  • 58e2e41c on github
  • Prev Build on master (#25699481067)
  • Next Build on master (#25817421388)
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