"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "ff76e7c2126ab26e5722f54640d44cab7e3dfdd4"
Unverified Commit 9f406392 authored by Ben Gubler's avatar Ben Gubler Committed by GitHub
Browse files

Update docs to explain disabling callbacks using report_to (#26155)

* feat: update callback doc to explain disabling callbacks using report_to

* docs: update report_to docstring
parent dcc49d8a
...@@ -25,7 +25,7 @@ Callbacks are "read only" pieces of code, apart from the [`TrainerControl`] obje ...@@ -25,7 +25,7 @@ Callbacks are "read only" pieces of code, apart from the [`TrainerControl`] obje
cannot change anything in the training loop. For customizations that require changes in the training loop, you should cannot change anything in the training loop. For customizations that require changes in the training loop, you should
subclass [`Trainer`] and override the methods you need (see [trainer](trainer) for examples). subclass [`Trainer`] and override the methods you need (see [trainer](trainer) for examples).
By default a [`Trainer`] will use the following callbacks: By default, `TrainingArguments.report_to` is set to `"all"`, so a [`Trainer`] will use the following callbacks.
- [`DefaultFlowCallback`] which handles the default behavior for logging, saving and evaluation. - [`DefaultFlowCallback`] which handles the default behavior for logging, saving and evaluation.
- [`PrinterCallback`] or [`ProgressCallback`] to display progress and print the - [`PrinterCallback`] or [`ProgressCallback`] to display progress and print the
...@@ -45,6 +45,8 @@ By default a [`Trainer`] will use the following callbacks: ...@@ -45,6 +45,8 @@ By default a [`Trainer`] will use the following callbacks:
- [`~integrations.DagsHubCallback`] if [dagshub](https://dagshub.com/) is installed. - [`~integrations.DagsHubCallback`] if [dagshub](https://dagshub.com/) is installed.
- [`~integrations.FlyteCallback`] if [flyte](https://flyte.org/) is installed. - [`~integrations.FlyteCallback`] if [flyte](https://flyte.org/) is installed.
If a package is installed but you don't wish to use the accompanying integration, you can change `TrainingArguments.report_to` to a list of just those integrations you want to use (e.g. `["azure_ml", "wandb"]`).
The main class that implements callbacks is [`TrainerCallback`]. It gets the The main class that implements callbacks is [`TrainerCallback`]. It gets the
[`TrainingArguments`] used to instantiate the [`Trainer`], can access that [`TrainingArguments`] used to instantiate the [`Trainer`], can access that
Trainer's internal state via [`TrainerState`], and can take some actions on the training loop via Trainer's internal state via [`TrainerState`], and can take some actions on the training loop via
......
...@@ -2345,10 +2345,11 @@ class TrainingArguments: ...@@ -2345,10 +2345,11 @@ class TrainingArguments:
Logger log level to use on the main process. Possible choices are the log levels as strings: `"debug"`, Logger log level to use on the main process. Possible choices are the log levels as strings: `"debug"`,
`"info"`, `"warning"`, `"error"` and `"critical"`, plus a `"passive"` level which doesn't set anything `"info"`, `"warning"`, `"error"` and `"critical"`, plus a `"passive"` level which doesn't set anything
and lets the application set the level. and lets the application set the level.
report_to (`str` or `List[str]`, *optional*, defaults to `"none"`): report_to (`str` or `List[str]`, *optional*, defaults to `"all"`):
The list of integrations to report the results and logs to. Supported platforms are `"azure_ml"`, The list of integrations to report the results and logs to. Supported platforms are `"azure_ml"`,
`"comet_ml"`, `"mlflow"`, `"neptune"`, `"tensorboard"`,`"clearml"` and `"wandb"`. Use `"all"` to report `"clearml"`, `"codecarbon"`, `"comet_ml"`, `"dagshub"`, `"flyte"`, `"mlflow"`, `"neptune"`,
to all integrations installed, `"none"` for no integrations. `"tensorboard"`, and `"wandb"`. Use `"all"` to report to all integrations installed, `"none"` for no
integrations.
first_step (`bool`, *optional*, defaults to `False`): first_step (`bool`, *optional*, defaults to `False`):
Whether to log and evaluate the first `global_step` or not. Whether to log and evaluate the first `global_step` or not.
nan_inf_filter (`bool`, *optional*, defaults to `True`): nan_inf_filter (`bool`, *optional*, defaults to `True`):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment