mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-03-11 17:49:25 -05:00
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.