Model Pipeline - Latency monitoring per step
This pipeline tracks how long each step takes during a machine learning model's training and prediction process. It helps find slow parts to improve speed.
Jump into concepts and practice - no test required
This pipeline tracks how long each step takes during a machine learning model's training and prediction process. It helps find slow parts to improve speed.
Loss
0.7 |****
0.6 |***
0.5 |**
0.4 |*
0.3 |
1 2 3 4 5 Epochs| Epoch | Loss ↓ | Accuracy ↑ | Observation |
|---|---|---|---|
| 1 | 0.65 | 0.60 | Initial training with high loss and low accuracy |
| 2 | 0.50 | 0.72 | Loss decreased, accuracy improved |
| 3 | 0.40 | 0.80 | Model learning well, metrics improving |
| 4 | 0.35 | 0.85 | Loss continues to decrease, accuracy high |
| 5 | 0.33 | 0.87 | Training converging with stable metrics |
print(latencies)?
latencies = []
for step in range(3):
start = get_time()
do_work(step)
end = get_time()
latencies.append(end - start)
print(latencies)
Assume do_work(step) takes 1, 2, and 3 seconds respectively.do_work(step).do_work takes 1, 2, and 3 seconds, latencies list will be [1, 2, 3].start = get_time() do_step1() end = get_time() latency1 = end - start start = get_time() do_step2() latency2 = end - startWhat is the error causing wrong latency2?
end = get_time() after do_step2 before calculating latency2.