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
17efc806
Unverified
Commit
17efc806
authored
Dec 22, 2021
by
charon____
Committed by
GitHub
Dec 22, 2021
Browse files
IterableDatasetShard should use per device batch size instead of real batch size (#14714)
parent
2a56edb3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/transformers/trainer.py
src/transformers/trainer.py
+2
-2
No files found.
src/transformers/trainer.py
View file @
17efc806
...
...
@@ -653,7 +653,7 @@ class Trainer:
return
DataLoader
(
train_dataset
,
batch_size
=
self
.
args
.
train_batch_size
,
batch_size
=
self
.
args
.
per_device_
train_batch_size
,
collate_fn
=
self
.
data_collator
,
num_workers
=
self
.
args
.
dataloader_num_workers
,
pin_memory
=
self
.
args
.
dataloader_pin_memory
,
...
...
@@ -722,7 +722,7 @@ class Trainer:
if
self
.
args
.
world_size
>
1
:
eval_dataset
=
IterableDatasetShard
(
eval_dataset
,
batch_size
=
self
.
args
.
eval_batch_size
,
batch_size
=
self
.
args
.
per_device_
eval_batch_size
,
drop_last
=
self
.
args
.
dataloader_drop_last
,
num_processes
=
self
.
args
.
world_size
,
process_index
=
self
.
args
.
process_index
,
...
...
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