notice

This is documentation for Rasa Open Source Documentation v2.5.x, which is no longer actively maintained.
For up-to-date documentation, see the latest version (2.7.x).

Version: 2.5.x

rasa.utils.tensorflow.callback

RasaTrainingLogger Objects

class RasaTrainingLogger(tf.keras.callbacks.Callback)

Callback for logging the status of training.

__init__

| __init__(epochs: int, silent: bool) -> None

Initializes the callback.

Arguments:

  • epochs - Total number of epochs.
  • silent - If 'True' the entire progressbar wrapper is disabled.

on_epoch_end

| on_epoch_end(epoch: int, logs: Optional[Dict[Text, Any]] = None) -> None

Updates the logging output on every epoch end.

Arguments:

  • epoch - The current epoch.
  • logs - The training metrics.

on_train_end

| on_train_end(logs: Optional[Dict[Text, Any]] = None) -> None

Closes the progress bar after training.

Arguments:

  • logs - The training metrics.

RasaModelCheckpoint Objects

class RasaModelCheckpoint(tf.keras.callbacks.Callback)

Callback for saving intermediate model checkpoints.

__init__

| __init__(checkpoint_dir: Path) -> None

Initializes the callback.

Arguments:

  • checkpoint_dir - Directory to store checkpoints to.

on_epoch_end

| on_epoch_end(epoch: int, logs: Optional[Dict[Text, Any]] = None) -> None

Save the model on epoch end if the model has improved.

Arguments:

  • epoch - The current epoch.
  • logs - The training metrics.