Skip to content

Round-1 review fixes for #386: CI, release, docs - #631

Merged
neuromechanist merged 11 commits into
epic/324-pyodide-browserfrom
agent/20261117-fix386a-ci-docs
Nov 17, 2026
Merged

neuromechanist merged 11 commits into
epic/324-pyodide-browserfrom
agent/20261117-fix386a-ci-docs

Conversation

@neuromechanist

@neuromechanist neuromechanist commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Round-1 review fixes for the epic in #386, part A: continuous integration (CI), release, dependency metadata and documentation. The runtime items are in the companion pull request (card FIX-386b), which touches disjoint files.

Items fixed

  • F1: both release smoke tests install onnxruntime==1.32.0, the version uv.lock resolves on Linux, the comment says why, and test_release_smoke_tests_pin_the_locked_onnxruntime fails when the pins and the lock differ.
  • F2: releasing.rst no longer says the torch extra is outside eegprep[all].
  • F3 (workflow part): the license secret moves from the workflow into the test job; the pyodide job gets needs: lint, timeout-minutes: 120, permissions: contents: read and persist-credentials: false; tests/test_ci_workflows.py checks each.
  • F4: the ICLabel guide says releases up to 0.5.0 classified with PyTorch.
  • F5: a draft description for Epic: make EEGPrep browser-ready with Pyodide and ONNX ICLabel #386 built from measured sizes (wheels, networks, checksums) is written for the maintainers; this pull request does not edit Epic: make EEGPrep browser-ready with Pyodide and ONNX ICLabel #386.
  • F6: ADR 0071 gets a dated amendment for the torch and iclabel extras, the two packaged networks and the markers on psutil and pyedflib; no existing line changes.
  • F9: pyodide_benchmark.md says the 2026-10-12 numbers were measured with the harness on the epic branch that day.
  • F10: the pyproject.toml comment and pyodide_benchmark.md say that the floors test and the live CI install enforce the Pyodide rule and that tools/check_pyodide_base_resolution.py is run by hand.
  • F11: the installation guide ties PyTorch to pAMICA and the developer export only; the GPU advice moves into the pAMICA section and the stale memory tip is removed.
  • F12 (this card's part): no document, workflow or docstring adds --extra iclabel next to --group dev; the text says the dev group includes ONNX Runtime; docs.yml keeps its extra because it has no dev group.
  • F13: float32_model (path, size, SHA-256 of iclabel.onnx) in tools/iclabel/parity_report.json, produced by evaluate_model (which records the float32 file the quantize step is given, so a rebuild records the network it ships), checked by a test (and against the frozen teacher's source) and by release.yml, which fails when the packaged file differs; the regeneration docs now say that replacing iclabel.onnx also means refreezing the teacher and updating the manifest's source hash.
  • F23: the dev group's ONNX Runtime has an Intel Mac marker (1.23.2 there, the last release with a macOS x86_64 wheel, for Python 3.12 and 3.13 only); uv lock adds only that entry, coloredlogs, humanfriendly and split resolution markers; a test checks the lock carries such a wheel.

Ruling for this card's rows

Item Outcome Ruling
F1 Fix Pin 1.32.0 (the lock's Linux version) in both smoke tests, say why, and test that the pins equal the lock.
F2 Fix Delete "not part of eegprep[all]".
F3 Fix (this part) The token moves into the test job; pyodide gets permissions, needs: lint, timeout-minutes: 120, persist-credentials: false. Path filters declined: the job is the only CI check of the browser path and depends on the whole tree.
F4 Fix "up to 0.5.0".
F5 Fix A draft body from measured facts, applied by the maintainers.
F6 Fix A dated amendment section in ADR 0071, not a new number.
F9 Fix Say the numbers were measured with the epic branch's harness; no re-measurement.
F10 Fix Say the floors test and the live CI install enforce the rule and the script is run by hand.
F11 Fix Retarget both PyTorch sections to pAMICA.
F12 Fix (this part) The dev group carries ONNX Runtime, so drop --extra iclabel wherever --group dev is used; docs.yml stays.
F13 Fix float32_model in the report, checked by a test and by release.yml.
F23 Fix Intel Mac marker on the dev group's ONNX Runtime.

Tested

  • ruff check .: All checks passed; ruff format --check .: 967 files already formatted; ty check: 9 diagnostics, all unresolved imports of torch, onnx and pamica in files this pull request does not touch (this environment has no extras; the CI lint job installs them all).
  • ./pre-commit.py --changed-from origin/epic/324-pyodide-browser: OK; uv lock --check: Resolved 185 packages.
  • pytest tests/test_ci_workflows.py tests/test_iclabel_quantization.py tests/test_browser_dependency_floors.py tests/test_optional_extras.py tests/test_package_help.py with onnx==1.23.2 and EEGPREP_SKIP_MATLAB=1: 90 passed, 9 skipped (the torch tests).
  • The ICLabel gate tests (production_runtime, native_backend, evaluate_model_reproduces, async_matches_sync, float32_network) pass on ONNX Runtime 1.20.1, 1.23.2 and 1.32.0: 5 passed, 1 skipped each.
  • Each new check fails without its fix: the pin set back to 1.30.0, the report checksum changed, the float32 file not passed from main to the report, the float32 step deleted from release.yml, each of the five pyodide job and secret settings undone, and the base uv.lock restored.
  • Regenerating the 8-bit network from the packaged full-precision file reproduces the packaged file byte for byte and the report outside metrics and float32_model; a compile of the exported dev group for x86_64-apple-darwin with wheels only failed on ONNX Runtime before the change and passes after it.
  • actionlint on test.yml and release.yml: 4 findings (shellcheck notes in untouched steps) on the base and on this head, the same ones.

Not run: Tests (pull requests into the epic run no test.yml; they run on #386 after this merges), the torch regeneration tests, the docs build, the EEGLAB reference workflow.

Refs #386

Card FIX-386a of the NEMAR portable-compute program.

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Code review skipped — your organization has no extra usage available to pay for this review.

If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.

Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.

@claude

claude Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @neuromechanist's task in 1m 16s —— View job


Code review

  • Overall assessment: Needs one fix. The CI hardening (secret scoped to the test job; the pyodide job's permissions, needs: lint, timeout-minutes: 120 and persist-credentials: false), the onnxruntime 1.32.0 pin and its lock check, the Intel Mac marker and lock test, and the doc retargeting (F2, F4, F9–F12) all do what the description claims. One problem: the new float32_model record does not fit the documented rebuild sequence.
  • Highest-risk area: evaluate_model in tools/iclabel/quantize_iclabel_onnx.py, together with the rebuild steps in its docstring and in docs/source/releasing.rst.
  • Merge recommendation: needs changes

Blocking

None.

Important

Following the documented ICLabel rebuild leaves a stale float32_model.sha256 in the report
tools/iclabel/quantize_iclabel_onnx.py:432-438 (evaluate_model), docstring lines 23-31, and docs/source/releasing.rst steps 2-4.

  • evaluate_model hashes PACKAGED_FLOAT32_MODEL (src/eegprep/plugins/ICLabel/iclabel.onnx) when the quantize step runs.
  • Both the docstring and releasing.rst copy the new export into src/ only after that step: quantize first, then cp build/iclabel/iclabel_float32.onnx …/iclabel.onnx.
  • releasing.rst itself says a fresh PyTorch export need not be byte-identical. When it isn't, the report keeps the old file's hash, and both test_parity_report_records_the_packaged_model_and_frozen_inputs and the new release.yml float32 check fail.
  • Nothing wrong ships, but anyone who follows the documented procedure gets a confusing failure.

Suggested fix:

  • Simplest: in both places, copy the float32 export to src/eegprep/plugins/ICLabel/iclabel.onnx before the quantize step.
  • Alternative: have evaluate_model hash the --float32-artifact it is already given, recorded under the packaged path name.
  • Either way, add a note to the "if netICL.mat changes" paragraph: the new float32 SHA-256 must also go into the teacher source in evaluation_manifest.json. Otherwise test_frozen_teacher_came_from_the_recorded_full_precision_network fails after a refreeze.

Fix this →

Nits

None.

Test gaps

None. Every new rule has a test: the pin equals the lock, the lock has an Intel Mac wheel, release.yml checks the float32 network, the pyodide job settings, and the report's float32_model.

EEGLAB parity notes

None. This PR changes no EEGLAB-ported processing code (only CI, docs, the lock file and ICLabel tooling), so it needs no MATLAB reference run.


  • Pre-review gate and head check (HEAD 12459de matches the PR head; no earlier review)
  • Read diff and repository instructions
  • Review passes (instructions, conventions, correctness, parity)
  • Validated findings; posted one inline comment on tools/iclabel/quantize_iclabel_onnx.py

I posted this review here and as one inline comment; the skill's separate gh pr comment summary was not posted, because this session allows only this comment to be edited.

``iclabel_net.py``, or this script, from the repository root::

uv sync --group dev --extra torch --extra iclabel
uv sync --group dev --extra torch

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Important: in this rebuild sequence, float32_model.sha256 goes stale after a real rebuild.

evaluate_model hashes PACKAGED_FLOAT32_MODEL, the file in src/, when the quantize step runs (L432-L438). The new export reaches src/ only on the cp line that comes after it. When the re-export changes bytes, which can happen with any new PyTorch version, the committed report keeps the old hash. test_parity_report_records_the_packaged_model_and_frozen_inputs and the new release.yml check then both fail.

Fix: move cp build/iclabel/iclabel_float32.onnx src/eegprep/plugins/ICLabel/iclabel.onnx above the quantize command, here and in docs/source/releasing.rst steps 3 and 4. Another option is to have evaluate_model hash the --float32-artifact it is given.

@neuromechanist
neuromechanist merged commit d2f0b12 into epic/324-pyodide-browser Nov 17, 2026
1 check passed
@neuromechanist
neuromechanist deleted the agent/20261117-fix386a-ci-docs branch November 17, 2026 21:53
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.

1 participant