21 Commits

Author SHA1 Message Date
Vijay Janapa Reddi
1e6d31388a fix: align binder volume index symlinks 2026-06-22 22:09:02 -04:00
Vijay Janapa Reddi
45aeb6b026 Audit citations and consolidate bibliography 2026-06-14 19:41:26 -04:00
Vijay Janapa Reddi
6860c2459f Centralize book checks in Binder CLI 2026-05-30 13:41:34 -04:00
Vijay Janapa Reddi
47c169f9f9 Enforce computed LEGO walkthroughs and registry-backed book sources.
Add binder gates that ban legacy constant aliases, hardcoded grid literals,
and prose operands next to {python} refs; migrate appendices and chapter
callouts to export intermediate values from mlsysim registries so worked
math stays machine-verified instead of hand-typed.
2026-05-25 15:49:27 -04:00
Vijay Janapa Reddi
69736d3bdb updates 2026-02-28 18:20:47 -05:00
Vijay Janapa Reddi
3266bc7dfa Standardize chapter discovery via Quarto config
Refactors chapter discovery across CLI commands to use a single, canonical source of truth: the volume's Quarto PDF configuration file.

Introduces a new `get_chapters_from_config` function in `core/discovery.py` that parses the `_quarto-pdf-{volume}.yml` to derive the ordered list of testable chapter stems. This ensures consistent chapter order for `build` and `debug` operations, reducing duplication and improving maintainability.

Updates `build.py` and `debug.py` to delegate all chapter list retrieval to this new centralized method within `ChapterDiscovery`. Also enhances chapter QMD file location to support shared content paths.
2026-02-28 17:08:17 -05:00
Vijay Janapa Reddi
d299e49d10 update 2026-02-28 16:25:00 -05:00
Vijay Janapa Reddi
77d0081e38 Refactors build process and validation logic
Refactors the build process to leverage shared output file resolution logic, ensuring consistency across build and debug commands.

Improves validation by streamlining bibliography handling and adding stricter citation matching.

Updates diagram dependencies and adjusts content for clarity and accuracy.
2026-02-22 12:06:46 -05:00
Vijay Janapa Reddi
2390c3ab31 Refactor: consolidate Quarto config layers and content reorganization.
Unifies Quarto metadata into shared base/format/volume fragments while carrying through chapter path, asset, and tooling updates to keep the repository consistent and easier to maintain.
2026-02-12 15:38:55 -05:00
Vijay Janapa Reddi
abe634ead2 Refactor: unify binder workflows and polish authoring UX
Consolidate Binder/extension command behavior, improve chapter navigation and QMD editor ergonomics, and carry forward Volume 1 content updates so build/debug and writing workflows stay aligned.
2026-02-11 12:34:06 -05:00
Vijay Janapa Reddi
51e720714d Add D·A·M Venn diagram and widen ML stack data bar connectors
- Widen gap between ML systems stack layers and data bar in both
  margin and full-size variants so connector lines are clearly visible
- Add D·A·M Intersection Landscape Venn diagram (SVG + PNG) to the
  D·A·M Taxonomy appendix with reference table and explanatory prose
- Add forward references to the Venn from Introduction and Part III
- Add learning objective for intersection mapping
- Chapter prose refinements across multiple chapters
2026-02-08 09:30:47 -05:00
Vijay Janapa Reddi
f40eb88879 Fix CLI config fallback and ml_systems chapter issues
CLI changes:
- Fix default PDF/EPUB config paths to use vol1 configs instead of
  non-existent combined configs (_quarto-pdf.yml -> _quarto-pdf-vol1.yml)

ml_systems.qmd fixes:
- Fix bottleneck_str formatting (value is already a string, not a number)
- Fix malformed imports where 'from physx.formatting import fmt' was
  incorrectly placed inside parentheses of another import block
