Skip to content

Commit e4a2e40

Browse files
committed
Remove research-questions callouts, fix ml_ops cascade figure, standardize figure font
Builds on the PR #1957 merge (Zeljko's Vol1 layout), otherwise byte-for-byte his version: - Remove the end-of-chapter research-questions callouts from all chapters. - ml_ops correction-cascade figure: keep Zeljko's Model A-D chain TikZ drawing, and rewrite the caption, alt-text, and lead-in to describe the chain (they carried a stale 'timeline' description that no longer matched the figure), plus an operations-impact line. - Standardize the matplotlib figure font on a bundled TeX Gyre Heros (a free, redistributable Helvetica-metric clone) registered at runtime in book/tools/figures/style.py, so figures render with a real bold identically on macOS, Linux, and CI instead of falling back to DejaVu Sans or an unreachable macOS .ttc bold face.
1 parent 5a5c195 commit e4a2e40

39 files changed

Lines changed: 172 additions & 300 deletions

File tree

book/quarto/contents/vol1/benchmarking/benchmarking.qmd

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4720,15 +4720,6 @@ What does a system that passes every benchmark fail to predict? Production reali
47204720

47214721
<!-- This is here to make sure that quizzes are inserted properly before a part begins. -->
47224722

4723-
::: {.callout-research-questions title="For further inquiry"}
4724-
4725-
* What benchmark protocol makes comparisons fair across different hardware, models, data, and deployment assumptions?
4726-
* When should micro, macro, and end-to-end benchmarks be combined, and what does each hide?
4727-
* Which metric set prevents single-metric gaming across latency, tail latency, throughput, energy, accuracy, and calibration?
4728-
* How should teams anticipate benchmark-production gaps from drift, dynamic load, thermal throttling, and input variation?
4729-
4730-
:::
4731-
47324723
::: { .quiz-end }
47334724
:::
47344725

