Skip to content

feat(eval): wire the per-protein sink into the run, and write the table - #785

Merged
github-actions[bot] merged 2 commits into
developfrom
feat/wire-per-protein-sink
Aug 19, 2026
Merged

github-actions[bot] merged 2 commits into
developfrom
feat/wire-per-protein-sink

Conversation

@frapercan

Copy link
Copy Markdown
Owner

#784 landed the transformation layer with its tests and nothing called it. This
is the wiring: a sink per cafaeval invocation, and the table written beside the
setting's other artefacts.

Two decisions

Collected always, not behind a flag. The cost is one array per namespace held
for the length of the call. A flag would be off exactly when someone wants to
stratify a result that has already been computed.

Never fatal. The aggregate is the product; a supplementary table that cannot
be written must not discard a sound evaluation. Both the empty and the failed
case emit an event, so an absent file is distinguishable from one nobody asked
for.

Two defects found while wiring, neither in the new code

The namespace keys disagreed. parse_results returns the short CAFA code
(BPO) and the sink reports cafaeval's long namespace
(biological_process). A mismatch produces an empty tau map, no rows, and no
file, with nothing anywhere saying why. Fixed by inverting the project's own
_NS_LABELS rather than writing a second mapping that could drift from it, with
a test asserting the two still line up.

The sink import sat inside a broad except Exception. An installed cafaeval
without PerProteinSink was swallowed and reported as three settings that
produced no results, so a wrong dependency version looked exactly like an
evaluation that legitimately scored nothing. I hit this on my own machine: 91
driver tests failed with cafa_eval.call_count == 0 and a green-looking run
underneath. The import now sits in a helper that raises with a message naming
the real problem.

That second one is the reason I am flagging it here rather than fixing it
quietly: I introduced it in this branch by adding an import to a protected
block, which is the same failure family this work exists to remove.

Checks

91 driver tests, 5 wiring tests, 11 transformation tests, all passing with the
new dependency installed. ruff clean, smell budget unchanged.

The transformation layer landed in #784 with its tests but nothing called
it. This creates a sink for every cafaeval invocation and writes the
resulting table beside the setting's other artefacts.

Collected always rather than behind a flag: the cost is one array per
namespace for the length of the call, and a flag would be off exactly
when someone wants to stratify a result already computed.

Never fatal. The aggregate is the product; a supplementary table that
cannot be written must not discard a sound evaluation. Both the empty and
the failed case emit, so an absent file is distinguishable from one
nobody asked for.

Two defects found while wiring, neither in the new code.

The namespace keys disagree between the two sides: parse_results returns
the short CAFA code and the sink reports cafaeval's long namespace. A
mismatch yields an empty tau map, no rows and no file, silently. Fixed by
inverting the project's own _NS_LABELS rather than writing a second
mapping that could drift from it, and there is a test asserting the two
still line up.

And the sink import sat inside _run_cafaeval_for_setting's broad except,
so an installed cafaeval without PerProteinSink was swallowed and
reported as three settings that produced no results. A wrong dependency
version looked exactly like an evaluation that legitimately scored
nothing. It now raises with a message naming the real problem.
@github-actions
github-actions Bot enabled auto-merge (squash) August 19, 2026 08:54
…alue

_invoke_cafaeval_signal_safe now returns the sink alongside df and
dfs_best, and test_lafa_frame_parity unpacked two. Five call sites
updated.

Third time in this change that widening a return arity rippled into test
doubles holding the old shape. Worth saying out loud: the sink is
returned rather than attached to the context precisely so that a caller
who has not been updated fails at the unpack, loudly and at import of the
test, instead of silently receiving a context whose sink nobody filled.
The churn is the feature working.
@codecov

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.67%. Comparing base (2e4d5bb) to head (9736914).
⚠️ Report is 52 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #785      +/-   ##
===========================================
- Coverage    89.02%   87.67%   -1.35%     
===========================================
  Files          246      264      +18     
  Lines        18669    20495    +1826     
===========================================
+ Hits         16620    17970    +1350     
- Misses        2049     2525     +476     
Files with missing lines Coverage Δ
protea/core/operations/_run_cafa_eval_driver.py 82.50% <100.00%> (+4.60%) ⬆️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
github-actions Bot merged commit cebf341 into develop Aug 19, 2026
21 checks passed
@frapercan
frapercan deleted the feat/wire-per-protein-sink branch September 15, 2026 18:28
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