File size: 2,989 Bytes
f6228f9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
120
121
---

description: Discover the essential base callbacks in Ultralytics for training, validation, prediction, and exporting models efficiently.
keywords: Ultralytics, base callbacks, training, validation, prediction, model export, ML, machine learning, deep learning
---


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

!!! note

    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). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/callbacks/base.py) 🛠️. Thank you 🙏!


<br>

## ::: ultralytics.utils.callbacks.base.on_pretrain_routine_start



<br><br><hr><br>



## ::: ultralytics.utils.callbacks.base.on_pretrain_routine_end

<br><br><hr><br>

## ::: ultralytics.utils.callbacks.base.on_train_start

<br><br><hr><br>

## ::: ultralytics.utils.callbacks.base.on_train_epoch_start



<br><br><hr><br>



## ::: ultralytics.utils.callbacks.base.on_train_batch_start

<br><br><hr><br>

## ::: ultralytics.utils.callbacks.base.optimizer_step



<br><br><hr><br>



## ::: ultralytics.utils.callbacks.base.on_before_zero_grad

<br><br><hr><br>

## ::: ultralytics.utils.callbacks.base.on_train_batch_end



<br><br><hr><br>



## ::: ultralytics.utils.callbacks.base.on_train_epoch_end

<br><br><hr><br>

## ::: ultralytics.utils.callbacks.base.on_fit_epoch_end



<br><br><hr><br>



## ::: ultralytics.utils.callbacks.base.on_model_save



<br><br><hr><br>



## ::: ultralytics.utils.callbacks.base.on_train_end



<br><br><hr><br>



## ::: ultralytics.utils.callbacks.base.on_params_update



<br><br><hr><br>



## ::: ultralytics.utils.callbacks.base.teardown



<br><br><hr><br>



## ::: ultralytics.utils.callbacks.base.on_val_start



<br><br><hr><br>



## ::: ultralytics.utils.callbacks.base.on_val_batch_start

<br><br><hr><br>

## ::: ultralytics.utils.callbacks.base.on_val_batch_end



<br><br><hr><br>



## ::: ultralytics.utils.callbacks.base.on_val_end



<br><br><hr><br>



## ::: ultralytics.utils.callbacks.base.on_predict_start



<br><br><hr><br>



## ::: ultralytics.utils.callbacks.base.on_predict_batch_start

<br><br><hr><br>

## ::: ultralytics.utils.callbacks.base.on_predict_batch_end



<br><br><hr><br>



## ::: ultralytics.utils.callbacks.base.on_predict_postprocess_end

<br><br><hr><br>

## ::: ultralytics.utils.callbacks.base.on_predict_end

<br><br><hr><br>

## ::: ultralytics.utils.callbacks.base.on_export_start

<br><br><hr><br>

## ::: ultralytics.utils.callbacks.base.on_export_end

<br><br><hr><br>

## ::: ultralytics.utils.callbacks.base.get_default_callbacks

<br><br><hr><br>

## ::: ultralytics.utils.callbacks.base.add_integration_callbacks

<br><br>