You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using distributed or parallel set-up in script?: distributed
Who can help
N/A, I have a fix upcoming 👍
Information
Model I am using (Bert, XLNet ...): Any model within examples/text-classification/run_glue.py that uses MNLI
The problem arises when using:
the official example scripts: (give details below)
my own modified scripts: (give details below)
The tasks I am working on is:
an official GLUE/SQUaD task: (MNLI)
my own task or dataset: (give details below)
Essentially, the issue is that in dfd16af for run_glue.py, {train|eval|test}_dataset was split out and preprocessed individually. However, this misses datasets["{validation|test}_mismatched"] which is appended to the {eval|test}_dataset only when MNLI is used.
To reproduce
Steps to reproduce the behavior:
Run the run_glue.py example on an MNLI dataset and include eval. The full command I'm using on a v2-8 TPU is:
Traceback (most recent call last):
File "/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 329, in _mp_start_fn
_start_fn(index, pf_cfg, fn, args)
File "/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch_xla/distributed/xla_multiprocessing.py", line 323, in _start_fn
fn(gindex, *args)
File "/transformers/examples/text-classification/run_glue.py", line 532, in _mp_fn
main()
File "/transformers/examples/text-classification/run_glue.py", line 493, in main
metrics = trainer.evaluate(eval_dataset=eval_dataset)
File "/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/transformers/trainer.py", line 1657, in evaluate
metric_key_prefix=metric_key_prefix,
File "/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/transformers/trainer.py", line 1788, in prediction_loop
loss, logits, labels = self.prediction_step(model, inputs, prediction_loss_only, ignore_keys=ignore_keys)
File "/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/transformers/trainer.py", line 1899, in prediction_step
loss, outputs = self.compute_loss(model, inputs, return_outputs=True)
File "/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/transformers/trainer.py", line 1458, in compute_loss
outputs = model(**inputs)
File "/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1015, in _call_impl
return forward_call(*input, **kwargs)
File "/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/transformers/models/distilbert/modeling_distilbert.py", line 625, in forward
return_dict=return_dict,
File "/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1015, in _call_impl
return forward_call(*input, **kwargs)
File "/root/anaconda3/envs/pytorch/lib/python3.6/site-packages/transformers/models/distilbert/modeling_distilbert.py", line 471, in forward
raise ValueError("You have to specify either input_ids or inputs_embeds")
ValueError: You have to specify either input_ids or inputs_embeds
Expected behavior
Dataset should be preprocessed for the entirety of the dataset.
Environment info
transformers
version: 4.4.0.dev0Who can help
N/A, I have a fix upcoming 👍
Information
Model I am using (Bert, XLNet ...): Any model within
examples/text-classification/run_glue.py
that uses MNLIThe problem arises when using:
The tasks I am working on is:
Essentially, the issue is that in dfd16af for
run_glue.py
,{train|eval|test}_dataset
was split out and preprocessed individually. However, this missesdatasets["{validation|test}_mismatched"]
which is appended to the{eval|test}_dataset
only when MNLI is used.To reproduce
Steps to reproduce the behavior:
run_glue.py
example on an MNLI dataset and include eval. The full command I'm using on a v2-8 TPU is:This results in:
Expected behavior
Dataset should be preprocessed for the entirety of the dataset.
Fix: #10621
The text was updated successfully, but these errors were encountered: