diff --git a/trl/trainer/alignprop_trainer.py b/trl/trainer/alignprop_trainer.py index a4fb473f28..80c9e0556d 100644 --- a/trl/trainer/alignprop_trainer.py +++ b/trl/trainer/alignprop_trainer.py @@ -402,10 +402,10 @@ def create_model_card( Creates a draft of a model card using the information available to the `Trainer`. Args: - model_name (`str`, *optional*, defaults to `None`): - The name of the model. - dataset_name (`str`, *optional*, defaults to `None`): - The name of the dataset used for training. + model_name (`str` or `None`, *optional*, defaults to `None`): + Name of the model. + dataset_name (`str` or `None`, *optional*, defaults to `None`): + Name of the dataset used for training. tags (`str`, `list[str]` or `None`, *optional*, defaults to `None`): Tags to be associated with the model card. """ diff --git a/trl/trainer/bco_trainer.py b/trl/trainer/bco_trainer.py index 8b7c28f9bf..ccbb701d9f 100644 --- a/trl/trainer/bco_trainer.py +++ b/trl/trainer/bco_trainer.py @@ -1493,11 +1493,11 @@ def create_model_card( Creates a draft of a model card using the information available to the `Trainer`. Args: - model_name (`str`, *optional*, defaults to `None`): - The name of the model. - dataset_name (`str`, *optional*, defaults to `None`): - The name of the dataset used for training. - tags (`str`, `list[str]` or None, *optional*, defaults to `None`): + model_name (`str` or `None`, *optional*, defaults to `None`): + Name of the model. + dataset_name (`str` or `None`, *optional*, defaults to `None`): + Name of the dataset used for training. + tags (`str`, `list[str]` or `None`, *optional*, defaults to `None`): Tags to be associated with the model card. """ if not self.is_world_process_zero(): diff --git a/trl/trainer/cpo_trainer.py b/trl/trainer/cpo_trainer.py index a68a8f635b..050dddad99 100644 --- a/trl/trainer/cpo_trainer.py +++ b/trl/trainer/cpo_trainer.py @@ -1026,10 +1026,10 @@ def create_model_card( Creates a draft of a model card using the information available to the `Trainer`. Args: - model_name (`str`, *optional*, defaults to `None`): - The name of the model. - dataset_name (`str`, *optional*, defaults to `None`): - The name of the dataset used for training. + model_name (`str` or `None`, *optional*, defaults to `None`): + Name of the model. + dataset_name (`str` or `None`, *optional*, defaults to `None`): + Name of the dataset used for training. tags (`str`, `list[str]` or `None`, *optional*, defaults to `None`): Tags to be associated with the model card. """ diff --git a/trl/trainer/ddpo_trainer.py b/trl/trainer/ddpo_trainer.py index c4d86d35d2..0ba0c7b642 100644 --- a/trl/trainer/ddpo_trainer.py +++ b/trl/trainer/ddpo_trainer.py @@ -603,10 +603,10 @@ def create_model_card( Creates a draft of a model card using the information available to the `Trainer`. Args: - model_name (`str`, *optional*, defaults to `None`): - The name of the model. - dataset_name (`str`, *optional*, defaults to `None`): - The name of the dataset used for training. + model_name (`str` or `None`, *optional*, defaults to `None`): + Name of the model. + dataset_name (`str` or `None`, *optional*, defaults to `None`): + Name of the dataset used for training. tags (`str`, `list[str]` or `None`, *optional*, defaults to `None`): Tags to be associated with the model card. """ diff --git a/trl/trainer/dpo_trainer.py b/trl/trainer/dpo_trainer.py index b9adbedf5f..d4b197362c 100644 --- a/trl/trainer/dpo_trainer.py +++ b/trl/trainer/dpo_trainer.py @@ -1525,10 +1525,10 @@ def create_model_card( Creates a draft of a model card using the information available to the `Trainer`. Args: - model_name (`str`, *optional*, defaults to `None`): - The name of the model. - dataset_name (`str`, *optional*, defaults to `None`): - The name of the dataset used for training. + model_name (`str` or `None`, *optional*, defaults to `None`): + Name of the model. + dataset_name (`str` or `None`, *optional*, defaults to `None`): + Name of the dataset used for training. tags (`str`, `list[str]` or `None`, *optional*, defaults to `None`): Tags to be associated with the model card. """ diff --git a/trl/trainer/gkd_trainer.py b/trl/trainer/gkd_trainer.py index 74bceba0ee..59d71d1e44 100644 --- a/trl/trainer/gkd_trainer.py +++ b/trl/trainer/gkd_trainer.py @@ -346,10 +346,10 @@ def create_model_card( Creates a draft of a model card using the information available to the `Trainer`. Args: - model_name (`str`, *optional*, defaults to `None`): - The name of the model. - dataset_name (`str`, *optional*, defaults to `None`): - The name of the dataset used for training. + model_name (`str` or `None`, *optional*, defaults to `None`): + Name of the model. + dataset_name (`str` or `None`, *optional*, defaults to `None`): + Name of the dataset used for training. tags (`str`, `list[str]` or `None`, *optional*, defaults to `None`): Tags to be associated with the model card. """ diff --git a/trl/trainer/iterative_sft_trainer.py b/trl/trainer/iterative_sft_trainer.py index 5b88e8a1ce..369348a789 100644 --- a/trl/trainer/iterative_sft_trainer.py +++ b/trl/trainer/iterative_sft_trainer.py @@ -405,10 +405,10 @@ def create_model_card( Creates a draft of a model card using the information available to the `Trainer`. Args: - model_name (`str`, *optional*, defaults to `None`): - The name of the model. - dataset_name (`str`, *optional*, defaults to `None`): - The name of the dataset used for training. + model_name (`str` or `None`, *optional*, defaults to `None`): + Name of the model. + dataset_name (`str` or `None`, *optional*, defaults to `None`): + Name of the dataset used for training. tags (`str`, `list[str]` or `None`, *optional*, defaults to `None`): Tags to be associated with the model card. """ diff --git a/trl/trainer/kto_trainer.py b/trl/trainer/kto_trainer.py index d851a92ab3..897ce25520 100644 --- a/trl/trainer/kto_trainer.py +++ b/trl/trainer/kto_trainer.py @@ -1501,10 +1501,10 @@ def create_model_card( Creates a draft of a model card using the information available to the `Trainer`. Args: - model_name (`str`, *optional*, defaults to `None`): - The name of the model. - dataset_name (`str`, *optional*, defaults to `None`): - The name of the dataset used for training. + model_name (`str` or `None`, *optional*, defaults to `None`): + Name of the model. + dataset_name (`str` or `None`, *optional*, defaults to `None`): + Name of the dataset used for training. tags (`str`, `list[str]` or `None`, *optional*, defaults to `None`): Tags to be associated with the model card. """ diff --git a/trl/trainer/nash_md_trainer.py b/trl/trainer/nash_md_trainer.py index 0d04193524..cbe218066e 100644 --- a/trl/trainer/nash_md_trainer.py +++ b/trl/trainer/nash_md_trainer.py @@ -468,10 +468,10 @@ def create_model_card( Creates a draft of a model card using the information available to the `Trainer`. Args: - model_name (`str`, *optional*, defaults to `None`): - The name of the model. - dataset_name (`str`, *optional*, defaults to `None`): - The name of the dataset used for training. + model_name (`str` or `None`, *optional*, defaults to `None`): + Name of the model. + dataset_name (`str` or `None`, *optional*, defaults to `None`): + Name of the dataset used for training. tags (`str`, `list[str]` or `None`, *optional*, defaults to `None`): Tags to be associated with the model card. """ @@ -492,7 +492,7 @@ def create_model_card( citation = textwrap.dedent("""\ @inproceedings{munos2024nash, - title = {Nash Learning from Human Feedback}, + title = {{Nash Learning from Human Feedback}}, author = {R{\'{e}}mi Munos and Michal Valko and Daniele Calandriello and Mohammad Gheshlaghi Azar and Mark Rowland and Zhaohan Daniel Guo and Yunhao Tang and Matthieu Geist and Thomas Mesnard and C{\\^{o}}me Fiegel and Andrea Michi and Marco Selvi and Sertan Girgin and Nikola Momchev and Olivier Bachem and Daniel J. Mankowitz and Doina Precup and Bilal Piot}, year = 2024, booktitle = {Forty-first International Conference on Machine Learning, {ICML} 2024, Vienna, Austria, July 21-27, 2024}, diff --git a/trl/trainer/online_dpo_trainer.py b/trl/trainer/online_dpo_trainer.py index 35d9394e3f..c3509caa52 100644 --- a/trl/trainer/online_dpo_trainer.py +++ b/trl/trainer/online_dpo_trainer.py @@ -778,10 +778,10 @@ def create_model_card( Creates a draft of a model card using the information available to the `Trainer`. Args: - model_name (`str`, *optional*, defaults to `None`): - The name of the model. - dataset_name (`str`, *optional*, defaults to `None`): - The name of the dataset used for training. + model_name (`str` or `None`, *optional*, defaults to `None`): + Name of the model. + dataset_name (`str` or `None`, *optional*, defaults to `None`): + Name of the dataset used for training. tags (`str`, `list[str]` or `None`, *optional*, defaults to `None`): Tags to be associated with the model card. """ diff --git a/trl/trainer/orpo_trainer.py b/trl/trainer/orpo_trainer.py index 803bda6699..06457683e8 100644 --- a/trl/trainer/orpo_trainer.py +++ b/trl/trainer/orpo_trainer.py @@ -1055,10 +1055,10 @@ def create_model_card( Creates a draft of a model card using the information available to the `Trainer`. Args: - model_name (`str`, *optional*, defaults to `None`): - The name of the model. - dataset_name (`str`, *optional*, defaults to `None`): - The name of the dataset used for training. + model_name (`str` or `None`, *optional*, defaults to `None`): + Name of the model. + dataset_name (`str` or `None`, *optional*, defaults to `None`): + Name of the dataset used for training. tags (`str`, `list[str]` or `None`, *optional*, defaults to `None`): Tags to be associated with the model card. """ diff --git a/trl/trainer/ppo_trainer.py b/trl/trainer/ppo_trainer.py index c30813a4b1..fe3ea3a147 100644 --- a/trl/trainer/ppo_trainer.py +++ b/trl/trainer/ppo_trainer.py @@ -747,10 +747,10 @@ def create_model_card( Creates a draft of a model card using the information available to the `Trainer`. Args: - model_name (`str`, *optional*, defaults to `None`): - The name of the model. - dataset_name (`str`, *optional*, defaults to `None`): - The name of the dataset used for training. + model_name (`str` or `None`, *optional*, defaults to `None`): + Name of the model. + dataset_name (`str` or `None`, *optional*, defaults to `None`): + Name of the dataset used for training. tags (`str`, `list[str]` or `None`, *optional*, defaults to `None`): Tags to be associated with the model card. """ diff --git a/trl/trainer/prm_trainer.py b/trl/trainer/prm_trainer.py index 55a36ca6d8..661c6553f6 100644 --- a/trl/trainer/prm_trainer.py +++ b/trl/trainer/prm_trainer.py @@ -288,11 +288,12 @@ def create_model_card( ): """ Creates a draft of a model card using the information available to the `Trainer`. + Args: - model_name (`str`, *optional*, defaults to `None`): - The name of the model. - dataset_name (`str`, *optional*, defaults to `None`): - The name of the dataset used for training. + model_name (`str` or `None`, *optional*, defaults to `None`): + Name of the model. + dataset_name (`str` or `None`, *optional*, defaults to `None`): + Name of the dataset used for training. tags (`str`, `list[str]` or `None`, *optional*, defaults to `None`): Tags to be associated with the model card. """ @@ -313,7 +314,7 @@ def create_model_card( citation = textwrap.dedent("""\ @article{uesato2022solving, - title = {Solving Math Word Problems With Process- and Outcome-Based Feedback}, + title = {{Solving Math Word Problems With Process- and Outcome-Based Feedback}}, author = {Uesato, Jonathan and Kushman, Nate and Kumar, Ramana and Song, Francis and Siegel, Noah and Wang, Lisa and Creswell, Antonia and Irving, Geoffrey and Higgins, Irina}, year = 2022, journal = {arXiv preprint arXiv:2211.14275} diff --git a/trl/trainer/reward_trainer.py b/trl/trainer/reward_trainer.py index 6cbff41281..f7f1fe6e9e 100644 --- a/trl/trainer/reward_trainer.py +++ b/trl/trainer/reward_trainer.py @@ -382,10 +382,10 @@ def create_model_card( Creates a draft of a model card using the information available to the `Trainer`. Args: - model_name (`str`, *optional*, defaults to `None`): - The name of the model. - dataset_name (`str`, *optional*, defaults to `None`): - The name of the dataset used for training. + model_name (`str` or `None`, *optional*, defaults to `None`): + Name of the model. + dataset_name (`str` or `None`, *optional*, defaults to `None`): + Name of the dataset used for training. tags (`str`, `list[str]` or `None`, *optional*, defaults to `None`): Tags to be associated with the model card. """ diff --git a/trl/trainer/rloo_trainer.py b/trl/trainer/rloo_trainer.py index 2e16e6c7f8..ccbda384dc 100644 --- a/trl/trainer/rloo_trainer.py +++ b/trl/trainer/rloo_trainer.py @@ -613,10 +613,10 @@ def create_model_card( Creates a draft of a model card using the information available to the `Trainer`. Args: - model_name (`str`, *optional*, defaults to `None`): - The name of the model. - dataset_name (`str`, *optional*, defaults to `None`): - The name of the dataset used for training. + model_name (`str` or `None`, *optional*, defaults to `None`): + Name of the model. + dataset_name (`str` or `None`, *optional*, defaults to `None`): + Name of the dataset used for training. tags (`str`, `list[str]` or `None`, *optional*, defaults to `None`): Tags to be associated with the model card. """ diff --git a/trl/trainer/sft_trainer.py b/trl/trainer/sft_trainer.py index fdd5b88453..9e2e5fe04f 100644 --- a/trl/trainer/sft_trainer.py +++ b/trl/trainer/sft_trainer.py @@ -512,10 +512,10 @@ def create_model_card( Creates a draft of a model card using the information available to the `Trainer`. Args: - model_name (`str`, *optional*, defaults to `None`): - The name of the model. - dataset_name (`str`, *optional*, defaults to `None`): - The name of the dataset used for training. + model_name (`str` or `None`, *optional*, defaults to `None`): + Name of the model. + dataset_name (`str` or `None`, *optional*, defaults to `None`): + Name of the dataset used for training. tags (`str`, `list[str]` or `None`, *optional*, defaults to `None`): Tags to be associated with the model card. """ diff --git a/trl/trainer/xpo_trainer.py b/trl/trainer/xpo_trainer.py index 212b73cba5..2d535344e7 100644 --- a/trl/trainer/xpo_trainer.py +++ b/trl/trainer/xpo_trainer.py @@ -525,10 +525,10 @@ def create_model_card( Creates a draft of a model card using the information available to the `Trainer`. Args: - model_name (`str`, *optional*, defaults to `None`): - The name of the model. - dataset_name (`str`, *optional*, defaults to `None`): - The name of the dataset used for training. + model_name (`str` or `None`, *optional*, defaults to `None`): + Name of the model. + dataset_name (`str` or `None`, *optional*, defaults to `None`): + Name of the dataset used for training. tags (`str`, `list[str]` or `None`, *optional*, defaults to `None`): Tags to be associated with the model card. """