Editorial Corrections & Code Hardening (Volume 1)

This commit refactors the underlying Python calculation cells for Chapters 1-16
to strictly enforce mathematical consistency with the narrative.

**Key Text/Numeric Updates (For Editorial Review):**

1.  **Chapter 3 (Workflow) - Edge Necessity Scenario:**
    -   *Change:* Increased clinic patient count from **100** to **150**.
    -   *Reason:* With 100 patients, the calculated upload time was ~5.5 hours, which fits within the 8-hour clinic day, contradicting the chapter's conclusion that 'Edge is Mandatory.' Increasing to 150 pushes upload time to >8 hours, mathematically validating the narrative.

2.  **Chapter 1 (Introduction) - Model Drift Scenario:**
    -   *Change:* Reduced monthly accuracy drift rate from **8.0%** to **0.8%**.
    -   *Reason:* An 8% monthly drop is a catastrophic failure that would be immediately noticed. A 0.8% drop correctly models the 'silent failure' (boiling frog) scenario described in the text.

3.  **Chapter 3 (Workflow) - Velocity vs Quality:**
    -   *Change:* Reduced 'Large Model' accuracy gain per iteration from **0.5%** to **0.15%**.
    -   *Reason:* The original rate caused the large model to hit 99% accuracy almost instantly, invalidating the 'Velocity is a Feature' argument. The new rate correctly models diminishing returns, allowing the faster (small) model to win.

4.  **Chapter 15 (Responsible Engineering) - TCO Analysis:**
    -   *Verification:* Verified and stabilized the 3-year Total Cost of Ownership (TCO) calculations. Confirmed that Inference TCO (.5M) dominates Training TCO (8K) by ~40x, supporting the 'Efficiency as Responsibility' thesis.

**Technical Changes (Code Only):**
-   Refactored all calculation cells to use the **P.I.C.O. (Parameters, Invariants, Calculation, Outputs)** design pattern.
-   Added assertion guards (Invariants) to prevent future regressions where math contradicts prose.
-   Fixed variable scope issues in Chapter 10 (Model Compression) and Chapter 15.
-   Disabled false-positive linter warnings for standard LaTeX spacing.
This commit is contained in:
Vijay Janapa Reddi
2026-02-10 13:49:41 -05:00
parent 9d840fc1a0
commit 83ce92624e
23 changed files with 3096 additions and 1729 deletions

View File

@@ -42,3 +42,5 @@ ure
COO
coo
trough
ehr
dout