ProgressBarUpdater

class hybrid_learning.concepts.train_eval.callbacks.ProgressBarUpdater(train_kpis=('loss',))[source]

Bases: Callback

Update the progress bar postfix after each batch and epoch. For batch-wise updates, only train_kpis are considered.

Public Methods:

after_batch_train(kpi_train, batch[, pbar])

Update the progress bar with the training KPI values after a batch.

after_epoch_train([kpi_train, pbar])

Update the evaluation progress bar with the final validation KPI values.

after_epoch_eval([kpi_val, pbar_eval])

Update the evaluation progress bar with the final validation KPI values.

Inherited from : py: class:Callback

keys()

Collect a list of all supported callback events.

Inherited from : py: class:Mapping

get(k[,d])

keys()

Collect a list of all supported callback events.

items()

values()

Special Methods:

__init__([train_kpis])

Inherited from : py: class:Callback

__getitem__(event)

Get the method for the specified event or a pass lambda.

__len__()

Number of mapped events.

__iter__()

Iterate over mapped events.

Inherited from : py: class:Mapping

__getitem__(event)

Get the method for the specified event or a pass lambda.

__contains__(key)

__eq__(other)

Return self==value.

Inherited from : py: class:Sized

__len__()

Number of mapped events.

Inherited from : py: class:Iterable

__iter__()

Iterate over mapped events.

Inherited from : py: class:Container

__contains__(key)


__init__(train_kpis=('loss',))[source]
Parameters

train_kpis (Sequence[str]) –

static after_batch_eval(pbar_eval=None, **_unused_args)[source]

Update the progress bar with the evaluation KPI values after a batch.

Parameters

pbar_eval (Optional[tqdm]) –

after_batch_train(kpi_train, batch, pbar=None, **_unused_args)[source]

Update the progress bar with the training KPI values after a batch.

Parameters
  • kpi_train (DataFrame) –

  • batch (int) –

  • pbar (Optional[tqdm]) –

static after_epoch(kpi_train=None, kpi_val=None, pbar=None, **_unused_args)[source]

Update the progress bar with the train and validation KPI values after an epoch.

Parameters
after_epoch_eval(kpi_val=None, pbar_eval=None, **_unused_args)[source]

Update the evaluation progress bar with the final validation KPI values.

Parameters
after_epoch_train(kpi_train=None, pbar=None, **_unused_args)[source]

Update the evaluation progress bar with the final validation KPI values.

Parameters
__parameters__ = ()
train_kpis: Sequence[str]

The list of KPI-names to include into the training logging. A KPI is included if it includes one of the train_kpis strings.