Repository navigation
Conversation
queryJobs kept a job if its rendered parameters contained the sample id as "(id)", "(id,", ",id," or ",id)". Job.parameters joins the arguments with ", ", so the last two forms never matched, and a sample that was not a job's first argument was missed: getMatchesForSampleVs(5, 12) was found for sample 5 but not for sample 12. Jobs are now matched on Job.sample_ids, the sample id arguments of each method, as the server's sample_ids selector reads them. A threshold that happens to equal the sample id does not count, which matching every argument would have allowed. Job.sample_ids does not know the getMatchesForSampleVsGroup jobs of a cross compare, so their first argument is checked directly, as the text test did. A job whose arguments do not have the shape of its method is skipped instead of failing the whole query.
Selecting jobs by Job.sample_ids also found combineMatchesToCross jobs,
whose sample ids are the keys of their first argument; the text test
never matched them. Their result is the cross-compare matrix, not a
matching report, so MatchingResult.fromDict fails on it ("info" is
missing) and the chooser reported "Result query failed". After a cross
compare that job is also the newest finished one, which the chooser
preselects. Those jobs are skipped again; the per-sample
getMatchesForSampleVsGroup jobs of a cross compare stay selectable.
The tests now build jobs as the server stores them, with the knobs as
named parameters after the positional sample ids.
Collaborator
Author
|
Superseded by #50, which also handles the group list of a cross compare's per-sample job. |
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.
Closes #47.
McritInterface.queryJobs(sample_id)kept a job ifjob.parameterscontained the sample id as(id),(id,,,id,or,id).Job.parametersjoins the arguments with", ", so the last two forms never matched. A sample that was not a job's first argument was missed:getMatchesForSampleVs(5, 12)showed up for sample 5 but not for sample 12.Jobs are now matched on
Job.sample_idsrather than on the text. That property is the same in core 1.15.0'sLocalQueue.py, and it returns the arguments that are sample ids for each method.job.arguments, since the thresholds are arguments too.getMatchesForSample(0, 50, 10, 1, 50, 1000)would otherwise be selected for sample 50.Job.sample_idsdoes not know thegetMatchesForSampleVsGroupjobs a cross compare starts. For those, the first argument is checked directly, as the text test did. The combinedcombineMatchesToCrossjob stays out, as before. Its result is the cross-compare matrix, not a matching report, so the chooser could not load it.filteris the same as before.Testing
tests/core/test_mcrit_interface.pybuilds realJobobjects from a method and its arguments. It covers:getMatchesForSampleVs(0, 1, …)andgetMatchesForSample(0, 1, …)(minhash threshold 1):ruff format --check,ruff check, the sync checks andpython -m pytest tests(338 tests) pass.