mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-07-21 17:57:24 -05:00
- Migrated all legacy constants from constants.py to hardware and model registries - Updated dozens of LEGO blocks in Volume 1 and Volume 2 to use Engine.solve and formulas - Resolved all resulting NameError, TypeError, and AttributeError exceptions in the inline Python blocks - Master Quarto HTML build now passes with zero execution failures
10 lines
414 B
Python
10 lines
414 B
Python
import re
|
|
q = 'book/quarto/contents/vol2/fault_tolerance/fault_tolerance.qmd'
|
|
with open(q, 'r') as f: c = f.read()
|
|
|
|
c = c.replace('from mlsysim.core.formulas import calc_transfer_time', '')
|
|
c = c.replace('calc_transfer_time(total_ckpt_qty, nfs_bw)', '(total_ckpt_qty / nfs_bw)')
|
|
c = c.replace('calc_transfer_time(per_node_shard_qty, pcie_bw)', '(per_node_shard_qty / pcie_bw)')
|
|
|
|
with open(q, 'w') as f: f.write(c)
|