Reference for ultralytics/utils/callbacks/neptune.py
Note
This file is available at https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/neptune.py. If you spot a problem please help fix it by contributing a Pull Request 🛠️. Thank you 🙏!
ultralytics.utils.callbacks.neptune._log_scalars
_log_scalars(scalars: dict, step: int = 0) -> None
Log scalars to the NeptuneAI experiment logger.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scalars
|
dict
|
Dictionary of scalar values to log to NeptuneAI. |
required |
step
|
int
|
The current step or iteration number for logging. |
0
|
Examples:
>>> metrics = {"mAP": 0.85, "loss": 0.32}
>>> _log_scalars(metrics, step=100)
Source code in ultralytics/utils/callbacks/neptune.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|
ultralytics.utils.callbacks.neptune._log_images
_log_images(imgs_dict: dict, group: str = '') -> None
Log images to the NeptuneAI experiment logger.
This function logs image data to Neptune.ai when a valid Neptune run is active. Images are organized under the specified group name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
imgs_dict
|
dict
|
Dictionary of images to log, with keys as image names and values as image data. |
required |
group
|
str
|
Group name to organize images under in the Neptune UI. |
''
|
Examples:
>>> # Log validation images
>>> _log_images({"val_batch": img_tensor}, group="validation")
Source code in ultralytics/utils/callbacks/neptune.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
|
ultralytics.utils.callbacks.neptune._log_plot
_log_plot(title: str, plot_path: str) -> None
Log plots to the NeptuneAI experiment logger.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
title
|
str
|
Title of the plot. |
required |
plot_path
|
str
|
Path to the saved image file. |
required |
Source code in ultralytics/utils/callbacks/neptune.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
|
ultralytics.utils.callbacks.neptune.on_pretrain_routine_start
on_pretrain_routine_start(trainer) -> None
Callback function called before the training routine starts.
Source code in ultralytics/utils/callbacks/neptune.py
75 76 77 78 79 80 81 82 83 84 85 86 |
|
ultralytics.utils.callbacks.neptune.on_train_epoch_end
on_train_epoch_end(trainer) -> None
Callback function called at end of each training epoch.
Source code in ultralytics/utils/callbacks/neptune.py
89 90 91 92 93 94 |
|
ultralytics.utils.callbacks.neptune.on_fit_epoch_end
on_fit_epoch_end(trainer) -> None
Callback function called at end of each fit (train+val) epoch.
Source code in ultralytics/utils/callbacks/neptune.py
97 98 99 100 101 102 103 |
|
ultralytics.utils.callbacks.neptune.on_val_end
on_val_end(validator) -> None
Callback function called at end of each validation.
Source code in ultralytics/utils/callbacks/neptune.py
106 107 108 109 110 |
|
ultralytics.utils.callbacks.neptune.on_train_end
on_train_end(trainer) -> None
Callback function called at end of training.
Source code in ultralytics/utils/callbacks/neptune.py
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
|