/usr/local/lib/python3.6/site-packages/transformers
NameSizeModeActions
benchmark/-0755rm
commands/-0755rm
data/-0755rm
models/-0755rm
onnx/-0755rm
pipelines/-0755rm
sagemaker/-0755rm
utils/-0755rm
__pycache__/-0755rm
activations.py66120644editdlrm
activations_tf.py42680644editdlrm
configuration_utils.py467650644editdlrm
convert_graph_to_onnx.py195750644editdlrm
convert_pytorch_checkpoint_to_tf2.py166400644editdlrm
convert_slow_tokenizer.py376260644editdlrm
convert_slow_tokenizers_checkpoints_to_fast.py49540644editdlrm
convert_tf_hub_seq_to_seq_bert_to_pytorch.py28990644editdlrm
debug_utils.py128870644editdlrm
deepspeed.py188830644editdlrm
dependency_versions_check.py17670644editdlrm
dependency_versions_table.py23900644editdlrm
dynamic_module_utils.py193060644editdlrm
feature_extraction_sequence_utils.py180740644editdlrm
feature_extraction_utils.py267680644editdlrm
file_utils.py39300644editdlrm
generation_beam_constraints.py190780644editdlrm
generation_beam_search.py401450644editdlrm
generation_flax_logits_process.py108790644editdlrm
generation_flax_utils.py387080644editdlrm
generation_logits_process.py303360644editdlrm
generation_stopping_criteria.py55090644editdlrm
generation_tf_logits_process.py175030644editdlrm
generation_tf_utils.py1306710644editdlrm
generation_utils.py1771180644editdlrm
hf_argparser.py119010644editdlrm
image_utils.py128600644editdlrm
integrations.py402030644editdlrm
keras_callbacks.py189020644editdlrm
modelcard.py352780644editdlrm
modeling_flax_outputs.py355140644editdlrm
modeling_flax_pytorch_utils.py122960644editdlrm
modeling_flax_utils.py376610644editdlrm
modeling_outputs.py603270644editdlrm
modeling_tf_outputs.py461070644editdlrm
modeling_tf_pytorch_utils.py199160644editdlrm
modeling_tf_utils.py1008320644editdlrm
modeling_utils.py1378000644editdlrm
optimization.py277560644editdlrm
optimization_tf.py157220644editdlrm
processing_utils.py105590644editdlrm
py.typed10644editdlrm
pytorch_utils.py16490644editdlrm
testing_utils.py482920644editdlrm
tf_utils.py15680644editdlrm
tokenization_utils.py398670644editdlrm
tokenization_utils_base.py1701590644editdlrm
tokenization_utils_fast.py329090644editdlrm
trainer.py1431030644editdlrm
trainer_callback.py231990644editdlrm
trainer_pt_utils.py447640644editdlrm
trainer_seq2seq.py103960644editdlrm
trainer_tf.py345640644editdlrm
trainer_utils.py185090644editdlrm
training_args.py680420644editdlrm
training_args_seq2seq.py28290644editdlrm
training_args_tf.py142670644editdlrm
__init__.py1719520644editdlrm
Edit: /usr/local/lib/python3.6/site-packages/transformers/training_args_seq2seq.py (2829B)
# Copyright 2020 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import logging from dataclasses import dataclass, field from typing import Optional from .training_args import TrainingArguments from .utils import add_start_docstrings logger = logging.getLogger(__name__) @dataclass @add_start_docstrings(TrainingArguments.__doc__) class Seq2SeqTrainingArguments(TrainingArguments): """ Args: sortish_sampler (`bool`, *optional*, defaults to `False`): Whether to use a *sortish sampler* or not. Only possible if the underlying datasets are *Seq2SeqDataset* for now but will become generally available in the near future. It sorts the inputs according to lengths in order to minimize the padding size, with a bit of randomness for the training set. predict_with_generate (`bool`, *optional*, defaults to `False`): Whether to use generate to calculate generative metrics (ROUGE, BLEU). generation_max_length (`int`, *optional*): The `max_length` to use on each evaluation loop when `predict_with_generate=True`. Will default to the `max_length` value of the model configuration. generation_num_beams (`int`, *optional*): The `num_beams` to use on each evaluation loop when `predict_with_generate=True`. Will default to the `num_beams` value of the model configuration. """ sortish_sampler: bool = field(default=False, metadata={"help": "Whether to use SortishSampler or not."}) predict_with_generate: bool = field( default=False, metadata={"help": "Whether to use generate to calculate generative metrics (ROUGE, BLEU)."} ) generation_max_length: Optional[int] = field( default=None, metadata={ "help": "The `max_length` to use on each evaluation loop when `predict_with_generate=True`. Will default " "to the `max_length` value of the model configuration." }, ) generation_num_beams: Optional[int] = field( default=None, metadata={ "help": "The `num_beams` to use on each evaluation loop when `predict_with_generate=True`. Will default " "to the `num_beams` value of the model configuration." }, )