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
0085e712
"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "ba52dec47f870ab713317d3e61ba209bb5800783"
Unverified
Commit
0085e712
authored
Jul 08, 2021
by
Sylvain Gugger
Committed by
GitHub
Jul 08, 2021
Browse files
Don't stop at num_epochs when using IterableDataset (#12561)
parent
6f1adc43
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
src/transformers/trainer.py
src/transformers/trainer.py
+2
-1
No files found.
src/transformers/trainer.py
View file @
0085e712
...
@@ -1110,7 +1110,8 @@ class Trainer:
...
@@ -1110,7 +1110,8 @@ class Trainer:
else
:
else
:
# see __init__. max_steps is set when the dataset has no __len__
# see __init__. max_steps is set when the dataset has no __len__
max_steps
=
args
.
max_steps
max_steps
=
args
.
max_steps
num_train_epochs
=
int
(
args
.
num_train_epochs
)
# Setting a very large number of epochs so we go as many times as necessary over the iterator.
num_train_epochs
=
sys
.
maxsize
num_update_steps_per_epoch
=
max_steps
num_update_steps_per_epoch
=
max_steps
num_train_samples
=
args
.
max_steps
*
total_train_batch_size
num_train_samples
=
args
.
max_steps
*
total_train_batch_size
...
...
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