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. If you spot a problem please help fix it by contributing a Pull Request 🛠️. Thank you 🙏!
ultralytics.utils.callbacks.base.on_pretrain_routine_start
ultralytics.utils.callbacks.base.on_pretrain_routine_end
ultralytics.utils.callbacks.base.on_train_start
ultralytics.utils.callbacks.base.on_train_epoch_start
ultralytics.utils.callbacks.base.on_train_batch_start
ultralytics.utils.callbacks.base.optimizer_step
ultralytics.utils.callbacks.base.on_before_zero_grad
ultralytics.utils.callbacks.base.on_train_batch_end
ultralytics.utils.callbacks.base.on_train_epoch_end
ultralytics.utils.callbacks.base.on_fit_epoch_end
ultralytics.utils.callbacks.base.on_model_save
ultralytics.utils.callbacks.base.on_train_end
ultralytics.utils.callbacks.base.on_params_update
ultralytics.utils.callbacks.base.teardown
ultralytics.utils.callbacks.base.on_val_start
ultralytics.utils.callbacks.base.on_val_batch_start
ultralytics.utils.callbacks.base.on_val_batch_end
ultralytics.utils.callbacks.base.on_val_end
ultralytics.utils.callbacks.base.on_predict_start
ultralytics.utils.callbacks.base.on_predict_batch_start
ultralytics.utils.callbacks.base.on_predict_batch_end
ultralytics.utils.callbacks.base.on_predict_postprocess_end
ultralytics.utils.callbacks.base.on_predict_end
ultralytics.utils.callbacks.base.on_export_start
ultralytics.utils.callbacks.base.on_export_end
ultralytics.utils.callbacks.base.get_default_callbacks
Return a copy of the default_callbacks dictionary with lists as default values.
Returns:
Type | Description |
---|---|
defaultdict
|
A defaultdict with keys from default_callbacks and empty lists as default values. |
Source code in ultralytics/utils/callbacks/base.py
ultralytics.utils.callbacks.base.add_integration_callbacks
Add integration callbacks from various sources to the instance's callbacks.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
instance
|
(Trainer, Predictor, Validator, Exporter)
|
An object with a 'callbacks' attribute that is a dictionary of callback lists. |
required |
Source code in ultralytics/utils/callbacks/base.py
📅 Created 1 year ago
✏️ Updated 2 months ago