Skip to content

ci(weekly): CI test for the mm-workflows PDBbind fix; the weekly lane green and shorter - #531

Merged
vjaganat90 merged 5 commits into
PolusAI:masterfrom
vjaganat90:fix/weekly-lane-rcsb-complexes
Oct 15, 2026
Merged

vjaganat90 merged 5 commits into
PolusAI:masterfrom
vjaganat90:fix/weekly-lane-rcsb-complexes

Conversation

@vjaganat90

@vjaganat90 vjaganat90 commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Stacked on #533 (ci/faster-run-workflows). Merge that first; this PR's own changes are the commits above it.

What

  • run_workflows_weekly.yml: the Codebase Sanity step goes (its tests were deleted in 6464d60, so it collected nothing and failed every run); workflow_dispatch inputs name the mm-workflows and image-workflows branches, so a corpus fix can be run here before it merges; the lane prunes the Docker build cache the on-the-fly image builds leave behind (41 GB, on a disk toil found too full to schedule on); the cwl-docker-extract step goes (run_workflows.yml does it on the same runner on every push); the weekly inline runs keep one form, flat_embedded, and the flat and embedded forms of the weekly workflows are checked at compile time by test_weekly_corpus_*; every corpus test prints its duration, and each step the disk it leaves; a final step, run after a failure too, removes what the lane wrote (job stores and outputs under autogenerated/, toil's work directories and history), so a run that fills the disk doesn't leave it full for the next job.
  • fix(compiler): a scalar literal on a union type with an array member takes the scalar member of its own type; any other scalar is wrapped into the array, as before. filter: !ii False on biobb's boolean | string[] port reached the tool as ['false'].
  • The corpora's config_ci.json lists fragments, library workflows that never run alone, and intensive workflows, which every push skips and the weekly lane runs, in place of run_blacklist and run_weekly. A partial failure stays out of the on-push runs by being one. The weekly compile checks cover the large intensive workflows, the ones the pull-request checks skip. fix: green weekly lane without PDBbind NovagenResearch/mm-workflows#267 renames its lists the same way; the two merge together.
  • The weekly job stops at 4 h (timeout-minutes: 240), so a workflow that runs away fails the lane instead of holding the runner for GitHub's default of 6 h.

Why
The weekly lane has been red for over a year. With the earlier version of NovagenResearch/mm-workflows#267 it ran green (vjaganat90/sophios run 38318477355); the current pair, which also runs vs_demo_4, run_diffdock and nmr weekly, has not had a weekly run yet.

@vjaganat90
vjaganat90 force-pushed the fix/weekly-lane-rcsb-complexes branch 3 times, most recently from 824c19a to 1fa1683 Compare October 12, 2026 22:45
@vjaganat90
vjaganat90 marked this pull request as ready for review October 13, 2026 02:59
@vjaganat90
vjaganat90 force-pushed the fix/weekly-lane-rcsb-complexes branch from 1fa1683 to c9210a2 Compare October 13, 2026 14:59
@vjaganat90
vjaganat90 force-pushed the fix/weekly-lane-rcsb-complexes branch from c9210a2 to 8317619 Compare October 13, 2026 15:13

@darkclad darkclad left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed both commits (e0deb4b5, 83176190) against master b6225f46.

The weekly lane changes read right: the dispatch inputs use the same names as run_workflows.yml and fall back to the fork and main on schedule, the cleanup only touches toilwf-* newer than the start marker, the du ... || true survives pipefail, and nothing still carries the sanity marker. The test_examples.py refactor is a straight extraction; -k "weekly_corpus or inlined_workflows_weekly" collects the new tests and the one flat_embedded form.

The union fix does what it says for boolean | string[], and the six new cases pass. On Windows, test_diagnostics.py and test_ci_coverage.py fail the same 28 docker-dependent tests at head and base (93 vs 87 passed).

One blocker inline: an enum (or record) member in a union with an array now crashes _scalar_member_for. One non-blocking note on the string fallback.

Comment thread src/sophios/ir/complete.py Outdated
float member, a `File` or `Directory` object its class, and any scalar is a
`string`'s text, as `_coerce_scalar` converts them.
"""
exact = [member for member in members if _PYTHON_TYPE.get(member) is type(value)]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scalars keeps every non-array member, so an enum or record member reaches this lookup as a dict, and _PYTHON_TYPE.get({...}) raises TypeError: unhashable type: 'dict'. Through _job_value, ['null', {'type': 'enum', 'symbols': ['a', 'b']}, {'type': 'array', 'items': <same enum>}] with !ii a crashes at this head with that uncaught TypeError; at base it gives ['a']. Same for enum | string[]. Skipping non-string members here (or matching an enum member when the value is one of its symbols) would fix it, and a bool-stays-a-bool-style case with an enum member would pin it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. An enum or record member reached the lookup as a dict and raised the unhashable-type TypeError. The scalar lookup now skips members that are not type names, so the value falls through to the array member and !ii a gives ['a'], as at base. I added an enum-with-array case to the union test.

Fixed in 7b305fb.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reworked this after a closer look, so 7b305fb is gone and the fix is folded into 01d7dc7. 7b305fb still converted on the way (an int into a float member, a number into the string member), and that let string | int[][] given 3 become '3': the same problem one level down.

The rule is now exact: a scalar takes a scalar member only if it already is that member's type (a bool a boolean, an int an int or long, a float a float or double, text a string, a File or Directory object its class). Anything else, an enum or record member included, is wrapped into the array as on master. So string | int[] and float | int[] given 3 both stay [3], string | int[][] gives [[3]], and the enum case gives ['a'] without the TypeError. The test pins the four cases that change and the four from your review that must not.

Could you take another look?

Comment thread src/sophios/ir/complete.py Outdated
return widened[0]
if isinstance(value, dict) and value.get('class') in members:
return value['class']
return 'string' if 'string' in members else None

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the string fallback comes before the array, string | int[] given 3 now gives '3', where base gave [3]. For that union the array member holds the int exactly, and the string only by conversion. Trying an exact or widened match against the array's items before falling back to string would keep it [3]. Not blocking; it's an unusual union.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. The string fallback now applies only when no array member's items hold the value, so string | int[] given 3 stays [3]. A scalar that nothing holds still becomes the string text. I added a case for it to the union test.

Fixed in 7b305fb.

@vjaganat90

Copy link
Copy Markdown
Member Author

Thanks for the review. The enum/record crash and the string fallback ordering are both fixed in the new commit, with tests for each. The weekly lane and test_examples changes needed no edits.

Fixed in 7b305fb.

@vjaganat90
vjaganat90 force-pushed the fix/weekly-lane-rcsb-complexes branch from 7b305fb to 48da0c8 Compare October 13, 2026 15:49
@vjaganat90
vjaganat90 requested a review from darkclad October 13, 2026 15:50

@darkclad darkclad left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Round 2, at 48da0c80 against master b6225f46.

Both earlier comments are resolved in 01d7dc76. The exact-type rule skips enum and record members, so enum | enum[] and enum | string[] given a give ['a'] with no TypeError, and string | int[] given 3 stays [3], as at base. I also probed record | int[], long | long[], float | float[] given an int, and a Directory on Directory | File[]: the only results that differ from base are the intended exact matches. The 8 union cases pass. f8dee20a is unchanged from 83176190.

48da0c80: yml_paths_tuples_on_push excludes run_partial_failures directly, so dropping test_rand_fail from fragments changes nothing, and on-push, inline and partial-failure collections over the local corpora match base. On Windows, test_diagnostics.py and test_ci_coverage.py fail the same 28 docker-dependent tests at head and base (95 vs 87 passed).

One inline note on landing the key rename together with mm-workflows#267. Not blocking.

run_weekly: list[str] = config_ci.get("run_weekly", [])
# Library workflows: each reads an input or an edge that a parent workflow supplies,
# so none of them runs alone ("Missing required input parameter").
fragments: list[str] = config_ci.get("fragments", [])

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This rename has to land with NovagenResearch/mm-workflows#267, which renames the same keys in examples/config_ci.json. Each repo's CI pairs a same-named branch and otherwise falls back to the other's main/master, so whichever merges first reads the other's old keys. Either way fragments and intensive come out empty for mm-workflows, and every push then runs its ~45 library workflows (each fails with "Missing required input parameter"), plus vs_demo_4, run_diffdock, openfold and docking_rescoring, which run_blacklist held back on purpose. Reading the old names too for one round, e.g. config_ci.get("fragments", []) + config_ci.get("run_blacklist", []) and the same for intensive/run_weekly, lets the two merge in either order. Not blocking if they're landed together.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed that it has to land together, and I'd rather not add a shim for it. I'll ask for NovagenResearch/mm-workflows#267 to be merged first and merge this right after, so the two repos read different names only for the few minutes in between, and only a run that starts in that window sees it.

@vjaganat90

Copy link
Copy Markdown
Member Author

Thanks for the second pass and for probing the union cases and the on-push, inline and partial-failure collections. Nothing to change here. The key rename in this PR and the matching rename in mm-workflows#267 are meant to land together, as you noted.

@vjaganat90
vjaganat90 force-pushed the fix/weekly-lane-rcsb-complexes branch 11 times, most recently from c025805 to c29dbc6 Compare October 15, 2026 06:01

@darkclad darkclad left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM at c29dbc6. This covers this PR's five commits above #533's head 14cd8c0a; the commits under them belong to #533.

Since round 2, 39ec3483 and f39bd174 are unchanged from 01d7dc76 and f8dee20a, and adac2c49 differs from 48da0c80 only by the skip_pypi_ci marker that master now carries. 3650e8f0's 4 h cap leaves about twice the 2 h 04 m that the last green weekly job took (vjaganat90/sophios run 38318477355). c29dbc6c removes the two run-post: false lines that f39bd174 added, so the PR's net diff no longer touches setup-miniconda.

I also went through NovagenResearch/mm-workflows#267 at 2e2cf27b. download_binding_complexes keeps extract_pdbbind_refined's micromolar value column, its binding_data.txt line format and its dG formula. The table gives the 10/6/7/9 rescoring bins and the 18 sub-nanomolar complexes the description states. I ran the embedded script against RCSB for all 40 complexes: every SDF holds one molecule, and every protein has one chain with the ligand stripped. No reader of run_blacklist or run_weekly is left in sophios, and image-workflows has no config_ci.json, so the rename only has to land together with #267, as already agreed in the thread.

@vjaganat90
vjaganat90 force-pushed the fix/weekly-lane-rcsb-complexes branch 2 times, most recently from 53858b8 to 32b3f34 Compare October 15, 2026 15:19
…mber of its own type

A union with an array member wrapped every scalar into the array, so
`filter: !ii False` on biobb's `boolean | string[]` port reached the tool as
`['false']`. A scalar that already is a scalar member's type now takes that
member: a bool a `boolean`, an int an `int` or `long`, a float a `float` or
`double`, text a `string`, a `File` or `Directory` object its class. Any
other scalar, one that would need a conversion (an int into a float, a
number into text) or a union whose scalar member is an enum or a record, is
wrapped into the array as before.
The Codebase Sanity step goes: 6464d60 deleted the tests marked `sanity`,
so `pytest -m sanity` collected nothing and exited 5, and every weekly run
has failed on it since. The marker and the `not sanity` filters in the wheel
lanes go with it.

Optional workflow_dispatch inputs name the mm-workflows and image-workflows
owner and ref, so a corpus fix can be run here before it merges; they
default to the fork's `main`, as before.

The weekly scatters are sized to the runner's disk, and runs had filled it
(Errno 28). The lane prunes the Docker build cache the on-the-fly image
builds leave behind, and a final step, run after a failure too, removes what
the lane created after its own start marker: the job stores and outputs
under autogenerated/, toil's work directories under /tmp and its history.
Both corpus lanes leave setup-miniconda's pkgs directory alone: its post
step stashed about 2400 extracted packages, so the next job's Setup
miniforge took 4.7 min instead of 0.5.

The lane stops repeating other checks. `cwl-docker-extract` goes:
run_workflows.yml does it on the same runner on every push. The inline runs
keep one form, `flat_embedded`, which stacks both transforms, instead of
fifteen full-scale runs in three forms; `test_weekly_corpus_*` checks the
forms of the weekly workflows at compile time in about a minute,
parametrized apart so the pull-request lanes keep skipping the large
workflows.

Every corpus test prints its duration, and the disk is printed before setup
and after each corpus step.
run_blacklist mixed library workflows, which never run alone, with
workflows too slow for every push, which then ran nowhere. The corpora now
list `fragments` and `intensive` workflows: every push runs the rest, and
the weekly lane runs every intensive one, in place of run_weekly. A partial
failure is left out of the on-push runs by being one, not by a second entry.
The weekly compile checks cover the large intensive workflows, the ones the
pull-request checks skip.
A workflow that runs away now fails the lane instead of holding the runner for GitHub's default of 6 h.
The runner no longer keeps extracted packages between jobs; skipping the step saved about 4 minutes of the next job's setup.
@vjaganat90
vjaganat90 force-pushed the fix/weekly-lane-rcsb-complexes branch from 32b3f34 to cea2980 Compare October 15, 2026 16:03
@vjaganat90
vjaganat90 merged commit 649f011 into PolusAI:master Oct 15, 2026
3 checks passed
@vjaganat90
vjaganat90 deleted the fix/weekly-lane-rcsb-complexes branch October 15, 2026 19:13
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.

2 participants