Skip to content

Phase 2: add Pyodide harness and ICA benchmark gate - #382

Merged
neuromechanist merged 6 commits into
epic/324-pyodide-browserfrom
feature/issue-375-phase2-pyodide-harness
Sep 17, 2026
Merged

neuromechanist merged 6 commits into
epic/324-pyodide-browserfrom
feature/issue-375-phase2-pyodide-harness

Conversation

@neuromechanist

@neuromechanist neuromechanist commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

Summary

Closes #375.

  • Adds a pinned Pyodide 0.29.5 Node harness with emfs: local-wheel transport.
  • Builds docopt==0.6.2 from its hash-checked sdist before installing the working-tree wheel.
  • Adds a real sample-data smoke pipeline and CI job with raw output artifacts.
  • Adds the exact 64 x 15,000 one-thread runica/Picard and runica-shaped NumPy-vs-BLAS benchmark for native and Pyodide.
  • Records the measured table and the Web Worker/worker-pool boundary in the docs.

Measured gate

  • Both ICA implementations reached the 512-iteration cap/non-convergence condition in the local native and Pyodide runs. Picard was faster, but the conservative browser-default gate is false because it did not converge.
  • SciPy BLAS was faster in three of four Pyodide microbenchmarks, but float32 activation was only 1.02x faster; the all-shapes/all-dtypes 1.2x Phase 3 gate is false.
  • Pyodide has no pthread support, so the benchmark is explicitly single-threaded. Web Workers are documented for UI isolation and independent-job pooling, not acceleration of one ICA solve.

Verification

  • tools/pyodide/run_pyodide.sh sample-data smoke: passed under Pyodide 0.29.5.
  • tests/test_pyodide_harness.py: 5 passed; the Node argument-validation check runs in the pinned-Node Pyodide CI job.
  • ./pre-commit.py: passed.
  • Ruff lint/format and ty: passed.
  • No-gallery Sphinx build: passed with pre-existing documentation warnings.
  • Full local non-GUI suite: 2,047 passed; unrelated failures remain for the pre-existing reref warning, missing optional local onnxruntime, network-only fixtures, and macOS Qt execution.

@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's extra usage balance is too low to start another review, so this review was not started.

An organization admin can add extra usage credits at claude.ai/admin-settings/usage.

Once credits are available, reopen this pull request to trigger a review.

@claude

claude Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Claude encountered an error after 0s —— View job


I'll analyze this and get back to you.

@neuromechanist

Copy link
Copy Markdown
Member Author

🤖 Phase 2 verification completed against CI run 35245625332.

The earlier P2 review finding about the undeclared Node dependency in the normal pytest matrix is fixed in bd544ce8: Node argument validation now runs in the pinned Node 22 Pyodide job, while the Python harness tests remain Node-independent.

All checks pass: pre-commit, Ruff/ty, the Python 3.10/3.11/3.12 platform matrix, and the Pyodide harness. The uploaded comparison records native/Pyodide ICA and matmul measurements.

The Phase 2 boundary is explicit and enforced: one ICA solve is single-threaded (thread_count=1); Web Workers or a worker pool apply only to independent jobs, not splitting one solve.

Measured CI decisions: picard_browser_default_retained=false; phase3_recommended=false. Both runica and Picard reached the configured conservative iteration cap without convergence, so no browser default is promoted from this benchmark.

No remaining actionable review findings.

@neuromechanist
neuromechanist merged commit 9057bd0 into epic/324-pyodide-browser Sep 17, 2026
8 checks passed
@neuromechanist
neuromechanist deleted the feature/issue-375-phase2-pyodide-harness branch September 17, 2026 19:54
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