Skip to content

PROJECT: QuantEcon benchmarking programme (code performance & execution) #335

Open
0 of 4 issues completed
Open

Description

@mmcky

Where we stand (verified 2026-09-21 10:53 AEST)

Next: QuantEcon/skills#4 — what is left of workstream B is documentation and rollout: the rubric in the manual (QuantEcon/QuantEcon.manual#104) and plugin auto-install across the lecture repos, none of which has a .claude directory yet.

Workstream B has delivered. The evaluation system from QuantEcon/lecture-python.myst#717 landed as the benchmark plugin 0.3.0 (QuantEcon/skills#5, 2026-07-27), was made triage-first in 0.4.0 (QuantEcon/skills#33, 2026-08-12), and since 2026-08-25 is qe:benchmark in the org's qe plugin, so the wording "as a benchmark plugin" under Structure no longer holds. It was validated against lecture-python.myst#717, which closed on 2026-08-07 with a formal no-conversion verdict; the from-scratch run against lecture-python.myst#654 was not done, and that pull request also closed unmerged, which is why the build-and-validate task below stays open. Rubric v2 (QuantEcon/skills#7) and two testing reports (QuantEcon/skills#10, QuantEcon/skills#14) are open. Nothing has landed under the skill since 2026-08-25.

Workstreams A and C have not moved. benchmarks was last committed to on 2025-11-27 and tool-lecture-benchmark on 2026-02-23, so steps 2 and 3 of Sequencing have not started. An offer of GPU hardware for workstream A is in the comment of 2026-08-04.

