Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
3ac040bc
"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "6fe79e57d70204933e6940be6c822dc48567ad71"
Unverified
Commit
3ac040bc
authored
Dec 07, 2022
by
Julian Mack
Committed by
GitHub
Dec 07, 2022
Browse files
Updated Trainer args typing (#20655)
parent
3994c045
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/transformers/trainer.py
src/transformers/trainer.py
+3
-3
No files found.
src/transformers/trainer.py
View file @
3ac040bc
...
@@ -298,13 +298,13 @@ class Trainer:
...
@@ -298,13 +298,13 @@ class Trainer:
args
:
TrainingArguments
=
None
,
args
:
TrainingArguments
=
None
,
data_collator
:
Optional
[
DataCollator
]
=
None
,
data_collator
:
Optional
[
DataCollator
]
=
None
,
train_dataset
:
Optional
[
Dataset
]
=
None
,
train_dataset
:
Optional
[
Dataset
]
=
None
,
eval_dataset
:
Optional
[
Dataset
]
=
None
,
eval_dataset
:
Optional
[
Union
[
Dataset
,
Dict
[
str
,
Dataset
]]
]
=
None
,
tokenizer
:
Optional
[
PreTrainedTokenizerBase
]
=
None
,
tokenizer
:
Optional
[
PreTrainedTokenizerBase
]
=
None
,
model_init
:
Callable
[[],
PreTrainedModel
]
=
None
,
model_init
:
Optional
[
Callable
[[],
PreTrainedModel
]
]
=
None
,
compute_metrics
:
Optional
[
Callable
[[
EvalPrediction
],
Dict
]]
=
None
,
compute_metrics
:
Optional
[
Callable
[[
EvalPrediction
],
Dict
]]
=
None
,
callbacks
:
Optional
[
List
[
TrainerCallback
]]
=
None
,
callbacks
:
Optional
[
List
[
TrainerCallback
]]
=
None
,
optimizers
:
Tuple
[
torch
.
optim
.
Optimizer
,
torch
.
optim
.
lr_scheduler
.
LambdaLR
]
=
(
None
,
None
),
optimizers
:
Tuple
[
torch
.
optim
.
Optimizer
,
torch
.
optim
.
lr_scheduler
.
LambdaLR
]
=
(
None
,
None
),
preprocess_logits_for_metrics
:
Callable
[[
torch
.
Tensor
,
torch
.
Tensor
],
torch
.
Tensor
]
=
None
,
preprocess_logits_for_metrics
:
Optional
[
Callable
[[
torch
.
Tensor
,
torch
.
Tensor
],
torch
.
Tensor
]
]
=
None
,
):
):
if
args
is
None
:
if
args
is
None
:
output_dir
=
"tmp_trainer"
output_dir
=
"tmp_trainer"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment