Update Neptune callback docstring (#22497)

* update NeptuneCallback docstring

* formatting

* apply make style

---------

Co-authored-by: Aleksander Wojnarowicz <alwojnarowicz@gmail.com>
This commit is contained in:
Sabine 2023-03-31 22:38:34 +03:00 committed by GitHub
parent 6fc44656b4
commit 3a9464bd30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1123,33 +1123,32 @@ class NeptuneMissingConfiguration(Exception):
class NeptuneCallback(TrainerCallback): class NeptuneCallback(TrainerCallback):
"""TrainerCallback that sends the logs to [Neptune](https://neptune.ai). """TrainerCallback that sends the logs to [Neptune](https://app.neptune.ai).
Args: Args:
api_token (`str`, optional): api_token (`str`, *optional*): Neptune API token obtained upon registration.
Neptune API token obtained upon registration. You can leave this argument out if you have saved your token You can leave this argument out if you have saved your token to the `NEPTUNE_API_TOKEN` environment
to the `NEPTUNE_API_TOKEN` environment variable (strongly recommended). See full setup instructions in the variable (strongly recommended). See full setup instructions in the
[docs](https://docs.neptune.ai/getting-started/installation). [docs](https://docs.neptune.ai/setup/installation).
project (`str`, optional): project (`str`, *optional*): Name of an existing Neptune project, in the form "workspace-name/project-name".
Name of an existing Neptune project, in the form: "workspace-name/project-name". You can find and copy the You can find and copy the name in Neptune from the project settings -> Properties. If None (default), the
name from the project Settings -> Properties in Neptune. If None (default), the value of the value of the `NEPTUNE_PROJECT` environment variable is used.
`NEPTUNE_PROJECT` environment variable will be used. name (`str`, *optional*): Custom name for the run.
name (`str`, optional): Custom name for the run.
base_namespace (`str`, optional, defaults to "finetuning"): In the Neptune run, the root namespace base_namespace (`str`, optional, defaults to "finetuning"): In the Neptune run, the root namespace
that will contain all of the logged metadata. that will contain all of the metadata logged by the callback.
log_parameters (`bool`, optional, defaults to True): log_parameters (`bool`, *optional*, defaults to `True`):
If True, logs all Trainer arguments and model parameters provided by the Trainer. If True, logs all Trainer arguments and model parameters provided by the Trainer.
log_checkpoints (`str`, optional, defaults to None): log_checkpoints (`str`, *optional*): If "same", uploads checkpoints whenever they are saved by the Trainer.
If "same", uploads checkpoints whenever they are saved by the Trainer. If "last", uploads only the most If "last", uploads only the most recently saved checkpoint. If "best", uploads the best checkpoint (among
recently saved checkpoint. If "best", uploads the best checkpoint (among the ones saved by the Trainer). If the ones saved by the Trainer). If `None`, does not upload checkpoints.
None, does not upload checkpoints. run (`Run`, *optional*): Pass a Neptune run object if you want to continue logging to an existing run.
run (`Run`, optional): Read more about resuming runs in the [docs](https://docs.neptune.ai/logging/to_existing_object).
Pass a Neptune run object if you want to continue logging to an existing run. Read more about resuming runs **neptune_run_kwargs (*optional*):
in the [docs](https://docs.neptune.ai/how-to-guides/neptune-api/resume-run).
**neptune_run_kwargs (optional):
Additional keyword arguments to be passed directly to the Additional keyword arguments to be passed directly to the
[neptune.init_run()](https://docs.neptune.ai/api-reference/neptune#.init_run) function when a new run is [`neptune.init_run()`](https://docs.neptune.ai/api/neptune#init_run) function when a new run is created.
created.
For instructions and examples, see the [Transformers integration
guide](https://docs.neptune.ai/integrations/transformers) in the Neptune documentation.
""" """
integration_version_key = "source_code/integrations/transformers" integration_version_key = "source_code/integrations/transformers"