book/quarto/contents/vol1/conclusion/conclusion.qmd

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,15 +1077,6 @@ The next frontier is scale. The same discipline of quantifying constraints and t
10771077
\endgroup
10781078
```
10791079

1080-
::: {.callout-research-questions title="For further inquiry"}
1081-
1082-
* How does one deployment decision propagate across data, architecture, compression, hardware, serving, operations, and governance?
1083-
* How does conservation of complexity explain why a local optimization becomes another layer's constraint?
1084-
* Which quantitative invariants should be measured first when diagnosing a new ML system?
1085-
* When a system boundary moves from one node to a fleet, which single-machine principles remain valid and which variables change?
1086-
1087-
:::
1088-
10891080
::: { .quiz-end }
10901081
:::
10911082

book/quarto/contents/vol1/data_engineering/data_engineering.qmd

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4748,15 +4748,6 @@ The dataset compiler has produced its output: a clean, versioned, optimized trai
47484748
47494749
:::
47504750
4751-
::: {.callout-research-questions title="For further inquiry"}
4752-
4753-
* How does treating data as source code change acquisition, splitting, versioning, testing, and review?
4754-
* How should quality, reliability, scalability, and governance be balanced in a keyword-spotting pipeline?
4755-
* What pipeline architecture choices prevent training-serving skew, and what evidence would reveal skew in production?
4756-
* When are more labels, scraped examples, or synthetic samples no longer worth their cost or governance risk?
4757-
4758-
:::
4759-
47604751
::: { .quiz-end }
47614752
:::
47624753

book/quarto/contents/vol1/data_selection/data_selection.qmd

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4714,15 +4714,6 @@ With high-quality data in hand, we have optimized the source of the system. Even
47144714

47154715
<!-- This is here to make sure that quizzes are inserted properly before a part begins. -->
47164716

4717-
::: {.callout-research-questions title="For further inquiry"}
4718-
4719-
* When can a curated subset outperform the full dataset, and what evidence separates learning signal from redundancy?
4720-
* How should ICR and the selection inequality govern whether to use deduplication, coreset selection, or active learning?
4721-
* What validation protocol prevents synthetic data from replacing the real distribution it is meant to supplement?
4722-
* How should teams choose data-selection investments for data-starved versus compute-starved projects?
4723-
4724-
:::
4725-
47264717
::: { .quiz-end }
47274718
:::
47284719

book/quarto/contents/vol1/frameworks/frameworks.qmd

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4746,14 +4746,5 @@ Frameworks are the software substrate that translates abstract architectures int
47464746

47474747
:::
47484748

4749-
::: {.callout-research-questions title="For further inquiry"}
4750-
4751-
* How should a project choose between eager execution, graph execution, and compilation when debugging speed and production throughput conflict?
4752-
* When does compilation overhead outweigh kernel-fusion or graph-optimization benefits?
4753-
* How should automatic differentiation systems balance activation storage, recomputation, and gradient correctness?
4754-
* Which framework abstractions are useful because they hide complexity, and which are risky because they hide cost?
4755-
4756-
:::
4757-
47584749
::: { .quiz-end }
47594750
:::

book/quarto/contents/vol1/hw_acceleration/hw_acceleration.qmd

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5928,14 +5928,5 @@ We have now optimized the full D·A·M stack: data selection minimized training
59285928

59295929
An accelerator is easy to mistake for a faster computer. It is better understood as a machine built to move less data per useful operation, because the cost it fights is fixed by physics; moving a byte takes far more time and energy than computing on it. Every technique in this chapter (tiling, kernel fusion, the memory hierarchy, the systolic array) exists to raise arithmetic intensity, the ratio of computation to data movement, and the roofline is the bookkeeping of that single fact. None of them repeals the cost; they only relocate the bottleneck between bandwidth and compute. This is the machine constraint made concrete: the accelerator cannot make a byte cheaper to move, only ensure that fewer bytes must move for each result worth keeping.
59305930

5931-
::: {.callout-research-questions title="For further inquiry"}
5932-
5933-
* How should roofline analysis decide whether to optimize bandwidth, compute, or software overhead?
5934-
* When does specialized hardware fail to outperform a general-purpose alternative?
5935-
* How do tiling, dataflow, and fusion relocate memory-movement cost rather than eliminate it?
5936-
* What evidence should guide accelerator selection across throughput, bandwidth, capacity, energy, cost, and portability?
5937-
5938-
:::
5939-
59405931
::: { .quiz-end }
59415932
:::

book/quarto/contents/vol1/introduction/introduction.qmd

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3321,15 +3321,6 @@ Where should an ML model actually run? Physical laws dictate what is possible. T
33213321

33223322
:::
33233323

3324-
::: {.callout-research-questions title="For further inquiry"}
3325-
3326-
* How should an engineer diagnose whether an ML system failure comes from Data, Algorithm, Machine, or their interaction?
3327-
* When does the bitter lesson stop being sufficient guidance because compute, energy, data, or deployment constraints dominate?
3328-
* How should reliability targets be specified for systems whose behavior is learned from data and can drift after deployment?
3329-
* When is a simpler, less accurate model the better production system once latency, energy, and lifecycle feedback are included?
3330-
3331-
:::
3332-
33333324
::: { .quiz-end }
33343325
:::
33353326

book/quarto/contents/vol1/ml_ops/ml_ops.qmd

Lines changed: 129 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -512,11 +512,137 @@ The primary defense against boundary erosion is architectural: modularity and en
512512

513513
If boundary erosion describes *how* ML systems lose their structural integrity, correction cascades describe *what* happens when teams attempt repairs. A correction cascade\index{Correction Cascade!sequential dependencies} occurs when fixing one component introduces problems elsewhere, requiring additional fixes that themselves cause further problems. In ML systems, these cascades are particularly severe because changes propagate through statistical dependencies rather than explicit code paths. Retraining a model to fix one failure mode may degrade performance on previously working cases. Adjusting thresholds to reduce false positives may increase false negatives. Adding features to address edge cases may introduce correlations that destabilize the entire system. Each correction triggers the need for more corrections, creating a cascade that can consume engineering resources far exceeding the original fix.
514514

515-
@Fig-correction-cascades-flowchart makes the cascade structure visible as a chain of dependent models. Each model is trained to correct the errors of the one before it: model B compensates for model A's residual mistakes, model C compensates for model B's, and so on down the chain. The arrangement holds until an upstream model changes. When model A is retrained to fix one failure mode, every downstream model that was tuned to its previous behavior is invalidated at once, and each must be re-corrected. The red arcs trace this propagation, showing how a repair that looked local reaches across the entire chain.
515+
@Fig-correction-cascades-flowchart makes the cascade structure visible as a chain of dependent models. Each model is trained to correct the errors of the one before it: model B compensates for model A's residual mistakes, model C compensates for model B's, and so on down the chain. The arrangement holds until an upstream model changes. When model A is retrained to fix one failure mode, every downstream model that was tuned to its previous behavior is invalidated at once, and each must be re-corrected. The red arcs trace this propagation, showing how a repair that looked local reaches across the entire chain. A change near the top forces the most rework, while one near the bottom is nearly free. For an operations team, one change request can trigger a coordinated retraining of the chain.
516516

517-
::: {#fig-correction-cascades-flowchart fig-env="figure" fig-pos="htb" fig-cap="**Correction Cascades**: Each model is trained to correct the errors of the model before it, forming a chain of dependencies. Changing an upstream model invalidates every downstream correction at once, turning one local fix into cascading rework across the chain." fig-alt="Four model boxes in a left-to-right chain labeled Model A through Model D, each trained to correct the previous one. A red change badge on Model A and red dashed arcs reaching Model B, C, and D show an upstream change propagating downstream, with must re-correct labels beneath the downstream models."}
517+
::: {#fig-correction-cascades-flowchart fig-env="figure" fig-pos="htb" fig-cap="**Correction Cascades**: Each model is trained to correct the errors of the model before it, forming a chain of dependencies. Changing an upstream model invalidates every downstream correction at once, turning one local fix into cascading rework across the chain, with each downstream fix demanding its own retraining cycle." fig-alt="Four model boxes in a left-to-right chain labeled Model A through Model D, each trained to correct the previous one. A red change badge on Model A and red dashed arcs reaching Model B, C, and D show an upstream change propagating downstream, with must re-correct labels beneath the downstream models."}
518518

519-
![](images/svg/correction-cascade-chain.svg)
519+
```{.tikz}
520+
\begin{tikzpicture}[font=\small\usefont{T1}{phv}{m}{n}, >=stealth]
521+
\tikzset{
522+
Line/.style={line width=0.5pt,black!50,text=black},
523+
LineA/.style={-{Triangle[width=7pt,length=11pt]},line width=1pt,black!50,text=black},
524+
LineD/.style={-{Triangle[width=7pt,length=11pt]},crimson,line width=1.5pt,rounded corners=15pt,
525+
dashed,dash pattern=on 7pt off 5pt},
526+
Box/.style={align=center, inner xsep=2pt,draw=none, line width=1pt,fill=none,
527+
minimum width=30mm, minimum height=25mm,node distance=1.0},
528+
Box1/.style={align=center, inner sep=5pt,draw=none, line width=1pt,fill=crimson,text=white,
529+
minimum width=18mm, minimum height=7mm,font=\small\usefont{T1}{phv}{b}{n},rounded corners=7pt},
530+
Text2/.style={font=\usefont{T1}{phv}{b}{n}\small,align=center},
531+
Text3/.style={font=\usefont{T1}{phv}{b}{n}\small,align=center,redd},
532+
}
533+
\definecolor{redd}{HTML}{A31F34}
534+
\definecolor{blueeD}{HTML}{4A90C4}
535+
\definecolor{blueeL}{HTML}{CFE2F3}
536+
537+
%model
538+
\tikzset{%
539+
pics/model/.style = {
540+
code = {
541+
\pgfkeys{/channel/.cd, #1}
542+
\begin{scope}[local bounding box=MODEL,scale=\scalefac, every node/.append style={transform shape}]
543+
\foreach \i in {1,...,3}{
544+
\pgfmathsetmacro{\y}{(-\i)*0.37}
545+
\node[circle,draw, minimum size=2.5mm,inner sep=0pt,fill=red](2K\i) at(0,\y){};
546+
}
547+
\foreach \i in {1,...,3}{
548+
\pgfmathsetmacro{\y}{(-\i)*0.37}
549+
\node[circle,draw, minimum size=2.5mm,inner sep=0pt,fill=brown](3K\i) at(0.6,\y){};
550+
}
551+
\foreach \i in {1,...,2}{
552+
\pgfmathsetmacro{\y}{-(3.5-\i)*0.37}
553+
\node[circle,draw, minimum size=2.5mm,inner sep=0pt,fill=cyan](1K\i) at(-0.6,\y){};
554+
}
555+
\foreach \i in {1}{
556+
\pgfmathsetmacro{\y}{-(3.0-\i)*0.37}
557+
\node[circle,draw, minimum size=2.5mm,inner sep=0pt,fill=green!40!black](4K\i) at(1.2,\y){};
558+
}
559+
\foreach \i in {1,...,2}{
560+
\foreach \j in {1,...,3}{
561+
\draw[Line](1K\i)--(2K\j);
562+
}}
563+
\foreach \i in {1,...,3}{
564+
\foreach \j in {1,...,3}{
565+
\draw[Line](2K\i)--(3K\j);
566+
}}\foreach \i in {1,...,3}{
567+
\foreach \j in {1}{
568+
\draw[Line](3K\i)--(4K\j);
569+
}}
570+
\end{scope}
571+
}
572+
}
573+
}
574+
\pgfkeys{
575+
/channel/.cd,
576+
scalefac/.store in=\scalefac,
577+
scalefac=1,
578+
}
579+
580+
\begin{scope}[local bounding box=mainfig]
581+
%Models
582+
\foreach \name/\x/\title/\subtitle/\picid in {
583+
B1/0/{Model A}/{base predictions}/1,
584+
B2/5.5/{Model B}/{corrects A}/2,
585+
B3/11/{Model C}/{corrects B}/3,
586+
B4/16.5/{Model D}/{corrects C}/4
587+
}{
588+
% osnovni box
589+
\node[Box] (\name) at (\x,0) {};
590+
591+
% gornji i donji fill
592+
\fill[cyan!07] (\name.north west)
593+
rectangle ($( \name.north east)!0.6!(\name.south east)$)
594+
coordinate (\name DE);
595+
596+
\fill[cyan!20] (\name.south east)
597+
rectangle ($( \name.north west)!0.6!(\name.south west)$)
598+
coordinate (\name LE);
599+
600+
% spoljašnja linija / border
601+
\node[Box,draw=blueeD] at (\name.center) {};
602+
603+
% tekst u box-u
604+
\node[Text2] at ($(\name.south west)!0.5!(\name DE)$)
605+
{\title\\
606+
\textcolor{black!70}{\usefont{T1}{phv}{m}{n}\subtitle}};
607+
608+
% koordinata za ikonicu / pic
609+
\coordinate (\name Q) at ($(\name.north west)!0.5!(\name DE)$);
610+
611+
% pic
612+
\pic[shift={(-0.3,0.73)}] at (\name Q)
613+
{model={scalefac=1.0}};
614+
}
615+
%%%
616+
\foreach \x in {2,3,4}{
617+
\node[below=3pt of B\x.south,Text3]{must re-correct};
618+
}
619+
%
620+
\draw[LineD](B1.north)--++(0,18.5mm)-|(B4.north);
621+
\draw[LineD](B1.north)--++(0,14.5mm)-|(B3.north);
622+
\draw[LineD](B1.north)--++(0,10.5mm)-|(B2.north);
623+
%
624+
\node[Box1,above=5pt of B1.north]{change};
625+
\end{scope}
626+
627+
\draw[LineA](B1)--(B2);
628+
\draw[LineA](B2)--(B3);
629+
\draw[LineA](B3)--(B4);
630+
%
631+
\node[below =10mm of mainfig.south,font=\small\usefont{T1}{phv}{m}{it},
632+
black!70]{A single fix to an upstream model forces every
633+
downstream correction to be redone.};
634+
635+
\coordinate(L1)at($(B2.south)+(-6mm,-12mm)$);
636+
637+
\begin{scope}[local bounding box=MC,shift={($(L1)+(0,0)$)}]
638+
\node[](LT1) at(L1){correction dependency};
639+
\draw[LineA](LT1.west)+(180:15mm)--(LT1.west);
640+
641+
\node[right=49mm of LT1](LT2) at(L1){change propagates downstream};
642+
\draw[LineD](LT2.west)+(180:15mm)--(LT2.west);
643+
\end{scope}
644+
\end{tikzpicture}
645+
```
520646

521647
:::
522648

@@ -4024,14 +4150,5 @@ We have built a system that is efficient, scalable, and reliable. A system can a
40244150
40254151
:::
40264152
4027-
::: {.callout-research-questions title="For further inquiry"}
4028-
4029-
* How should an organization detect a model that is fully available but silently wrong?
4030-
* Where should boundaries be drawn to limit correction cascades across data, model, infrastructure, and monitoring?
4031-
* How should retraining triggers balance staleness cost, retraining cost, traffic value, and human oversight?
4032-
* When do feature stores, registries, and CI/CD pipelines become justified infrastructure rather than premature process?
4033-
4034-
:::
4035-
40364153
::: { .quiz-end }
40374154
:::

book/quarto/contents/vol1/ml_systems/ml_systems.qmd

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4357,14 +4357,5 @@ Choosing where a system runs settles its physics; it does not protect it from ti
43574357

43584358
:::
43594359

4360-
::: {.callout-research-questions title="For further inquiry"}
4361-
4362-
* How should physical constraints determine deployment paradigm before model development begins?
4363-
* When should a production system combine cloud, edge, mobile, or TinyML rather than choose one paradigm?
4364-
* How should the iron law guide optimization when the same workload shifts bottlenecks between training and inference?
4365-
* What evidence would show that total cost of ownership, not raw compute cost, determines the feasible deployment?
4366-
4367-
:::
4368-
43694360
::: { .quiz-end }
43704361
:::

book/quarto/contents/vol1/ml_workflow/ml_workflow.qmd

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2258,14 +2258,5 @@ The workflow framework established here provides the organizing structure for ev
22582258

22592259
Seen as a checklist, the lifecycle is a sequence of stages to clear in order. Seen correctly, it is a loop. A constraint discovered at deployment does not stay there; it propagates backward into model selection and forward into data collection, its cost compounding at every stage it survived undetected. A workflow is therefore a coupled system rather than a pipeline, the same coupling the D·A·M taxonomy describes in *space*, now unfolding in *time*. Optimizing one stage in isolation moves the failure instead of removing it, which is why the discipline is to see the whole map before touching any single part of it.
22602260

2261-
::: {.callout-research-questions title="For further inquiry"}
2262-
2263-
* How should problem definition force deployment constraints backward into data, model, and validation decisions?
2264-
* Which stage interface contracts most reduce late rework in a specific ML application?
2265-
* When can faster iteration with a smaller model outperform slower iteration with a larger model?
2266-
* How should validation progress from offline tests to shadow mode, canary rollout, and A/B testing as deployment risk grows?
2267-
2268-
:::
2269-
22702261
::: { .quiz-end }
22712262
:::

0 commit comments

Comments
 (0)