def get_callbacks(checkpoint_dir: str, tensorboard_logs: str, stage: str) -> list:
    '\n    Args:\n        checkpoint_dir: Directory to save the model at checkpoint\n        tensorboard_logs: Directory to save tensorboard logs\n        stage: Stage name for training\n    Returns:\n        callback_list: List of created callbacks\n    '
    create_directories([checkpoint_dir, tensorboard_logs])
    tensorboard_cb = tf.keras.callbacks.TensorBoard(tensorboard_logs)
    early_stopping_cb = tf.keras.callbacks.EarlyStopping(patience=3, restore_best_weights=True)
    ckpt_file_path = os.path.join(checkpoint_dir, f'{stage}_ckpt_model.h5')
    checkpoint_cb = tf.keras.callbacks.ModelCheckpoint(filepath=ckpt_file_path, save_best_only=True)
    callback_list = [tensorboard_cb, early_stopping_cb, checkpoint_cb]
    logging.info(f'Callbacks created: {callback_list}')
    return callback_list
Args:
    checkpoint_dir: Directory to save the model at checkpoint
    tensorboard_logs: Directory to save tensorboard logs
    stage: Stage name for training
Returns:
    callback_list: List of created callbacks
def get_callbacks(checkpoint_dir: str, tensorboard_logs: str, stage: str) -> list:
    '\n    Args:\n        checkpoint_dir: Directory to save the model at checkpoint\n        tensorboard_logs: Directory to save tensorboard logs\n        stage: Stage name for training\n    Returns:\n        callback_list: List of created callbacks\n    '
    create_directories([checkpoint_dir, tensorboard_logs])
    tensorboard_cb = tf.keras.callbacks.TensorBoard(tensorboard_logs)
    early_stopping_cb = tf.keras.callbacks.EarlyStopping(patience=3, restore_best_weights=True)
    ckpt_file_path = os.path.join(checkpoint_dir, f'{stage}_ckpt_model.h5')
    checkpoint_cb = tf.keras.callbacks.ModelCheckpoint(filepath=ckpt_file_path, save_best_only=True)
    callback_list = [tensorboard_cb, early_stopping_cb, checkpoint_cb]
    logging.info(f'Callbacks created: {callback_list}')
    return callback_list