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?: True
Who can help
I think @VictorSanh might help since it's about a minor bug in distillation.
Information
Model I am using (Bert, XLNet ...):
The problem arises when using:
the official example scripts: (give details below)
my own modified scripts: (give details below)
examples/research_projects/distillation
The tasks I am working on is:
[] an official GLUE/SQUaD task: (give the name)
my own task or dataset: (give details below)
It's not GLUE/SQUaD but official BookCorpus and Wikipedia datasets from datasets
To reproduce
Steps to reproduce the behavior:
Convert concatenation of bookcorpus and Wikipedia text from datasets to txt file.
Separate it with \n
Run scripts following A. Preparing the data
Traceback (most recent call last):
File "train.py", line 322, in <module>
main()
File "train.py", line 223, in main
init_gpu_params(args)
File "/volume/compression_and_distillation/transformers/examples/distillation/utils.py", line 55, in init_gpu_params
if params.n_gpu <= 0:
AttributeError: 'Namespace' object has no attribute 'n_gpu'
Traceback (most recent call last):
File "train.py", line 322, in <module>
main()
File "train.py", line 223, in main
init_gpu_params(args)
File "/volume/compression_and_distillation/transformers/examples/distillation/utils.py", line 55, in init_gpu_params
if params.n_gpu <= 0:
AttributeError: 'Namespace' object has no attribute 'n_gpu'
Traceback (most recent call last):
File "train.py", line 322, in <module>
main()
File "train.py", line 223, in main
init_gpu_params(args)
File "/volume/compression_and_distillation/transformers/examples/distillation/utils.py", line 55, in init_gpu_params
if params.n_gpu <= 0:
AttributeError: 'Namespace' object has no attribute 'n_gpu'
Traceback (most recent call last):
File "train.py", line 322, in <module>
main()
File "train.py", line 223, in main
init_gpu_params(args)
File "/volume/compression_and_distillation/transformers/examples/distillation/utils.py", line 55, in init_gpu_params
if params.n_gpu <= 0:
AttributeError: 'Namespace' object has no attribute 'n_gpu'
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/venv/distill/lib/python3.7/site-packages/torch/distributed/launch.py", line 261, in <module>
main()
File "/home/venv/distill/lib/python3.7/site-packages/torch/distributed/launch.py", line 257, in main
cmd=cmd)
Expected behavior
The error comes because of the inconsistency of variable name as n_gpu in the trainer.py script but gpus in parsing.
It can easily be solved changing gpus when parsing to n_gpu.
The text was updated successfully, but these errors were encountered:
Environment info
transformers
version: 4.5.1Who can help
I think @VictorSanh might help since it's about a minor bug in distillation.Information
Model I am using (Bert, XLNet ...):
The problem arises when using:
examples/research_projects/distillation
The tasks I am working on is:
It's not GLUE/SQUaD but official BookCorpus and Wikipedia datasets from
datasets
To reproduce
Steps to reproduce the behavior:
datasets
totxt
file.\n
Expected behavior
The error comes because of the inconsistency of variable name as
n_gpu
in the trainer.py script butgpus
in parsing.It can easily be solved changing
gpus
when parsing ton_gpu
.The text was updated successfully, but these errors were encountered: