Skip to content

build(deps): calibrax 0.1.17, so tied scores count half a pair - #39

Merged
mahdi-shafiei merged 1 commit into
mainfrom
build/calibrax-0.1.17
Nov 7, 2026
Merged

mahdi-shafiei merged 1 commit into
mainfrom
build/calibrax-0.1.17

Conversation

@mahdi-shafiei

@mahdi-shafiei mahdi-shafiei commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

-  "calibrax>=0.1.9",
+  "calibrax>=0.1.17",
-  # siblings; 0.1.6 adds substrax.runtime, substrax.artifacts and substrax.testing.
-  "substrax>=0.1.11",
+  # siblings; calibrax 0.1.17 requires 0.1.25.
+  "substrax>=0.1.25",

ExactAUROC delegates to calibrax's roc_auc. Before calibrax 0.1.17 a run of tied scores became several points of the ROC curve, so the area depended on the order of the tied records. 0.1.17 gives a run of ties one point, so a tied positive-negative pair counts half (the Mann-Whitney midrank convention). substrax moves to 0.1.25 because calibrax 0.1.17 requires it.

Evidence

  • Before (calibrax 0.1.9), scores 0.5, 0.5, 0.2, 0.8:

    • test_a_tied_pair_counts_half_whatever_its_order returned 1.0 with labels 1, 0, 0, 1 and 0.75 with 0, 1, 0, 1.
    • test_every_score_tied_is_one_half returned 1.0.

    After (calibrax 0.1.17): 0.875 in both orders and 0.5, exactly.

  • Locally on this branch, CPU: tests/losses 157 passed, tests/benchmarks 400, tests/utils 38, tests/pipelines 139, tests/operators 1,703, and the ownership test 1. pre-commit and uv lock --check pass. Every substrax name the tree imports resolves against 0.1.25.

Merge danger

Door: two-way.

Blast radius: four kinds of value DiffBio reports, each a calibrax fix since 0.1.9 (the CHANGELOG entry lists them):

DiffBio caller calibrax change effect
ExactAUROC 0.1.17, ties are one ROC point tied scores count half a pair
clustering evaluation silhouette_score, calinski_harabasz_score 0.1.10, labels read as names labels with gaps ({0, 2}) no longer count a cluster twice; match scikit-learn
batch-correction evaluation mmd 0.1.10, MMD_b (Gretton et al. 2012) value changes for every input
masked_value_loss, MaskedValueLoss, compute_chromatin_guidance_loss (masked mse/mae) 0.1.15 a non-finite value at a masked-out position no longer gives NaN (or, for mae, a wrong value)

The softmax cross-entropy, entropy and unmasked mse call sites are unchanged. The example pages print silhouette and MMD values from 2026-03-19; whether they move is checked by rerunning examples/ecosystem/calibrax_metrics.py and scvi_benchmark.py before this leaves draft.

ExactAUROC delegates to calibrax's roc_auc. Before calibrax 0.1.17 a
run of tied scores became several points of the ROC curve, so the area
depended on the order of the tied records: with scores 0.5, 0.5, 0.2,
0.8 and the tied pair one positive and one negative, it was 1.0 in one
order and 0.75 in the other, and every score tied gave 1.0. calibrax
0.1.17 gives a run of ties one point, so a tied positive-negative pair
counts half, the Mann-Whitney midrank convention: 0.875 in both orders,
and 0.5 when every score is tied. Two tests pin those values.

The calibrax floor moves to 0.1.17 from 0.1.9, and the substrax floor to
0.1.25, the release calibrax 0.1.17 requires; the lock takes both. Every
substrax name the tree imports resolves against it. Three more values
DiffBio reports change with calibrax's fixes since 0.1.9, recorded in
the CHANGELOG: silhouette and Calinski-Harabasz read labels as names, the
batch-correction mmd is MMD_b, and the masked mse and mae ignore a
non-finite value at a masked-out position.
@mahdi-shafiei
mahdi-shafiei marked this pull request as ready for review November 7, 2026 01:05
@mahdi-shafiei
mahdi-shafiei merged commit 4c7c73b into main Nov 7, 2026
14 checks passed
@mahdi-shafiei
mahdi-shafiei deleted the build/calibrax-0.1.17 branch November 7, 2026 01:05
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