Repository navigation
Add diagnostics for OpenSwath benchmark failures - #15
nej1gotnochill wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
This PR is intentionally diagnostic only. The recurring package-mode OpenSwath failure currently reports This change makes the error visible and uploads the relevant diagnostic files on failure, without changing parser behavior, correctness checks, or verdict rules. The suspected precursor-ID mismatch remains a hypothesis; I have not yet inspected the actual failing Local tests and validation passed. The failure-path artifact upload has not yet been verified in a real GitHub Actions run. |
|
Update on the same @jpfeuffer and Timo : I validated this PR with a real package mode run using the PR branch and commit Run: https://github.com/OpenMS/OpenMS-benchmarking/actions/runs/39891350513 The OpenSwathWorkflow stage completed successfully, but the benchmark correctly failed at the library-join check. The new failure-path upload step ran successfully and preserved The reported error was: The captured output contains transition native IDs |
Description
Diagnostic-only change: make the next failed package-mode OpenSwath run self-diagnosing.
The package-mode OpenSwath benchmark has repeatedly failed in CI with only the message
library join failed - see library_error in openswath.json— the log named the field but neverprinted its value, and the workflow's failure path skipped every upload step, so neither
openswath.jsonnor the actualoutput.featureXMLwas preserved for inspection. That recurringlibrary-join failure is the entire motivation for this PR.
The actual cause of the failure remains unconfirmed. The suspected precursor-ID mismatch —
real OpenSwath output containing MS1 precursor subordinate features whose
native_idvalues suchas
<group>_Precursor_i0are not TraML transition IDs — is a hypothesis, not a proven rootcause. We have not inspected the actual
output.featureXMLfrom a failing CI run; the committedsynthetic fixture passes and does not cover this case. This PR therefore does not change the
parser's join semantics, weaken any correctness check, or convert any failure into a pass — it only
collects evidence.
Changes:
benchmark/run_openswath_benchmark.sh— when the verdict read back fromopenswath.jsonis not
pass, a newreport_openswath_failurehelper runsbenchmark/openswath_diagnostics.pyagainst the result file and prints its output into
summary.txt. The call is best-effort: amissing interpreter, missing file, malformed JSON, or any diagnostic error is caught and
reported as
(openswath diagnostics unavailable - see openswath.json)without altering theverdict or the non-zero exit status. The existing correctness verdicts and failure exit
behavior are preserved unchanged.
benchmark/openswath_diagnostics.py(new) — bounded, never-raising renderer of the failurestate: the verdict, the actual
correctness.library_errorvalue (clipped, multi-line aware),or precisely why there is none (key absent / empty / non-string / malformed JSON / missing
file / non-object JSON), plus non-passing stages and present/absent sizes of the join-relevant
artifacts. It never dumps the report itself.
.github/workflows/benchmark.yml— a new final step in therun-openswath-benchmarkjob,if: ${{ failure() && !cancelled() }}, uploadsopenswath.json,output.featureXML,output.json,summary.txt,stages.tsv,meta.txt, andlogs/**asbenchmark-openswath-diagnostics-<sha>withif-no-files-found: ignore, so evidence survivesa failed benchmark step and a run that died before writing anything cannot cause a secondary
error to mask the original failure.
Tests (new) —
benchmark/test_openswath_diagnostics.py(unit tests for the renderer) andbenchmark/test_openswath_diagnostics.sh(extracts the shipped runner functions and drivesvalid / empty / absent / malformed / missing-file cases plus the broken-diagnostics path).
Local validation:
bash -non both shell scripts, workflow YAML parse + structural checks,python benchmark/test_openswath_diagnostics.py(9/9),bash benchmark/test_openswath_diagnostics.sh(9/9), and the pre-existing
benchmark/test_openswath_metrics.pyregression suite all passedlocally. Not yet verified by a real GitHub Actions run: the
failure() && !cancelled()artifact-upload path has been validated only by YAML parsing and structural reasoning — the first
actual failed package-mode run after this merges is its real test.
No inputs, thresholds, verdict rules, package selection, or unrelated workflow logic were touched;
benchmark/openswath_metrics.pyis unchanged.Next step after merge: re-run the workflow in package mode and inspect the real
library_errorand
output.featureXMLbefore deciding whether the precursor-ID hypothesis is confirmed. This PRdeliberately stops at evidence collection.
Checklist
(N/A: this repository has no AUTHORS file)
(N/A: this repository has no CHANGELOG file)
(the workflow
if:condition and the best-effort failure path carry explanatory comments)(
test_openswath_diagnostics.py,test_openswath_diagnostics.sh, and the pre-existingtest_openswath_metrics.pyall pass;bash -nand YAML parse clean)→ Tick: no C++ classes changed; benchmark-only Python.