Repository navigation
feat(eval): wire the per-protein sink into the run, and write the table - #785
Merged
Merged
Conversation
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.
…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 Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#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_resultsreturns 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 nofile, with nothing anywhere saying why. Fixed by inverting the project's own
_NS_LABELSrather than writing a second mapping that could drift from it, witha test asserting the two still line up.
The sink import sat inside a broad
except Exception. An installed cafaevalwithout
PerProteinSinkwas swallowed and reported as three settings thatproduced 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 == 0and a green-looking rununderneath. 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.
ruffclean, smell budget unchanged.