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
45634f87
"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "f1cc6157210abd9ea953da097fb704a1dd778638"
Commit
45634f87
authored
Jan 08, 2020
by
Victor SANH
Committed by
Lysandre Debut
Jan 10, 2020
Browse files
fix Sampler in distributed training - evaluation
parent
af1ee9e6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/distillation/run_squad_w_distillation.py
examples/distillation/run_squad_w_distillation.py
+1
-1
No files found.
examples/distillation/run_squad_w_distillation.py
View file @
45634f87
...
@@ -264,7 +264,7 @@ def evaluate(args, model, tokenizer, prefix=""):
...
@@ -264,7 +264,7 @@ def evaluate(args, model, tokenizer, prefix=""):
args
.
eval_batch_size
=
args
.
per_gpu_eval_batch_size
*
max
(
1
,
args
.
n_gpu
)
args
.
eval_batch_size
=
args
.
per_gpu_eval_batch_size
*
max
(
1
,
args
.
n_gpu
)
# Note that DistributedSampler samples randomly
# Note that DistributedSampler samples randomly
eval_sampler
=
SequentialSampler
(
dataset
)
if
args
.
local_rank
==
-
1
else
DistributedSampler
(
dataset
)
eval_sampler
=
SequentialSampler
(
dataset
)
eval_dataloader
=
DataLoader
(
dataset
,
sampler
=
eval_sampler
,
batch_size
=
args
.
eval_batch_size
)
eval_dataloader
=
DataLoader
(
dataset
,
sampler
=
eval_sampler
,
batch_size
=
args
.
eval_batch_size
)
# Eval!
# Eval!
...
...
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