bridge.training.utils.comet_utils#

Module Contents#

Functions#

on_save_checkpoint_success

Callback executed after a checkpoint is successfully saved.

on_load_checkpoint_success

Callback executed after a checkpoint is successfully loaded.

API#

bridge.training.utils.comet_utils.on_save_checkpoint_success(
checkpoint_path: str,
save_dir: str,
iteration: int,
comet_logger: Optional[Any],
) None#

Callback executed after a checkpoint is successfully saved.

If a Comet ML experiment is provided, records the checkpoint path and iteration as experiment metadata.

Parameters:
  • checkpoint_path – The path to the specific checkpoint file/directory saved.

  • save_dir – The base directory where checkpoints are being saved.

  • iteration – The training iteration at which the checkpoint was saved.

  • comet_logger – The Comet ML Experiment instance. If None, this function is a no-op.

bridge.training.utils.comet_utils.on_load_checkpoint_success(
checkpoint_path: str,
load_dir: str,
comet_logger: Optional[Any],
) None#

Callback executed after a checkpoint is successfully loaded.

For Comet ML, records the loaded checkpoint path and base directory as experiment metadata.

Parameters:
  • checkpoint_path – The path to the specific checkpoint file/directory loaded.

  • load_dir – The base directory from which the checkpoint was loaded.

  • comet_logger – The Comet ML Experiment instance. If None, this function is a no-op.