Files
cs249r_book/book/tools
Vijay Janapa Reddi 9e809d21c4 feat: full-stack Pint robustness and class-based namespace isolation
Python library (mlsys/):
- constants.py: add ureg.default_format, set_application_registry, MS alias comment
- formatting.py: isinstance checks, add fmt_full(), fmt_split(), .m_as() modernization
- formulas.py: fleet formulas return Quantity, @ureg.check() decorators, .m_as() everywhere
- hardware.py: dimension-first validation in __post_init__, Quantity[float] annotations
- models.py: __post_init__ dimension checks, size_in_bytes() enforcement, ureg.count→ureg.param
- test_units.py: +50 robustness tests (wrong-unit HardwareSpec, fleet formulas, fmt_full)
- validate_pint_usage.py: new static analysis script for Pint anti-patterns in QMD files
- transform_pico_cells.py: transformation script for PICO cell restructuring

QMD chapters (Vol1 + Vol2 — all 43 chapters with Python cells):
- Wrapped all Python compute cells in class-based namespace isolation (PICO pattern)
- Added EXPORTS bridges so class-internal values are accessible to prose inline Python
- Modernized .to(unit).magnitude → .m_as(unit) throughout
- Removed bare .magnitude calls; all unit extractions now explicit
- Fleet appendices (appendix_fleet, appendix_communication, appendix_reliability):
  full Quantity-return cascade for MTBF, AllReduce, Young-Daly, checkpoint formulas

All 43 chapters verified building cleanly (HTML) after changes.
2026-02-21 14:33:36 -05:00
..