Repository navigation
imspy-simulation: depend on mzprov; fix the flaky GMM test that stopped CI - #487
Merged
Merged
Conversation
test_fit started its means at unseeded N(0, 1) draws. In about 4% of runs (8 of 200 measured) all three components collapsed into one cluster and 'assert 1 > 1' failed, which is what stopped the Python 3.12 job on main after #486 and skipped the imspy-simulation suite. Start the means at data points under a fixed seed: 0 of 200 runs collapse.
emit_provenance is on by default, but mzprov was not installable from PyPI, so a normal install silently skipped signing with a warning. mzprov 0.1.1 is now on PyPI: declare it, drop the ImportError fallbacks, and keep signing non-fatal. The .raw docstring's claim that mzprov cannot sign vendor .raw is out of date and goes. test_mzprov_signing runs each vendor path's signer (.d and mzML, sidecar and embedded; .raw) against mzprov's fixtures and checks the result with mzprov's verifier.
mzprov 0.1.2 keeps new keys under ~/.config/mzprov/keys/ and uses an existing ~/.config/timsim/keys/ key in place, so TimSim users keep their signing identity. Require 0.1.2 and describe the default accordingly.
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.
Why CI on main didn't finish
After #486 merged, the Python 3.12 job failed in
imspy-predictorsontest_mixture.py::TestGaussianMixtureModel::test_fit(assert 1 > 1). Because that step failed, theimspy-simulationstep never ran.The test data was seeded, but the model's initial means were unseeded
N(0, 1)draws. In about 4% of runs all three components collapsed into one cluster. I measured 8 of 200 with the current test, and 0 of 200 after this change. The fixture now starts the means at data points under a fixed seed.mzprov is now a dependency
emit_provenanceis on by default, butmzprovwasn't on PyPI, so a normal install silently skipped signing with a warning. mzprov 0.1.1 is published now:imspy-simulationdeclaresmzprov>=0.1.1. It needs onlycryptography.ImportErrorfallbacks are gone. Signing stays non-fatal: any error is logged and the run continues..rawis removed.CONFIGURATION.mdsays how to check an output:mzprov verify <output>.Test
tests/test_mzprov_signing.pyruns each vendor path's signer against mzprov's own fixture files and checks the result with mzprov's verifier:.dand mzML, both as a sidecar file and embedded in the file.rawLocally, the GMM tests passed three times in a row. The new signing tests pass against these exact helper functions, but I loaded them in isolation, because the local
imspy_connectorbuild is older thanmain's. The full import runs in CI here.