120 Commits
Author SHA1 Message Date
Vijay Janapa Reddi 4219592f17 Install PDF text extraction tooling before host verification 2026-11-05 06:09:06 +01:00
Vijay Janapa Reddi faef3f2c0a Preserve PDF typography and verify authoritative LaTeX diagnostics 2026-11-05 05:06:18 +01:00
Vijay Janapa Reddi 40dd715ae6 Verify PDF artifacts and preserve content during compression 2026-11-05 03:24:19 +01:00
Vijay Janapa Reddi e69b52addd Preserve include paths and provenance in generated volume entry points 2026-11-05 01:50:30 +01:00
Vijay Janapa Reddi 82757cc8d4 Merge dev into taxonomy branch for integration 2026-11-04 22:03:35 +01:00
Vijay Janapa Reddi 649d2954bb Refine taxonomy editorial workflow, presentation, and documentation 2026-11-04 22:03:03 +01:00
Vijay Janapa Reddi 7a548c0f1e vol2/ch15: add audited frontier compute and pretraining energy figures with series provenance
Add reproducible Epoch AI frontier training compute (@fig-ai-compute-growth) and single-run pretraining energy (@fig-frontier-training-energy) figures to Volume II, Chapter 15, paired with builder-reported anchors at declared measurement boundaries, deterministic CSV extraction and manifest receipts, and structured provenance enforcement across book CSV series and figure cells.
2026-11-03 00:49:25 +02:00
Vijay Janapa Reddi 284b2964a2 taxonomy: adopt Z39.19 and SKOS as the stated construction and representation standards
METHOD.md marks each applicable clause met, partial, or open, including the
departures: no expert committee, no human indexing trial, and model-assisted
decisions the standard assumes people make.

- Two audits applied the all-and-some test to 127 specializes edges; the 27
  both failed are retyped or removed, and specializes now exports as
  skos:broader while part-of stays associative under Z39.19 8.3.3.2
- Compiler enforces SKOS S27; tests validate the export
- Concepts record added_in and computed warrant counts
- Release adds an OWL relations vocabulary, DCAT metadata, CITATION.cff,
  scope notes, and redirect pages for identifiers
- Agreement reports Hooper and Rolling consistency
2026-11-02 14:21:39 +02:00
Vijay Janapa Reddi cec2230543 Add taxonomy usage dropdown and deduplicate taxonomy compiler and frontend 2026-11-01 10:15:51 +02:00
Vijay Janapa Reddi 532e793fb2 fix(taxonomy): resolve red-team and anti-reward-hack audit findings across schema, CI, and consumers 2026-10-31 23:16:49 +02:00
Vijay Janapa Reddi ae25ccccbd feat(taxonomy): enforce end-to-end LinkML single source of truth across Binder, StaffML, and site 2026-10-30 19:05:39 +02:00
Vijay Janapa Reddi 52178b6939 build(taxonomy): harden LinkML single source of truth, StaffML labels sync, and CI gates 2026-10-30 13:42:40 +02:00
Vijay Janapa Reddi be6b71577f binder: skip _build directories when scanning .bib files 2026-10-27 23:08:54 +01:00
Vijay Janapa Reddi 314db150aa Record tagging agreement and recompute it with binder concepts agreement
Subject agreement 78.7% (kappa 0.78) under the first rules and 83.7%
(kappa 0.83) after revising them on the same sample, which the record
marks as no longer held out.
2026-10-22 13:55:35 +02:00
Vijay Janapa Reddi 821ae599d3 Compile the ML systems taxonomy: codes, relations, releases, coverage
The framework compiler now accepts a groups tier and nested readable codes
(L4.4), resolves chapter pointers to titles and clean published URLs, and
rejects scope notes that cite a row or area that does not exist. The field
compiler enforces a controlled relation vocabulary, rejects duplicate concept
pairs, and keeps retired concept identities pointing at a replacement.

Each build writes public downloads (CSV, JSON, SKOS Turtle, GraphML, BibTeX)
to site/explore/downloads. `binder concepts coverage` scores recorded
checklists and fails when a judgment cites a concept that no longer exists.

