integrations#
- class VisualDLCallback(vdl_writer=None)[源代码]#
-
A [
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)[源代码]#
-
A [
TrainerCallback
] that sends the logs to [TensorBoard](https://www.tensorflow.org/tensorboard).- 参数:
tb_writer (
SummaryWriter
, optional) -- The writer to use. Will instantiate one if not set.
- class WandbCallback[源代码]#
-
A [
TrainerCallback
] that logs metrics, media, model checkpoints to [Weight and Biases](https://www.wandb.com/).- setup(args, state, model, **kwargs)[源代码]#
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=true
to disable.
- WANDB_DISABLED (
- on_train_begin(args, state, control, model=None, **kwargs)[源代码]#
Event called at the beginning of training.
- on_train_end(args, state, control, model=None, tokenizer=None, **kwargs)[源代码]#
Event called at the end of training.