─░├žeri─če ge├ž

Referans i├žin ultralytics/utils/callbacks/base.py

Not

Bu dosya https://github.com/ultralytics/ultralytics/blob/main/ ultralytics/utils/callbacks/base .py adresinde mevcuttur. Bir sorun tespit ederseniz l├╝tfen bir ├çekme ─░ste─či ­čŤá´ŞĆ ile katk─▒da bulunarak d├╝zeltilmesine yard─▒mc─▒ olun. Te┼čekk├╝rler ­čÖĆ!



ultralytics.utils.callbacks.base.on_pretrain_routine_start(trainer)

├ľn e─čitim rutini ba┼člamadan ├Ânce ├ža─čr─▒l─▒r.

Kaynak kodu ultralytics/utils/callbacks/base.py
def on_pretrain_routine_start(trainer):
    """Called before the pretraining routine starts."""
    pass



ultralytics.utils.callbacks.base.on_pretrain_routine_end(trainer)

├ľn e─čitim rutini sona erdikten sonra ├ža─čr─▒l─▒r.

Kaynak kodu ultralytics/utils/callbacks/base.py
def on_pretrain_routine_end(trainer):
    """Called after the pretraining routine ends."""
    pass



ultralytics.utils.callbacks.base.on_train_start(trainer)

E─čitim ba┼člad─▒─č─▒nda aran─▒r.

Kaynak kodu ultralytics/utils/callbacks/base.py
def on_train_start(trainer):
    """Called when the training starts."""
    pass



ultralytics.utils.callbacks.base.on_train_epoch_start(trainer)

Her e─čitim d├Âneminin ba┼č─▒nda ├ža─čr─▒l─▒r.

Kaynak kodu ultralytics/utils/callbacks/base.py
def on_train_epoch_start(trainer):
    """Called at the start of each training epoch."""
    pass



ultralytics.utils.callbacks.base.on_train_batch_start(trainer)

Her e─čitim grubunun ba┼č─▒nda ├ža─čr─▒l─▒r.

Kaynak kodu ultralytics/utils/callbacks/base.py
def on_train_batch_start(trainer):
    """Called at the start of each training batch."""
    pass



ultralytics.utils.callbacks.base.optimizer_step(trainer)

─░yile┼čtirici bir ad─▒m att─▒─č─▒nda ├ža─čr─▒l─▒r.

Kaynak kodu ultralytics/utils/callbacks/base.py
def optimizer_step(trainer):
    """Called when the optimizer takes a step."""
    pass



ultralytics.utils.callbacks.base.on_before_zero_grad(trainer)

Gradyanlar s─▒f─▒ra ayarlanmadan ├Ânce ├ža─čr─▒l─▒r.

Kaynak kodu ultralytics/utils/callbacks/base.py
def on_before_zero_grad(trainer):
    """Called before the gradients are set to zero."""
    pass



ultralytics.utils.callbacks.base.on_train_batch_end(trainer)

Her e─čitim grubunun sonunda ├ža─čr─▒l─▒r.

Kaynak kodu ultralytics/utils/callbacks/base.py
def on_train_batch_end(trainer):
    """Called at the end of each training batch."""
    pass



ultralytics.utils.callbacks.base.on_train_epoch_end(trainer)

Her e─čitim d├Âneminin sonunda ├ža─čr─▒l─▒r.

Kaynak kodu ultralytics/utils/callbacks/base.py
def on_train_epoch_end(trainer):
    """Called at the end of each training epoch."""
    pass



ultralytics.utils.callbacks.base.on_fit_epoch_end(trainer)

Her uyum epokunun (train + val) sonunda ├ža─čr─▒l─▒r.

Kaynak kodu ultralytics/utils/callbacks/base.py
def on_fit_epoch_end(trainer):
    """Called at the end of each fit epoch (train + val)."""
    pass



ultralytics.utils.callbacks.base.on_model_save(trainer)

Model kaydedildi─činde ├ža─čr─▒l─▒r.

Kaynak kodu ultralytics/utils/callbacks/base.py
def on_model_save(trainer):
    """Called when the model is saved."""
    pass



ultralytics.utils.callbacks.base.on_train_end(trainer)

E─čitim sona erdi─činde ├ža─čr─▒l─▒r.

Kaynak kodu ultralytics/utils/callbacks/base.py
def on_train_end(trainer):
    """Called when the training ends."""
    pass



ultralytics.utils.callbacks.base.on_params_update(trainer)

Model parametreleri g├╝ncellendi─činde ├ža─čr─▒l─▒r.

Kaynak kodu ultralytics/utils/callbacks/base.py
def on_params_update(trainer):
    """Called when the model parameters are updated."""
    pass



ultralytics.utils.callbacks.base.teardown(trainer)

E─čitim s├╝recinin s├Âk├╝lmesi s─▒ras─▒nda ├ža─čr─▒l─▒r.

Kaynak kodu ultralytics/utils/callbacks/base.py
def teardown(trainer):
    """Called during the teardown of the training process."""
    pass



ultralytics.utils.callbacks.base.on_val_start(validator)

Do─črulama ba┼člad─▒─č─▒nda ├ža─čr─▒l─▒r.

Kaynak kodu ultralytics/utils/callbacks/base.py
def on_val_start(validator):
    """Called when the validation starts."""
    pass



ultralytics.utils.callbacks.base.on_val_batch_start(validator)

Her do─črulama grubunun ba┼člang─▒c─▒nda ├ža─čr─▒l─▒r.

Kaynak kodu ultralytics/utils/callbacks/base.py
def on_val_batch_start(validator):
    """Called at the start of each validation batch."""
    pass



ultralytics.utils.callbacks.base.on_val_batch_end(validator)

Her do─črulama grubunun sonunda ├ža─čr─▒l─▒r.

Kaynak kodu ultralytics/utils/callbacks/base.py
def on_val_batch_end(validator):
    """Called at the end of each validation batch."""
    pass



ultralytics.utils.callbacks.base.on_val_end(validator)

Do─črulama sona erdi─činde ├ža─čr─▒l─▒r.

Kaynak kodu ultralytics/utils/callbacks/base.py
def on_val_end(validator):
    """Called when the validation ends."""
    pass



ultralytics.utils.callbacks.base.on_predict_start(predictor)

Tahmin ba┼člad─▒─č─▒nda ├ža─čr─▒l─▒r.

Kaynak kodu ultralytics/utils/callbacks/base.py
def on_predict_start(predictor):
    """Called when the prediction starts."""
    pass



ultralytics.utils.callbacks.base.on_predict_batch_start(predictor)

Her tahmin y─▒─č─▒n─▒n─▒n ba┼člang─▒c─▒nda ├ža─čr─▒l─▒r.

Kaynak kodu ultralytics/utils/callbacks/base.py
def on_predict_batch_start(predictor):
    """Called at the start of each prediction batch."""
    pass



ultralytics.utils.callbacks.base.on_predict_batch_end(predictor)

Her tahmin grubunun sonunda ├ža─čr─▒l─▒r.

Kaynak kodu ultralytics/utils/callbacks/base.py
def on_predict_batch_end(predictor):
    """Called at the end of each prediction batch."""
    pass



ultralytics.utils.callbacks.base.on_predict_postprocess_end(predictor)

Tahminin son i┼člemesi bittikten sonra ├ža─čr─▒l─▒r.

Kaynak kodu ultralytics/utils/callbacks/base.py
def on_predict_postprocess_end(predictor):
    """Called after the post-processing of the prediction ends."""
    pass



ultralytics.utils.callbacks.base.on_predict_end(predictor)

Tahmin sona erdi─činde ├ža─čr─▒l─▒r.

Kaynak kodu ultralytics/utils/callbacks/base.py
def on_predict_end(predictor):
    """Called when the prediction ends."""
    pass



ultralytics.utils.callbacks.base.on_export_start(exporter)

Model d─▒┼ča aktar─▒m─▒ ba┼člad─▒─č─▒nda ├ža─čr─▒l─▒r.

Kaynak kodu ultralytics/utils/callbacks/base.py
def on_export_start(exporter):
    """Called when the model export starts."""
    pass



ultralytics.utils.callbacks.base.on_export_end(exporter)

Model d─▒┼ča aktar─▒m─▒ sona erdi─činde ├ža─čr─▒l─▒r.

Kaynak kodu ultralytics/utils/callbacks/base.py
def on_export_end(exporter):
    """Called when the model export ends."""
    pass



ultralytics.utils.callbacks.base.get_default_callbacks()

default_callbacks s├Âzl├╝─č├╝n├╝n varsay─▒lan de─čerler olarak listeler i├žeren bir kopyas─▒n─▒ d├Ând├╝r├╝r.

─░ade:

Tip A├ž─▒klama
defaultdict

default_callbacks ve bo┼č listelerdeki anahtarlar─▒ varsay─▒lan de─čerler olarak i├žeren bir defaultdict.

Kaynak kodu ultralytics/utils/callbacks/base.py
def get_default_callbacks():
    """
    Return a copy of the default_callbacks dictionary with lists as default values.

    Returns:
        (defaultdict): A defaultdict with keys from default_callbacks and empty lists as default values.
    """
    return defaultdict(list, deepcopy(default_callbacks))



ultralytics.utils.callbacks.base.add_integration_callbacks(instance)

├çe┼čitli kaynaklardan gelen entegrasyon geri ├ža─čr─▒lar─▒n─▒ ├Ârne─čin geri ├ža─čr─▒lar─▒na ekleyin.

Parametreler:

─░sim Tip A├ž─▒klama Varsay─▒lan
instance (Trainer, Predictor, Validator, Exporter)

Bir s├Âzl├╝k olan 'callbacks' ├Âzniteli─čine sahip bir nesne geri arama listeleri.

gerekli
Kaynak kodu ultralytics/utils/callbacks/base.py
def add_integration_callbacks(instance):
    """
    Add integration callbacks from various sources to the instance's callbacks.

    Args:
        instance (Trainer, Predictor, Validator, Exporter): An object with a 'callbacks' attribute that is a dictionary
            of callback lists.
    """

    # Load HUB callbacks
    from .hub import callbacks as hub_cb

    callbacks_list = [hub_cb]

    # Load training callbacks
    if "Trainer" in instance.__class__.__name__:
        from .clearml import callbacks as clear_cb
        from .comet import callbacks as comet_cb
        from .dvc import callbacks as dvc_cb
        from .mlflow import callbacks as mlflow_cb
        from .neptune import callbacks as neptune_cb
        from .raytune import callbacks as tune_cb
        from .tensorboard import callbacks as tb_cb
        from .wb import callbacks as wb_cb

        callbacks_list.extend([clear_cb, comet_cb, dvc_cb, mlflow_cb, neptune_cb, tune_cb, tb_cb, wb_cb])

    # Add the callbacks to the callbacks dictionary
    for callbacks in callbacks_list:
        for k, v in callbacks.items():
            if v not in instance.callbacks[k]:
                instance.callbacks[k].append(v)





Created 2023-11-12, Updated 2024-06-02
Authors: glenn-jocher (5), Burhan-Q (1), Laughing-q (1)