Chapter URLs now use the flattened published form (/volN/<chapter>/...).
2026-10-22 12:30:40 +02:00
Vijay Janapa Reddi 1f9af17810 Add cross-volume concept explorer and coverage audit pipeline 2026-10-21 15:50:05 +02:00
Vijay Janapa Reddi 27d4f8114b binder: fix repo-root, build, doctor and info bugs; clearer errors; dedup
Bug fixes
- Build lock is keyed on books/ so builds started from different
  directories block each other (fixes two tests broken by 89b828efa3).
- ConfigManager resolves the repo root when binder runs from books/ or
  binder/, so bib, newsletter, doctor and render paths are right.
- `build <word> --all` treats intro/scaling/agentic/physical as chapter
  names (it built every volume), and Ctrl-C stops a --all loop.
- doctor checked chapter names that no longer exist and failed on the
  generated _quarto.yml; info defaulted to a deleted books/contents.
- `headings apply --path <typo>` no longer rewrites the whole book;
  `bib clean` stops on unreadable chapters instead of dropping entries.
- Discovery falls back to a line scan on invalid YAML instead of crashing.
- Volume III/IV were labeled Volume II in layout and release output.

Output
- Unexpected errors print the command, exception type, and raising
  file:line (new cli/core/errors.py), with the traceback on stderr.
- Chapter-not-found suggests the closest names and the list command.
- Silent except blocks in bib lookups, info, headings, layout,
  maintenance, preview and debug now say what went wrong.

Cleanup
- Shared qmd_files_under/display_path, file-rewrite loop, doctor result
  helper, preview server, clean helpers, volume display names.
- Removed legacy import fallbacks, dead config attributes, legacy backup
  restore logic, and unused imports.
2026-10-19 19:28:49 +02:00
Vijay Janapa Reddi 7c3aecc6b2 binder check: fix silent skips and passes, unify reporting, remove duplication
Bug fixes
- Single-file --path now scans in nine scopes that treated a file as a
  directory and passed having checked nothing.
- Citations: vol3/vol4 chapters were skipped since the bib unification;
  every volume now falls back to the shared references.bib, and a missing
  bib is reported. Line numbers match the exact key.
- Table caption scopes resume correctly after fences; pdf-entry-numbering
  reads the index files it exists to check; python-dollar-collision no
  longer stops at a one-line $$...$$; rendered-python-leak line offsets;
  float-flow handles :::: openers; pdf-verify no longer passes a failed
  edge-overflow row; checklist labels vol3/vol4 correctly.
- --check-scope reports check_scope_retired instead of crashing.

Output
- Checks that cannot run (missing PDF, EPUB, pdfplumber, PyMuPDF, aspell,
  unparsable YAML, a crashing checker) report an error with the command
  that fixes it instead of passing.
- Book-relative paths everywhere; index/registry findings carry file:line.
- Issues without a suggestion take the fix from check_catalog.yaml.
- Failures end with the command to rerun each failing scope; a clean run
  prints one summary line (suppressed by --quiet).

Cleanup
- One helper each for the index, LEGO/registry, and repo registry
  wrappers; merged audit-check runners and shared violation conversion.
- Removed dead helpers, aliases, constants, and unused imports.

Check counts on the books are unchanged for every pre-commit invocation.
2026-10-19 19:28:45 +02:00
Vijay Janapa Reddi 6218c52866 binder: clean up build worktrees when a parallel run is killed
Parallel and debug builds removed their worktrees only on normal exit or
Ctrl-C. SIGTERM (timeouts, agent harnesses) and SIGHUP (closed terminal)
killed the process before cleanup, and nothing ever swept the leftovers,
so detached worktrees piled up in $TMPDIR/binder-workspaces (28 GB today).

- run_jobs and the debug bisection now turn SIGTERM/SIGHUP into
  KeyboardInterrupt, so their existing cleanup runs.
- run_jobs first removes runs whose binder process has exited (the pid is
  in the run directory name) and prunes their worktree registrations.
- --keep-workspaces runs are marked and skipped by the automatic sweep.
- New `binder clean workspaces` removes leftovers on demand, kept runs
  included.
2026-10-19 18:52:14 +02:00
Vijay Janapa Reddi 6eb08beb60 fix(notation): retire unused registry macros, zero out .qmd raw-symbol baseline, and enforce notation-local coverage 2026-10-17 17:57:22 +02:00
Vijay Janapa Reddi aaa7266ecc binder check: accept options and files in any order (Python 3.11 argparse rejected --scope before a file) 2026-10-16 21:28:09 +02:00
Vijay Janapa Reddi 80411e9738 Merge dev into fix/pdf-number-offset 2026-10-13 20:50:30 +02:00
Vijay Janapa Reddi a068bedd16 books: scope number-sections: false to HTML; restore PDF chapter numbering
The 2026-10-12 HTML numbering change put a top-level number-sections: false
in 55 front-matter files, including each volume's PDF entry file. In a book
PDF that file's metadata is book-wide, so every chapter went unnumbered and
every figure and section reference printed as 0.x. The setting now sits under
format: html:, and binder check structure --scope pdf-entry-numbering fails
if an entry file turns numbering off book-wide again.

Verified with full PDF builds of all four volumes: figures print as 1.1 and
up, appendices are lettered, and HTML appendix pages stay unnumbered.
2026-10-13 19:35:17 +02:00
Vijay Janapa Reddi 0a0be97cd1 Merge fix/ledger-macros-cruise: last Ledger macros renamed, coined-nouns check, new covers for vol3 ch13 and vol4 ch17 2026-10-13 19:09:58 +02:00
Vijay Janapa Reddi 16c11c2307 vol2-vol4: point cross-chapter callout refs at their sections; enforce the check in every volume
A \ref to a callout defined in another chapter prints raw in per-chapter
HTML. Each one now names its target by @sec- (vol2 5, vol3 99, vol4 13).
In vol3 the recurring lighthouse asides keep one pointer to
@sec-vol3-intro-lighthouses per chapter and drop the rest. The vol2
conclusion margin pointer is split so each cites one section.
2026-10-13 18:46:49 +02:00
Vijay Janapa Reddi 1dc32728f3 binder: add prose --scope coined-nouns to ban "ledger"
All four books are clean after the plain-language pass; the check keeps the
word from returning. It flags and never fixes, because the plain replacement
(list, log, table, record, account) depends on what the record holds.
2026-10-13 18:35:42 +02:00
Vijay Janapa Reddi 4f14edb12c binder: check that each chapter prints its folder's number
check structure --scope number-offset requires a chapter's number-offset
to equal its NN_ folder number minus one. Two renumberings left stale
offsets that printed the wrong chapter number, and nothing caught it.
2026-10-13 15:05:01 +02:00
Vijay Janapa Reddi cccfdddb78 Merge dev into fix/figure-print-scale
No conflicts. After the merge, print-scale is 0 in all four volumes,
the mlsysim suite passes, and the overlapping vol1 and vol4 chapters build.
2026-10-13 11:51:46 +02:00
Vijay Janapa Reddi a4222cd41f Merge feat/concept-contracts: schema v2 chapter concept contracts, Volumes I-IV 2026-10-13 11:38:17 +02:00
Vijay Janapa Reddi a83c1f5692 Enforce figure print scale in pre-commit and CI
All four volumes now pass `check figures --scope print-scale`, so the check
moves from opt-in to enforced. It stays default=False in the figures group
(it executes chapter cells) and runs through two hooks instead, which CI
also runs:
- book-check-figure-print-scale: the changed chapter files only
- book-check-figure-print-scale-all: all volumes, when the shared style,
  the mlsysim plotters, or the check itself changes

`check figures --scope print-scale` now accepts the staged chapter files as
positional arguments, like other pre-commit scopes.
2026-10-13 11:31:51 +02:00
Vijay Janapa Reddi b094b15ff1 Merge feat/serving-energy-citations: measured serving energy, bib reseal 2026-10-13 11:06:25 +02:00
Vijay Janapa Reddi 366c32e303 binder: schema v2 concept-map contracts check and volume map
check structure --scope concept-maps now validates schema v2 maps: claims
cover exactly the owned concepts, one owner per concept per volume, and
every preview or touch names its real owner (previews point later).
concept-order lists concepts used before their owning chapter (opt-in).
info concept-map renders a volume's ownership map from its contracts.
The structure hook also runs when a *_concepts.yml file changes.
2026-10-13 11:04:57 +02:00
Vijay Janapa Reddi fe2552c559 binder: add bib reseal for house-style edits to sealed entries
`bib add` refuses existing keys, so an entry edited after its gateway
seal (sentence-case title, @misc -> @inproceedings, venue, pages) had no
binder path back to a verified manifest record; records were re-written
by hand. `bib reseal --key K --note "..."` re-resolves the source the
entry was sealed from (or a --doi/--arxiv/--url given), compares title,
author surnames in order, year, DOI, and pages with the edited entry,
and rewrites the manifest record only if they all agree. It never edits
references.bib.

`fetch_url` now reads the page head and records Highwire citation_*
meta tags (title, authors, year, pages, venue, DOI) as evidence, so
publisher pages such as PMLR are checked on authors and pages rather
than on caller overrides. Author comparison folds LaTeX accent escapes
(M\k{a}dry), Unicode diacritics, and name particles.
2026-10-13 10:49:14 +02:00
Vijay Janapa Reddi a5ba779ee4 Merge dev into feat/vol2-money-plots
Only bibs/ conflicted (adjacent additions on both sides). references.bib
keeps both sides; the Waymo data hub title takes dev's sentence case.
manifest.json is the union, dev winning on shared keys; the offline
ledger check passes.
2026-10-13 10:46:32 +02:00
Vijay Janapa Reddi f9f88aa0c2 Add check figures --scope print-scale for matplotlib figures
Body figures are scaled to the text block, so printed text size is the
font size times text width over cropped image width. The style module
fixes the font sizes; nothing measured the other half, and vol2 canvases
drifted from 0.62x to 1.04x with no check failing.

The scope executes each chapter's python cells in a subprocess, measures
every figure inside a #fig- div, and flags print-scale (outside the
range), figure-font (a literal size below the floor), raw-figure (a
figure made without setup_plot/set_book_style), and figure-exec. Limits
are read from mlsysim.viz.style, not defined in the check.

default=False: vol2 and vol3 pass; vol1 (96 findings) and vol4 (72) still
use 8-10 in canvases and await their migration passes.
2026-10-13 10:09:27 +02:00
Vijay Janapa Reddi fd8ad38332 vol1: clear pre-commit backlog surfaced by the dev sync
Branch commits skipped hooks; the full suite at the merge tip found these.

- Bib: drop duplicate epochai2026benchmarks from the merge; rename
  villalobos2022will to villalobos2024will to match its year; re-record
  ledger hashes for 24 entries whose content is unchanged (tidy reformat)
- Checks: scope cross-chapter-callout-ref to vol1 (vol2-4 carry 113 legacy
  refs); add Whetstone to heading proper nouns; lego-dead-code skips
  render output
- Units: computed sizes in decimal units, hardware capacities through
  fmt_memory_capacity (ch6, ch11, ch14, ch16)
- Prose: abbreviation first-use expansions after content moves, footnote
  marker placement, two footnote fixes, margin caption, bracketed source
  citations, index main, orphan and duplicate equation labels, dead
  LEGO exports
- Auto-fixers: Black on hidden cells, whitespace, blank lines, tables,
  bibtex tidy, canonical spellings
2026-10-12 22:39:35 +02:00
Vijay Janapa Reddi 591d91a444 binder: accept "collected for reference in" for appendix pointers
The margin-pointers scope required "developed / measured /
operationalized / enforced in" on every forward pointer, which rejected
the ruled Vol I wording for appendix targets. Appendix targets now also
accept "collected for reference in" (accepted, not required, so vol2-4
pointers are unaffected; all four volumes pass). The four remaining
Vol I appendix pointers that said "operationalized in" (ch11, ch12,
ch16 x2) now use the ruled wording.
2026-10-12 07:10:04 +02:00
Vijay Janapa Reddi 2ca419a5fc binder: flag cross-chapter \ref to callouts; ch3 points to the TCO comparison by section 2026-10-11 19:55:36 +02:00
Vijay Janapa Reddi 8f00502271 binder: markup check for raw LaTeX boxes that hide inline values from HTML 2026-10-11 19:53:36 +02:00
Vijay Janapa Reddi 40a27a1d50 vol1: rename ch03 ml_workflow to ml_lifecycle
Retitle the chapter ML Lifecycle and rename its folder, files, assets,
lab, slides, audit data, and instructor links, with redirects for the
old URLs. Section IDs keep the sec-ml-workflow prefix. Update the ch2
hand-off and the conclusion to name the lifecycle.
2026-10-10 19:40:22 +02:00
Vijay Janapa Reddi c3159192e0 test(binder): add unit tests for check catalog and template issue resolution 2026-10-10 16:36:47 +02:00
Vijay Janapa Reddi d3cc4f7449 refactor(binder): centralize check catalog and issue templates in yaml and pydantic model 2026-10-10 16:28:25 +02:00
Vijay Janapa Reddi 0680423883 feat(binder): add dedicated error code help panels and llm diagnostics guidance
Add error-code-mapped help panels for core Binder check groups:
- structure: document purpose_heading_missing, purpose_heading_classes, purpose_stack_missing, purpose_stack_file_missing, purpose_hook_missing, purpose_not_unnumbered, heading_level_skip, h2_missing_landing, appendix_opening_shape.
- numbers: document binary_units, unit_spacing, percent_spacing, percent_word_before, percent_in_prose, percent_in_table, mitpress_percent_in_caption, currency_usd_literal, currency_fmt_prefix_suffix.
- figures: document figure_missing_label, margin_figure_missing_caption (with margin_stack.svg exemption note), margin_figure_caption_above_image, caption_head_missing_bold, caption_head_separator, caption_body_lowercase_after_colon, missing_image, image_case_mismatch, incomplete_figure.
- prose: document contractions, duplicate_word, mitpress_above_below, sentence_starts_lowercase, manual_et_al, underscore_italics, standalone_prose, mitpress_spelling, mitpress_acknowledgements, mitpress_compound_prefix, mitpress_concept_term_capitalization, mitpress_latin_running_text.
- refs: document broken_reference, broken_citation, scaffold_citation, duplicate_citation_year, duplicate_citation_key, capitalized_ref, xref_sentence_start_case, callout_ref_missing_noun, callout_ref_form, redundant_xref_prefix, margin_pointer_direction.

Also advertise './binder/binder check all --path <file> --json' and '--plain' in check help and .pre-commit-config.yaml for machine-parseable diagnostics for LLMs and contributors.
2026-10-10 16:21:36 +02:00
Vijay Janapa Reddi 49b10b1ba9 fix(binder): exempt purpose architecture stack from requiring caption 2026-10-10 16:13:41 +02:00
Vijay Janapa Reddi edc64022f0 feat(binder): add purpose-stack check with clean guidance templates 2026-10-10 16:07:15 +02:00
Vijay Janapa Reddi 811d8f227a vol1: rename ch02 ml_systems to system_paradigms; revise intro, notation, about
Rename the chapter folder, assets, lab, slides, audit data, and staffml
links from 02_ml_systems to 02_system_paradigms, with redirects for the
old URLs. Revise the introduction, notation, conventions, and about
pages, adding the frontmatter stack figures. Add park2024offloading.
2026-10-09 23:11:44 +02:00
Vijay Janapa Reddi b08211b082 notation: vol4 fully on registry macros, one letter one meaning per section
Every vol4 math symbol is a registered macro: 2,342 vol4 registry entries
(mostly physical domain); the applier converted 18,945 sites; per-chapter
editors finished captions, fmt_math strings and 288 reviewed flags; 134
same-letter collisions were resolved (back-matter appendices judged per
derivation), with figures and fig-alt following. The notation chapter is
self-contained. Vol4 joins STRICT_CONVERTED_VOLUMES and
COLLISION_CHECKED_VOLUMES. Baseline 21,666 -> 2,721 (no converted volume
left with a raw symbol).

Registry, book-wide and rendering-neutral where it touches vol1-3:
- states, actions, observations and similar entries that baked in a running
  index (s_t, a_t, o_t, bar-alpha_k, f_k, G_k) hold the bare symbol; 370 uses
  now write the index, so o_{t+1} and s_{0:T} are possible;