- Fix Quarto cell directives placement (must come before any code)
- Fix precision=0 rounding 0.1 to 0 for energy values
- Update notation to use proper LaTeX subscripts ($D_{vol}$, $E_{tx}$, etc.)
2026-02-03 23:50:55 -05:00
Vijay Janapa Reddi
2b1490dcc8 Vol 1 chapter flow improvements, expanded references, and audit tooling
- Update chapter flow and narrative across conclusion, data_selection,
  dnn_architectures, model_compression, training, and 10+ other chapters
- Expand references.bib with additional ML systems and foundations entries
- Add new appendix content: assumptions, DAM framework, notation guide
- Update Quarto configs for PDF, HTML, and EPUB builds
- Add audit scripts for figures, tables, listings, and narrative analysis
- Add chapter flow analysis reports for systematic content review
- Include calc modules for hw_acceleration and appendix_algorithm
- Remove deprecated foreword.qmd and vol2 appendix_a.qmd
2026-02-01 17:39:17 -05:00
Vijay Janapa Reddi
f4ce6e4055 Update Vol 1 and Vol 2 content, CLI tooling, and PDF config
Edits across all Vol 1 chapters (benchmarking, serving, training,
frameworks, hw_acceleration, etc.) and Vol 2 chapters. Includes
data_efficiency rename to data_selection, build CLI improvements,
and copyedit PDF config addition.
2026-01-30 09:02:39 -05:00
Vijay Janapa Reddi
41e8df0552 fix: resolve config path detection and table parsing issue
- Update ConfigManager to correctly find quarto/ directory when running
  from book/ folder (expected working directory for the CLI)
- Fix data_engineering.qmd table: remove '#' prefix from 'schema version
  branches' that was being parsed as a Markdown heading in PDF builds
2026-01-25 11:29:42 -05:00
Vijay Janapa Reddi
0d8b3ea57c feat: add index.qmd symlink management for volume builds
Quarto book projects require index.qmd at the root level. This adds
automatic symlink management so that when building a specific volume,
the index.qmd symlink is updated to point to that volume's index file.

- Add _setup_index_symlink() method to ConfigManager
- Show index.qmd status in show_symlink_status()
- Automatically switch index symlink during volume builds
2026-01-25 11:05:35 -05:00
Vijay Janapa Reddi
ba737668c1 feat(cli): add volume flag support and fuzzy chapter matching
Implements two key improvements to the binder CLI:

1. **Volume flag support for chapter builds**
   - Volume flags (--vol1, --vol2) now work regardless of position in args
   - New build_chapters_with_volume() method routes chapters to correct config
   - Auto-prefixes chapter names with volume to disambiguate (intro -> vol2/intro)
   - Outputs to volume-specific directories (_build/FORMAT-vol1/, _build/FORMAT-vol2/)

2. **Smart fuzzy chapter name matching**
   - Prioritizes 'starts with' matches (ops -> ops_scale.qmd)
   - Falls back to 'contains' matches if no prefix match found
   - Enables shorter, more intuitive chapter references

Examples:
  ./binder pdf intro --vol2      # Uses vol2 config, auto-disambiguates
  ./binder html ops --vol2        # Fuzzy matches to ops_scale.qmd
  ./binder pdf serving --vol1     # Uses vol1 config, finds serving.qmd

Also fixes invalid aria-current property in Quarto YAML configs that
was causing validation errors during HTML builds.
2026-01-10 16:02:02 -05:00
Vijay Janapa Reddi
f31355c889 feat(volumes): implement volume separation for textbook
Add infrastructure for publishing Volume I and Volume II as standalone sites:

Volume Configs:
- Add _quarto-html-vol1.yml, _quarto-pdf-vol1.yml, _quarto-epub-vol1.yml
- Add _quarto-html-vol2.yml, _quarto-pdf-vol2.yml, _quarto-epub-vol2.yml
- Update navbar cross-links in all configs (book, kits, labs)

