Unverified Commit 18925925 authored by L. Yeung's avatar L. Yeung Committed by GitHub
Browse files

Correct docstrings and a typo in comments (#27047)



* docs(training_args): correct docstrings

Correct docstrings of these methods in `TrainingArguments`:

- `set_save`
- `set_logging`

* docs(training_args): adjust words in docstrings
Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>

* docs(trainer): correct a typo in comments

---------
Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
parent 8214d6e7
...@@ -1911,7 +1911,7 @@ class Trainer: ...@@ -1911,7 +1911,7 @@ class Trainer:
logger.info("\n\nTraining completed. Do not forget to share your model on huggingface.co/models =)\n\n") logger.info("\n\nTraining completed. Do not forget to share your model on huggingface.co/models =)\n\n")
if args.load_best_model_at_end and self.state.best_model_checkpoint is not None: if args.load_best_model_at_end and self.state.best_model_checkpoint is not None:
# Wait for everyone to get here so we are sur the model has been saved by process 0. # Wait for everyone to get here so we are sure the model has been saved by process 0.
if is_torch_tpu_available(): if is_torch_tpu_available():
xm.rendezvous("load_best_model_at_end") xm.rendezvous("load_best_model_at_end")
elif args.parallel_mode == ParallelMode.DISTRIBUTED: elif args.parallel_mode == ParallelMode.DISTRIBUTED:
......
...@@ -2178,7 +2178,7 @@ class TrainingArguments: ...@@ -2178,7 +2178,7 @@ class TrainingArguments:
jit_mode: bool = False, jit_mode: bool = False,
): ):
""" """
A method that regroups all arguments linked to the evaluation. A method that regroups all arguments linked to evaluation.
Args: Args:
strategy (`str` or [`~trainer_utils.IntervalStrategy`], *optional*, defaults to `"no"`): strategy (`str` or [`~trainer_utils.IntervalStrategy`], *optional*, defaults to `"no"`):
...@@ -2276,7 +2276,7 @@ class TrainingArguments: ...@@ -2276,7 +2276,7 @@ class TrainingArguments:
on_each_node: bool = False, on_each_node: bool = False,
): ):
""" """
A method that regroups all arguments linked to the evaluation. A method that regroups all arguments linked to checkpoint saving.
Args: Args:
strategy (`str` or [`~trainer_utils.IntervalStrategy`], *optional*, defaults to `"steps"`): strategy (`str` or [`~trainer_utils.IntervalStrategy`], *optional*, defaults to `"steps"`):
...@@ -2329,7 +2329,7 @@ class TrainingArguments: ...@@ -2329,7 +2329,7 @@ class TrainingArguments:
replica_level: str = "passive", replica_level: str = "passive",
): ):
""" """
A method that regroups all arguments linked to the evaluation. A method that regroups all arguments linked to logging.
Args: Args:
strategy (`str` or [`~trainer_utils.IntervalStrategy`], *optional*, defaults to `"steps"`): strategy (`str` or [`~trainer_utils.IntervalStrategy`], *optional*, defaults to `"steps"`):
......
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