The shared result and environment-descriptor schema, the first blocking deliverable, is not started. It was given a home in QuantEcon/project-reporting on 2026-07-15 and an issue on 2026-09-21 (QuantEcon/project-reporting#16, private).

Scope

Code benchmarking and execution performance for QuantEcon computational work. This programme is deliberately focused: AI/LLM evaluation benchmarks (e.g. benchmark.translate-zh-cn) are a separate domain and out of scope here (naming conventions for the two families to be settled separately). Early focus is the lecture series — they are user-facing and where implementation choices are most visible — expanding later to library and infrastructure benchmarks.

Motivation

The review thread on QuantEcon/lecture-python.myst#717 (ge_arrow JAX conversion) produced a quantitative evaluation system for deciding whether an acceleration rewrite actually improves a lecture, and demonstrated why our current practice misleads: warm %timeit-style benchmarks showed the JAX version 1.4–4.8× faster, while replaying the lecture's actual call sequence in a fresh process (so compile time counts) showed it ~45× slower. Getting the measurement methodology right changes conversion decisions.

We already have two scoped benchmarking projects — #264 (kernel/backend suite) and #289 (lecture build monitoring) — plus repos created from them. This umbrella issue organises them into one programme with shared methodology, and adds the missing middle layer that #717 surfaced.

Structure — three workstreams

A. Kernel/backend suite — existing, #264. Library-level benchmarks (NumPy / Numba / JAX CPU / JAX GPU / Dask) across problem sizes, producing crossover curves ("GPU wins above size N for operation X"). This is the reference data layer. Repo: benchmarks.

B. Per-lecture implementation evaluation — new, from QuantEcon/lecture-python.myst#717. Given a lecture's actual problem sizes and call pattern, which implementation should it use — and did a conversion PR improve it? Deliverables: the evaluation scripts (being gathered by @xuanguang-li from the #717 thread), a reusable agent skill (working name /eval-py-acceleration) built with him, and the rubric documented in the manual (tracked in QuantEcon/QuantEcon.manual#104). Both the scripts and the skill live in the new QuantEcon/skills repository as a benchmark plugin, so the harness is versioned once and distributed everywhere (see #304 for the marketplace mechanism). This layer consumes workstream A's crossover data. Validation cases: lecture-python.myst#717 and lecture-python.myst#654.

C. Longitudinal monitoring — existing, #289. Per-lecture execution-time tracking across publish-* releases and environment.yml changes, with regression detection (e.g. the annual Anaconda upgrade cycle). Repo: tool-lecture-benchmark.

Shared foundations

Sequencing

  1. Workstream B first (lectures are user-facing): gather the #717 scripts, build and validate the /eval-py-acceleration skill in QuantEcon/skills, document in the manual.
  2. Extract the harness patterns from B to seed the workstream A suite.
  3. Wire workstream C into CI for release/environment regression tracking.

Tasks

  • Attach PROJECT: Performance Benchmarks Suite for Numba, Dask, JAX (CPU/GPU) #264 and Project: Lecture Performance Benchmarking & Monitoring System #289 as sub-issues of this umbrella
  • Scaffold QuantEcon/skills as a Claude Code plugin marketplace with a benchmark plugin (skill + scripts)
  • Workstream B: collect the evaluation scripts from the lecture-python.myst#717 thread into QuantEcon/skills (benchmark plugin)
  • Workstream B: build /eval-py-acceleration and validate against lecture-python.myst#717 and lecture-python.myst#654
  • Workstream B: manual documentation (tracked in QuantEcon/QuantEcon.manual#104)
  • Roll out marketplace auto-install settings (extraKnownMarketplaces + enabledPlugins in checked-in .claude/settings.json) across the lecture repos once the skill stabilises
  • Adopt the as-used measurement standard in a short written note all workstreams reference
  • Define the shared result + environment-descriptor schema (commit, environment hash, runner class, hardware, library versions) — first blocking deliverable: telemetry reports, harness results, and kernel-suite results all write to it (extends Proposal: emit a machine-readable execution_status.json for lecture build/execution status #314; see the telemetry design comment below)
  • Telemetry: post-build per-cell execution report from .jupyter_cache (nbclient already records metadata.execution by default) + PR-diff screening comment on preview builds
  • Prose feature (separable): an {exec-time} role resolving measured cell durations into lecture text (Sphinx extension now, mystmd plugin post-migration)
  • Revisit expansion beyond lectures (QuantEcon.py benchmarks, wasm comparison, runner/cost benchmarking)

Related

Sub-issues

Sub-issues

0 of 4 Issues completed
Loading 4 sub-issues

Activity

  1. mmcky commented on Jul 7, 2026

    @mmcky
    ContributorAuthor

    Design update: an always-on telemetry layer, and how the three workstreams divide

    Working through how the /eval-py-acceleration skill should extract and time lecture code surfaced a cheaper, always-on complement that reshapes the programme's architecture. Recording the design here.

    Key discovery: per-cell timings are already being captured

    nbclient — the executor under MyST-NB / Jupyter Book — records per-cell execution timestamps by default (record_timing = True, verified on nbclient 0.10.2 in our build environment). Every executed cell already carries metadata.execution timestamps (duration ≈ iopub.status.idle − iopub.execute_input), and jupyter-cache stores the executed notebook with this metadata intact. So every CI build is already generating per-cell timing data; nothing currently surfaces it.

    The gap is provenance: the notebook only carries kernelspec/language_info — no hardware, runner class, library versions, or jax_enable_x64 state. Provenance must be attached at report time by the build workflow (commit SHA, environment.yml hash, runner class, CPU/GPU model, key library versions), which knows all of it.

    Proposed telemetry pipeline

    • Capture — already happening via nbclient (no work).
    • Persist — a post-build step reads .jupyter_cache and emits a machine-readable execution report: per cell (label, duration) plus the provenance stamp. This is an extension of Proposal: emit a machine-readable execution_status.json for lecture build/execution status #314 from per-document status to per-cell timing — same artifact, richer schema.
    • Compare — PR preview builds already execute changed lectures, so diffing cell timings against the last main build gives an automatic screening comment ("cell solve-ex4 went 8 ms → 950 ms") at zero extra execution cost. This would have flagged the regression in [ge_arrow] Update to JAX and compare runtime lecture-python.myst#717 the day the PR was opened.
    • Monitor — reports accumulate into build history and execution statistics (this is workstream C's data source): slowest cells per repo, post-merge drift, before/after distributions for environment upgrades (turns the Anaconda-cycle validation sweeps into a query), runner-class cost attribution.
    • Prose (future, separable) — a role like {exec-time} resolving a labelled cell's measured duration into lecture prose. {code-cell} :name: already provides the reference identity; MyST-NB precedents exist (nb-exec-table, glue). Needs a small Sphinx extension now and a mystmd plugin post-migration.

    Division of labour across the workstreams

    • A calibrates — kernel crossover curves on standardized code, stable over time, independent of lecture edits.
    • B diagnoses — the skill: episodic, comparative, controlled. Two implementations of one lecture, same host, K replications, float32/float64 toggles, cold/warm decomposition, recompile audits. Telemetry cannot do counterfactuals — a build never runs two versions of a lecture — so the clinical harness stays.
    • C observes — continuous, observational, accumulating; n=1 per build on shared runners, so it screens and trends but does not render verdicts.

    Telemetry triggers and pre-loads B (a flagged cell hands the skill its as-used numbers for free); B's verdicts annotate C's history (explaining why a trend line stepped).

    Sequencing consequence

    The shared result + environment-descriptor schema is the first blocking deliverable — telemetry reports, harness results, and kernel-suite results should all write to it so the datasets join. Task list updated accordingly.

    Caveats recorded

    Telemetry is n=1 per build on shared runners — good for order-of-magnitude regressions, not fine verdicts. jupyter-cache mixes runner vintages for unchanged notebooks, so benchmark-grade comparisons need cache-busted runs or per-notebook provenance. Cell-level timing measures the whole cell, so keeping solves and plots in separate cells becomes measurement hygiene — arguably a style-guide point of its own.

    Cheap first probe

    A ~50-line script reading a CI .jupyter_cache and emitting the per-cell timing report for one repo, then diffing the lecture-python.myst#717 preview build against main to see whether the known regression falls out.

  2. mmcky commented on Aug 4, 2026

    @mmcky
    ContributorAuthor

    project-compute is planning two GPU machines, and one of them is explicitly a benchmarking testbed — so this is an offer of hardware to workstream A, not a proposal about methodology.

    What would be available. quantecon-gpu2 is two TITAN RTX cards (Turing sm_75, 24 GB each) that QuantEcon already owns — currently powered down and shipping to Wharton. quantecon-gpu1 is a workstation whose obsolete card is being replaced, with a used 24 GB Ampere recommended. Together that is two architecture generations on hardware we control, which is the shape workstream A's crossover curves want: "GPU wins above size N for operation X" has a different answer per generation, and one data point cannot show that.

    Timing, honestly. Neither is available today. gpu2 needs freight and recommissioning; gpu1's card is recommended but unbought, with a platform review on 10 August. So this is "when you reach workstream A", not "now".

    The question that would actually help us. Is owned hardware useful to this programme at all, or is the reference data only meaningful measured on the runners we actually build on? We would rather know before treating benchmarking as a reason to buy anything — project-compute has been removing planning that siblings already own, and we do not want to add hardware demand you have not asked for.

    Worth noting the environment-descriptor schema already records hardware per result, so multi-generation results should fit the design rather than complicate it.

  3. added theissue type on Sep 6, 2026
  4. mmcky commented on Sep 21, 2026

    @mmcky
    ContributorAuthor

    Update, 2026-09-21 10:53 AEST — first status section on this tracker; the body had not been edited since 2026-07-07. Every claim in it was checked today against the repositories and issues it names. Three changes, agreed by the owner. The list: QuantEcon/skills#4 (workstream B's plan) and a new issue for the shared schema are attached and placed first and second, matching Sequencing; both were parentless. Progress reads 0 of 4 where it read 0 of 2, by a change of membership and not of work. Tasks: two boxes ticked because they are verifiably done (the sub-issue attachment, on 2026-07-07; the scripts, in QuantEcon/skills#5); the build-and-validate box stays open because the lecture-python.myst#654 half was never run. The stage stays active: workstream B shipped real work through 2026-08-25 that this tracker could not show, since its plan was not a child and the registry's deliverables did not name it; a registry note will say that B is the live workstream and that A and C have not started. This row is active, so the stamp wants refreshing about monthly.

  5. mmcky commented on Oct 4, 2026

    @mmcky
    ContributorAuthor

    Naming note, 2026-10-05. The two machines offered to this project from project-compute were renamed (decision on QuantEcon/project-compute#26). quantecon-gpu2, the Wharton machine with two TITAN RTX cards, is now qe-wharton1-gpu; quantecon-gpu1, the i9 tower whose card is on hold, is now qe-anu1. The offer itself is unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions