Skip to main content

algorithm

Telemetry hook reporting algorithm progress.

Classes​

AlgorithmProgressHook​

class AlgorithmProgressHook():

Emits AlgorithmProgressEvent at algorithm run and epoch boundaries.

Create the hook with no algorithm seen yet.

Variables​

  • type : HookType - Return the hook type.

Methods​


on_init_end​

def on_init_end(self, algorithm: _BaseAlgorithm, *args: Any, **kwargs: Any) ‑> None:

Inherited from:

BaseAlgorithmHook.on_init_end :

Run the hook at the very end of algorithm initialisation.

on_init_start​

def on_init_start(self, algorithm: _BaseAlgorithm, *args: Any, **kwargs: Any) ‑> None:

Inherited from:

BaseAlgorithmHook.on_init_start :

Run the hook at the very start of algorithm initialisation.

on_progress​

def on_progress(    self,    algorithm: _BaseAlgorithm,    context: TaskContext | None,    step: str,    current_epoch: int | None = None,    max_epochs: int | None = None,    step_info: str | None = None,    *args: Any,    **kwargs: Any,) ‑> None:

Emit telemetry for an arbitrary in-run algorithm progress update.

on_run_end​

def on_run_end(    self,    algorithm: _BaseAlgorithm,    context: TaskContext | None,    *args: Any,    **kwargs: Any,) ‑> None:

Emit telemetry when algorithm execution ends.

on_run_start​

def on_run_start(    self,    algorithm: _BaseAlgorithm,    context: TaskContext | None,    *args: Any,    **kwargs: Any,) ‑> None:

Emit telemetry when algorithm execution starts.

on_train_epoch_end​

def on_train_epoch_end(    self,    current_epoch: int,    min_epochs: int | None,    max_epochs: int | None,    *args: Any,    **kwargs: Any,) ‑> None:

Emit telemetry when an algorithm training epoch ends.

on_train_epoch_start​

def on_train_epoch_start(    self,    current_epoch: int,    min_epochs: int | None,    max_epochs: int | None,    *args: Any,    **kwargs: Any,) ‑> None:

Emit telemetry when an algorithm training epoch starts.