integrations#
- class VisualDLCallback(vdl_writer=None)[source]#
Bases:
TrainerCallbackA [
TrainerCallback] that sends the logs to [VisualDL](https://www.paddlepaddle.org.cn/paddle/visualdl). :param vdl_writer: The writer to use. Will instantiate one if not set. :type vdl_writer:LogWriter, optional
- class TensorBoardCallback(tb_writer=None)[source]#
Bases:
TrainerCallbackA [
TrainerCallback] that sends the logs to [TensorBoard](https://www.tensorflow.org/tensorboard).- Parameters:
tb_writer (
SummaryWriter, optional) – The writer to use. Will instantiate one if not set.
- class WandbCallback[source]#
Bases:
TrainerCallbackA [
TrainerCallback] that logs metrics, media, model checkpoints to [Weight and Biases](https://www.wandb.com/).- setup(args, state, model, **kwargs)[source]#
Setup the optional Weights & Biases (wandb) integration.
One can subclass and override this method to customize the setup if needed. variables: Environment: - WANDB_LOG_MODEL (
str, optional, defaults to"false"):Whether to log model and checkpoints during training. Can be
"end","checkpoint"or"false". If set to"end", the model will be uploaded at the end of training. If set to"checkpoint", the checkpoint will be uploaded everyargs.save_steps. If set to"false", the model will not be uploaded. Use along with [TrainingArguments.load_best_model_at_end] to upload best model.- WANDB_WATCH (
str, optional defaults to"false"): Can be
"gradients","all","parameters", or"false". Set to"all"to log gradients and parameters.
- WANDB_WATCH (
- WANDB_PROJECT (
str, optional, defaults to"PaddleNLP"): Set this to a custom string to store results in a different project.
- WANDB_PROJECT (
- WANDB_DISABLED (
bool, optional, defaults toFalse): Whether to disable wandb entirely. Set
WANDB_DISABLED=trueto disable.
- WANDB_DISABLED (
- on_train_begin(args, state, control, model=None, **kwargs)[source]#
Event called at the beginning of training.
- on_train_end(args, state, control, model=None, tokenizer=None, **kwargs)[source]#
Event called at the end of training.
- class AutoNLPCallback[source]#
Bases:
TrainerCallbackA [
TrainerCallback] that sends the logs to [Ray Tune] for [AutoNLP]