Volume Content:
- Add vol1/index.qmd, vol1/frontmatter/, vol1/backmatter/
- Add vol2/index.qmd, vol2/frontmatter/, vol2/backmatter/

Landing Page:
- Create landing/index.html with AI Engineering branding
- Add navigation to all resources (Vol I, Vol II, Full, TinyTorch, Kits)

Workflows:
- Add build_target input to book-build-container.yml (combined/vol1/vol2/all)
- Add deploy_target input to book-publish-live.yml
- Add matrix entries for volume-specific builds (Linux)
- Update deployment to handle /book/, /vol1/, /vol2/, and root

CLI:
- Update binder CLI to support --vol1 and --vol2 flags

Documentation:
- Update README.md with volume links and new URL structure
- Update book/README.md with correct paths

URL Structure:
- mlsysbook.ai/ -> Landing page
- mlsysbook.ai/book/ -> Full textbook
- mlsysbook.ai/vol1/ -> Volume I standalone
- mlsysbook.ai/vol2/ -> Volume II standalone
2026-01-10 09:28:25 -05:00
Vijay Janapa Reddi
073231734b feat: add volume support to Binder CLI
Add --vol1 and --vol2 flags for building individual volumes:
- ./binder pdf --vol1   Build Volume I as PDF
- ./binder pdf --vol2   Build Volume II as PDF
- ./binder epub --vol1  Build Volume I as EPUB
- ./binder epub --vol2  Build Volume II as EPUB
- ./binder list --vol1  List Volume I chapters only
- ./binder list --vol2  List Volume II chapters only

Add ambiguous chapter detection for chapters that exist in both
volumes (e.g., introduction, conclusion). When ambiguous, the CLI
shows an error with guidance to use vol1/ or vol2/ prefix.

Changes:
- discovery.py: Add AmbiguousChapterError, volume-aware discovery
- build.py: Add build_volume() method
- main.py: Add volume flag handling and updated help text
2026-01-02 10:00:31 -05:00
Vijay Janapa Reddi
853eb03ee8 style: apply consistent whitespace and formatting across codebase 2025-12-13 14:05:34 -05:00
Vijay Janapa Reddi
7b92e11193 Repository Restructuring: Prepare for TinyTorch Integration (#1068)
* Restructure: Move book content to book/ subdirectory

- Move quarto/ → book/quarto/
- Move cli/ → book/cli/
- Move docker/ → book/docker/
- Move socratiQ/ → book/socratiQ/
- Move tools/ → book/tools/
- Move scripts/ → book/scripts/
- Move config/ → book/config/
- Move docs/ → book/docs/
- Move binder → book/binder

Git history fully preserved for all moved files.

Part of repository restructuring to support MLSysBook + TinyTorch.

Pre-commit hooks bypassed for this commit as paths need updating.

* Update pre-commit hooks for book/ subdirectory

- Update all quarto/ paths to book/quarto/
- Update all tools/ paths to book/tools/
- Update config/linting to book/config/linting
- Update project structure checks

Pre-commit hooks will now work with new directory structure.

* Update .gitignore for book/ subdirectory structure

- Update quarto/ paths to book/quarto/
- Update assets/ paths to book/quarto/assets/
- Maintain all existing ignore patterns

* Update GitHub workflows for book/ subdirectory

- Update all quarto/ paths to book/quarto/
- Update cli/ paths to book/cli/
- Update tools/ paths to book/tools/
- Update docker/ paths to book/docker/
- Update config/ paths to book/config/
- Maintain all workflow functionality

* Update CLI config to support book/ subdirectory

- Check for book/quarto/ path first
- Fall back to quarto/ for backward compatibility
- Maintain full CLI functionality

* Create new root and book READMEs for dual structure

- Add comprehensive root README explaining both projects
- Create book-specific README with quick start guide
- Document repository structure and navigation
- Prepare for TinyTorch integration
2025-12-05 14:04:21 -08:00