- four entries registered twice merge (StateAtTurn into TrajectoryState,
  ActionObservation into TrajectoryObservation, ActionProposal into
  TrajectoryAction, TokenLossMask into PositionLossMask); the old names stay
  as aliases;
- LaTeX fixes: tau_{max}, mu_{min} braced; T_C for the Bouligand cone; the
  centroidal momenta no longer carry "in R^3"; v_d pairs with v_q.
Vol1-3 files touched by these changes verify identical. Vol4 PDF (1,071 pp)
and HTML build clean; HTML has 0 MathJax errors on every page except two
pseudocode blocks in appendix_ml that predate this change (\Statex is not
supported by pseudocode.js); vol3 PDF rebuilt clean.
2026-10-09 02:23:46 +02:00
Vijay Janapa Reddi da97674a3b notation: vol3 fully on registry macros, one letter one meaning per section
Every vol3 math symbol is a registered macro: 893 vol3 registry entries; the
applier converted the chapters (re-applied after the line-break fix);
per-chapter editors finished captions, fmt_math strings and the 128 ruled
review flags (restored dropped indices, grouped indices on labeled symbols,
SPRT and canary symbols, policy-superscript returns Q^pi, V^pi, A^pi); 70
same-letter collisions were resolved, the math appendix judged per
derivation. Chapters without front matter now carry one for notation-local.
The notation chapter is self-contained. Vol3 joins STRICT_CONVERTED_VOLUMES
and COLLISION_CHECKED_VOLUMES; validate checks back-matter appendices per
### derivation. Baseline 29,899 -> 21,666.

Registry: StateExposureLevel renders S (one level per index);
ServiceTimeVariationCoefficient renders c_s (also vol2 ch08, Kingman pair
with c_a); definitions widened where reviewers found them too narrow.
Vol3 PDF (913 pp) and HTML build clean, 0 MathJax errors on all 26 math
pages; vol2 PDF rebuilt clean.
2026-10-08 23:41:05 +02:00
Vijay Janapa Reddi eabd20b3c4 notation: vol2 fully on registry macros, one letter one meaning per section
Every vol2 math symbol is a registered macro: the applier converted 7,600
sites; per-chapter editors finished captions, fmt_math strings and the
reviewers' ruled fixes, proving each span with KaTeX; 43 same-letter
collisions inside sections were resolved (recolor, switch, new entry) with
figures, fig-alt and prose following. The notation chapter is
self-contained: rows only for symbols the chapters use, \Glyph for any other
symbol a note mentions. Vol2 joins STRICT_CONVERTED_VOLUMES and
COLLISION_CHECKED_VOLUMES; the glossary, a catalog like the notation
chapter, is exempt from the per-section rule. Baseline 37,038 -> 29,899.

Registry: CloudOffloadEnergy renders E_transmit (also vol1 ch02),
ResponseTimeStandardDeviation sigma_t, definitions widened where reviewers
found them too narrow, new entries merged. Vol1 ch10: brace the latency
reward exponent. Vol2 PDF and HTML build clean (0 MathJax errors on all 36
pages); vol1 PDF rebuilt clean.
2026-10-08 22:04:43 +02:00
Vijay Janapa Reddi 549fb053b1 notation: one letter, one meaning per section in vol1; vol2 registry entries
Volume I: the 60 places where one letter meant two things inside one top-level
section are resolved (author ruling: per section). 51 entries take a
distinguishing glyph confined to vol1 (upright SI micro, Kolda's A/B/C for
tensor decomposition with the mode order fixed, x_feat, p_val, ...), 10 sites
switch to an existing entry, 4 entries are new, and a few labels move into
words or figures (fig-perceptron's activation is now f). A general quantity
and its special case may share a letter (GEMM column N and square N; listed in
vocabulary.yaml same_glyph_ok). vol1 joins COLLISION_CHECKED_VOLUMES; the
check is clean. Three entries no chapter uses any more are retired;
\AcceleratorBatchTime gets a notation row.

Registry: the ~700 entries the vol2 conversion needs are registered (no
chapter uses them yet).
2026-10-08 13:36:29 +02:00