Skip to content

benchmarks: the PyneCore harness is kept outside this repository; its leg is optional - #383

Merged
luisleo526 merged 3 commits into
mainfrom
lv/pyne-private
Oct 13, 2026
Merged

luisleo526 merged 3 commits into
mainfrom
lv/pyne-private

Conversation

@luisleo526

Copy link
Copy Markdown
Collaborator

Summary

The PyneCore comparison leg of the benchmark harness is kept outside this repository, and benchmarks/run_all.sh now treats it as optional.

  • runners/run_pynecore.py, speed/time_pynecore.py and the load-time table of the 2026-09-29 window are removed from this tree.
  • run_all.sh runs the PyneCore leg only when PYNECORE_HARNESS_DIR names a directory holding runners/run_pynecore.py and speed/time_pynecore.py; otherwise it skips the leg with a message. PINEFORGE_REPO_ROOT is exported for the harness. SKIP_PYNE=1 still skips only the PyneCore strategy runs and the canonical indicator run.
  • speed/aggregate.py takes --pynecore as optional. With it, the output is unchanged (the method sentence now matches the committed results/speed.md); without it, the PyneCore columns and rows are left out. A run without PyneCore timings writes _workdir/speed.md and never rewrites the committed results/speed.md.
  • The 36x median speedup stays in the README and speed.md with its date and engine commit (2026-09-29, 35db01c8); it is not re-measured here. The 200 strategies behind it are described as 100 corpus probes and 100 held-out private strategies.
  • check_provenance.py keeps checking every number it checked. Its claim for the closed half follows the new wording, and the speedup claim now also checks the 100/100 split against the selection manifest.

Tests

benchmarks/tests/test_run_all.py runs the real run_all.sh against stand-ins in the harness-absent cases (variable unset, directory missing, SKIP_PYNE=1 with the harness present) and in the harness-present cases (absolute and relative path); test_aggregate.py runs the real aggregate with and without --pynecore; test_check_provenance.py covers the split.

Verification

Release profile on lab hosts (lab remote, clean tree):

  • harness and private fixtures absent: 604 rows run, 306 skipped (the absent set), all passed.
  • with the private fixtures overlaid: 910 of 910 rows run and passed.
  • a mutated copy of run_all.sh that lets a run without the harness overwrite the committed speed table fails test_benchmark_harness.

Row counts and floors did not move.

🤖 Generated with Claude Code

luisleo526 and others added 3 commits October 14, 2026 00:06
… PyneCore leg is optional (BIZ-11)

The three files that drove PyneCore (benchmarks/runners/run_pynecore.py, benchmarks/speed/time_pynecore.py and the
load trace benchmarks/results/raw/2026-09-29-35db01c8/loads/pynecore-load.tsv) are no longer in the public tree.
A maintainer who has the harness points PYNECORE_HARNESS_DIR at it and the PyneCore leg runs exactly as before;
without it benchmarks/run_all.sh prints "PyneCore harness not present (set PYNECORE_HARNESS_DIR to the private
harness); skipping the PyneCore leg" and carries on with PineForge, PineTS and vectorbt.

* benchmarks/run_all.sh: PYNECORE_HARNESS_DIR (unset = skip), a visible skip line for every PyneCore step (strategy
  runs, canonical indicators, speed timing, the PyneCore data conversion), PINEFORGE_REPO_ROOT exported so the
  harness finds this checkout, and the indicator comparison is skipped only when neither the harness nor a PyneCore
  indicator output exists.
* benchmarks/speed/aggregate.py: --pynecore is optional. Given, the output is byte-identical to before; absent, the
  PyneCore columns, rows and the PyneCore method lines are omitted and a note goes to stderr.
* benchmarks/compare.py: the docstring says the PyneCore runner is private and optional (no code change: an engine
  without output was already reported n/a).
* benchmarks/tests/test_run_all.py: the existing scenarios get their PyneCore stub through PYNECORE_HARNESS_DIR,
  every assertion kept, and one new test covers the absent harness (the visible line, the run completes, no PyneCore
  output).
* benchmarks/results/raw/manifest.json: the entry for the removed load trace is gone.
* Published numbers, dates and commits are unchanged: the 36x median speedup stays measured at engine 35db01c on
  2026-09-29; only its method wording changes. check_provenance.py, uv.lock and pyproject.toml are untouched.
* Sentences reworded (named for the doc-revert gate, old first words): "runners/run_pynecore.py normalizes the output
  to TradingView's schema as pynecore_trades.csv." and "PyneCore is timed as the subprocess wall time of uv run python"
  (benchmarks/README.md); "PyneCore: subprocess wall time of uv run python runners/run_pynecore.py" (benchmarks/
  results/speed.md); "The same-window A/B of 35db01c against 063e446 on all 201 slots and" (benchmarks/results/
  raw/README.md); "Each case copies benchmarks/run_all.sh into a scratch tree whose engine runners are"
  (benchmarks/tests/test_run_all.py).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…-out private strategies (BIZ-11)

