Commit Graph

7 Commits

Author SHA1 Message Date
Vijay Janapa Reddi
c30f2a3bfd refactor: move mlsysim to repo root, extract fmt module from viz
Moves the mlsysim package from book/quarto/mlsysim/ to the repo root
so it is importable as a proper top-level package across the codebase.

Key changes:
- mlsysim/fmt.py: new top-level module for all formatting helpers (fmt,
  sci, check, md_math, fmt_full, fmt_split, etc.), moved out of viz/
- mlsysim/viz/__init__.py: now exports only plot utilities; dashboard.py
  (marimo-only) is no longer wildcard-exported and must be imported
  explicitly by marimo labs
- mlsysim/__init__.py: added `from . import fmt` and `from .core import
  constants`; removed broken `from .viz import plots as viz` alias
- execute-env.yml: fixed PYTHONPATH from "../../.." to "../.." so
  chapters resolve to repo root, not parent of repo
- 51 QMD files: updated `from mlsysim.viz import <fmt-fns>` to
  `from mlsysim.fmt import <fmt-fns>`
- book/quarto/mlsys/: legacy shadow package contents cleaned up;
  stub __init__.py remains for backward compat
- All Vol1 and Vol2 chapters verified to build with `binder build pdf`
2026-03-01 17:24:11 -05:00
Vijay Janapa Reddi
56e091f7e0 feat: standardize System Archetypes in Vol 1 and Vol 2; add canonical roster table to Introductions; ensure tight math-prose integration 2026-02-24 20:23:50 -05:00
Vijay Janapa Reddi
c9d21b768b feat(binder): add render plots command for matplotlib figure gallery
Integrate figure rendering into the binder CLI so plots can be previewed
without a full Quarto build. Extracts Python code blocks with fig-* labels
from QMD files, renders them to PNG, and outputs a browsable gallery at
_output/plots/<chapter>/. Also fixes the package import chain so `binder`
works correctly as an installed entry point.

- Add book/cli/commands/render.py with RenderCommand class
- Wire into main.py with help table entry and command dispatch
- Add matplotlib>=3.7.0 to pyproject.toml dependencies
- Add book/quarto/_output/ to .gitignore
- Archive standalone render_figures.py to _archive/
2026-02-14 12:43:23 -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
29cefb9a6f fix: centralize path configuration for book/ restructure
- Add BOOK_ROOT, QUARTO_DIR, TOOLS_DIR, DEPS_DIR, DOCKER_DIR env vars to all workflows
- Update path references to use centralized env vars
- Fix requirements.txt to reference book/tools/dependencies
- Fix pyproject.toml entry points: cli.main -> book.cli.main
- Add __init__.py to book/ and book/tools/ for Python package support
- Fix Dockerfile path casing (dockerfile -> Dockerfile)
- Fix publish-live.yml relative path after cd

This enables TinyTorch to coexist at repo root alongside book/ directory.
2025-12-05 15:14:01 -08:00
Vijay Janapa Reddi
f4a0b09209 Complete frontiers polish with glossary updates and build improvements 2025-09-21 02:26:46 -04:00
Vijay Janapa Reddi
bdedbc78bb feat(tools): add shared infrastructure for MLSysBook tool development
- Add pyproject.toml with comprehensive Python package configuration
- Create tools/scripts/common/ package with shared utilities:
  - base_classes.py: Abstract base classes following SOLID principles
  - config.py: Centralized configuration management with environment support
  - exceptions.py: Custom exception hierarchy for better error handling
  - logging_config.py: Standardized logging setup across all tools
  - validators.py: Input validation utilities with detailed error reporting

This establishes a proper foundation for building maintainable,
production-grade tools following software engineering best practices
as outlined in the updated .cursorrules guidelines.
2025-08-09 08:49:33 -04:00