File size: 2,714 Bytes
ab854b9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
---
description: Explore how to use the on-train, on-validation, on-pretrain, and on-predict callbacks in Ultralytics. Learn to update params, save models, and add integration callbacks.
keywords: Ultralytics, Callbacks, On-train, On-validation, On-pretrain, On-predict, Parameters update, Model saving, Integration callbacks
---

# Reference for `ultralytics/utils/callbacks/base.py`

!!! note

    Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/base.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/base.py). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) ๐Ÿ› ๏ธ. Thank you ๐Ÿ™!

---
## ::: ultralytics.utils.callbacks.base.on_pretrain_routine_start
<br><br>

---
## ::: ultralytics.utils.callbacks.base.on_pretrain_routine_end
<br><br>

---
## ::: ultralytics.utils.callbacks.base.on_train_start
<br><br>

---
## ::: ultralytics.utils.callbacks.base.on_train_epoch_start
<br><br>

---
## ::: ultralytics.utils.callbacks.base.on_train_batch_start
<br><br>

---
## ::: ultralytics.utils.callbacks.base.optimizer_step
<br><br>

---
## ::: ultralytics.utils.callbacks.base.on_before_zero_grad
<br><br>

---
## ::: ultralytics.utils.callbacks.base.on_train_batch_end
<br><br>

---
## ::: ultralytics.utils.callbacks.base.on_train_epoch_end
<br><br>

---
## ::: ultralytics.utils.callbacks.base.on_fit_epoch_end
<br><br>

---
## ::: ultralytics.utils.callbacks.base.on_model_save
<br><br>

---
## ::: ultralytics.utils.callbacks.base.on_train_end
<br><br>

---
## ::: ultralytics.utils.callbacks.base.on_params_update
<br><br>

---
## ::: ultralytics.utils.callbacks.base.teardown
<br><br>

---
## ::: ultralytics.utils.callbacks.base.on_val_start
<br><br>

---
## ::: ultralytics.utils.callbacks.base.on_val_batch_start
<br><br>

---
## ::: ultralytics.utils.callbacks.base.on_val_batch_end
<br><br>

---
## ::: ultralytics.utils.callbacks.base.on_val_end
<br><br>

---
## ::: ultralytics.utils.callbacks.base.on_predict_start
<br><br>

---
## ::: ultralytics.utils.callbacks.base.on_predict_batch_start
<br><br>

---
## ::: ultralytics.utils.callbacks.base.on_predict_batch_end
<br><br>

---
## ::: ultralytics.utils.callbacks.base.on_predict_postprocess_end
<br><br>

---
## ::: ultralytics.utils.callbacks.base.on_predict_end
<br><br>

---
## ::: ultralytics.utils.callbacks.base.on_export_start
<br><br>

---
## ::: ultralytics.utils.callbacks.base.on_export_end
<br><br>

---
## ::: ultralytics.utils.callbacks.base.get_default_callbacks
<br><br>

---
## ::: ultralytics.utils.callbacks.base.add_integration_callbacks
<br><br>