Where the PyneCore speedup is stated (README.md, benchmarks/README.md, results/speed.md and the aggregate that writes it), the
200 strategies are now described as 100 corpus probes and 100 held-out private strategies. The population paragraph of
benchmarks/README.md says the same, with the market and timeframe facts kept. The provenance claims follow the new sentences
exactly: the closed-half claim matches the new wording, and the speedup claim now also reads the two counts and checks them
against the timed slot names (100 corpus probes, 100 closed), so it is stricter, not weaker. No number changes.

Reworded sentences, named for the doc-revert gate:
* the market and timeframe that both the bench feed and the TradingView tapes cover.
* strategies both engines time (p5 15×, p95 131×), and 4.2× over vectorbt across its 13 ports.
* strategies both engines time, measured at engine on an AWS c7a.8xlarge with PyneCore timed as a subprocess.
* across the 200 strategies both engines time (p5 15×, p95 131×).
* (across 200 commonly-timed strategies): 36× (p5 15×, p95 131×)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…enerator carries the new wording, and a run without it never rewrites the committed speed table (BIZ-11)

A read of the change found the following; all are fixed here.

* The generator still emitted the old sentence naming the private runner and its command line, so regenerating speed.md would
  have put the path back into a public file. The harness-present branch of speed/aggregate.py now emits exactly the text of
  the committed speed.md, and a new test, tests/test_aggregate.py, runs the real aggregate with and without --pynecore and
  checks that block against both its own output and the committed file.
* A run without timings from PyneCore wrote its (different) table over the committed results/speed.md. It now writes
  _workdir/speed.md and says so; the committed file is not touched. Tested with an aggregate stand-in that writes to the
  path it is given: the committed file stays byte-identical in the absent cases and is the output in the present case.
* SKIP_PYNE=1 now means what it meant before: it skips only the PyneCore strategy runs and the canonical indicator run, not
  the .ohlcv conversion and not the PyneCore timing. The "harness not present" line is printed only when the harness really
  is absent. A run without the harness leaves the committed PyneCore trade lists and canonical output as they are.
* test_run_all.py: every case now starts from a clean slate (markers, outputs and committed PyneCore files re-seeded), so a
  result of one case cannot satisfy another; a new test runs with the harness present, with an absolute and a relative
  harness path, and checks that the runner sees PINEFORGE_REPO_ROOT, that the timings reach the aggregate as --pynecore and
  that the table goes to its usual place; a recording stand-in for pyne proves it is never called without the harness; the
  argument check also rejects --pynecore=... and any path ending pc_speed.json.
* check_provenance.py: the 100/100 split in the speedup claim comes from the selection manifest (source == closed, the
  replacement slot included) instead of a slug suffix; probes + held must equal n. The claim pattern is unchanged. A test
  covers names that disagree with their manifest source.
* README: the added pointer sentence no longer says "set PYNECORE_HARNESS_DIR to reproduce"; it says the harness is not
  distributed, when the leg runs, and that the published PyneCore figures are dated and not re-measured here. The manual
  timing command sets PINEFORGE_REPO_ROOT.

Reworded base sentences, named for the doc-revert gate:
* SKIP_BUILD, SKIP_PINEFORGE, SKIP_PYNE, SKIP_PINETS, SKIP_VECTORBT, SKIP_INDICATORS, SKIP_SPEED and SKIP_REPORTS each skip one step.
* skip PyneCore strategy + indicator runs and timing

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@luisleo526
luisleo526 marked this pull request as ready for review October 13, 2026 17:09
@luisleo526
luisleo526 merged commit 80e26e8 into main Oct 13, 2026
20 checks passed
@luisleo526
luisleo526 deleted the lv/pyne-private branch October 13, 2026 22:08
luisleo526 added a commit that referenced this pull request Oct 14, 2026
* docs: the 1.6.0-rc.1 changelog entry

The changelog section for the first candidate of 1.6.0, tag v1.6.0-rc.1 on
commit 04607c1: the selected-window contract
revision 1.3 and the typed failures behind it (#388), finite trade and summary
doubles in every report writer (#384, #388), the favicon of the API
documentation (#355), the removed CI time limits and command-line options (#378),
and the tests, CI and benchmarks changes since 1.5.0 (#375, #376, #377, #382,
#383, #385, #386, #387).

The entry is inserted above the 1.5.0 section; no existing line changes. The
date is the UTC date of the tag.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* README: link the apex pineforge.dev, not the www host

The README header link pointed at https://www.pineforge.dev. The product site
lives at the apex, https://pineforge.dev; the www host is being redirected to
it, and search indexes both forms today. One link changed, nothing else.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* CHANGELOG: add the selected-window mode and typed failures to the 1.5.0 notes

Two things that are in the v1.5.0 tag were missing from its notes: the opt-in
selected-window mode with retained pre-roll bars (#363, already in
v1.5.0-rc.1) and the typed failures that docker/run_json.py raises for
exceptions from the selected-window helper modules (_typed_failure).

The new subsection "Additions to the 1.5.0 notes" only states what the code
and the #363 text say, with the same "development-only parity candidate"
limits (contract revision 1.3-parity, no claim of complete value-ownership
coverage, cannot be promoted to stable). It adds lines and changes none.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

---------

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
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