Who drives for xb, yb in loader?
Step through one rank (rank 0 of 2, batch_size = 3). Watch who asks whom.
So what: the Dataset only answers "give me sample i". Picking indices is the sampler's job; collecting and stacking is the DataLoader's job.
What changes when you remove the DistributedSampler?
Two ranks, a dataset of 8 samples. Toggle the sampler and run one epoch.
So what: without a sampler there's no error — every rank computes identical gradients, so averaging changes nothing: same model as one GPU, no speedup.
Where did the 24 seconds go?
Proportions from my dataloader_benchmark.py run (2 epochs, 2 workers). Toggle the setting and play.
So what: True = workers persist, so the restart blocks disappear. Always check sum(step times) ≈ total before trusting a throughput number.
Delete a Pod, crash a container, send a request
A Deployment (replicas: 3) behind a ClusterIP Service. Try each button.
So what: deleted Pod → the Deployment controller creates a new Pod (new name, same label) · crashed process → the kubelet restarts the container (same name, RESTARTS +1) · the Service routes by label, so the client never notices.