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?: Tried both 1 gpu and 2 gpus. Got the same result.
Additional env information from pip freeze:
tensorboardX==1.6
tensorflow==2.2.0 (I did not include tensorflow in this current conda environment, but do have that in the system, so I think pip reads from that. import tensorflow in a python script would cause ImportError, so tensorflow should be considered uninstalled here).
Model I am using (Bert, XLNet ...): bert-base-cased
The problem arises when using:
the official example scripts: (give details below)
my own modified scripts: (give details below; in steps to reproduce the situation)
The tasks I am working on is:
an official GLUE/SQUaD task: (give the name) MNLI
my own task or dataset: (give details below)
To reproduce
Steps to reproduce the behavior:
Copy the run_glue.py from cdc48ce (the newest version up till now).
Comment out the from transformers.trainer_utils import is_main_process line, and insert below (because this importing throws some exception. Pasting this code circumvents the problem):
def is_main_process(local_rank):
"""
Whether or not the current process is the local process,basedon`local_rank`.
"""
return local_rank in [-1, 0]
Traceback (most recent call last):
File "run_glue.py", line 421, in <module>
main()
File "run_glue.py", line 356, in main
model_path=model_args.model_name_or_path if os.path.isdir(model_args.model_name_or_path) else None
File "/h/zining/.conda/envs/myenv/lib/python3.6/site-packages/transformers/trainer.py", line 717, in train
self.control = self.callback_handler.on_train_begin(self.args, self.state, self.control)
File "/h/zining/.conda/envs/myenv/lib/python3.6/site-packages/transformers/trainer_callback.py", line 329, in on_train_begin
return self.call_event("on_train_begin", args, state, control)
File "/h/zining/.conda/envs/myenv/lib/python3.6/site-packages/transformers/trainer_callback.py", line 376, in call_event
**kwargs,
File "/h/zining/.conda/envs/myenv/lib/python3.6/site-packages/transformers/integrations.py", line 218, in on_train_begin
self.tb_writer.add_hparams(args.to_sanitized_dict(), metric_dict={})
AttributeError: 'SummaryWriter' object has no attribute 'add_hparams'
Expected behavior
I think running the run_glue.py will finetune on some GLUE tasks.
Note: Issue #4511 is similar, but was threw in trainer.py. My issue is thrown in trainer_callback.py. I think these two issues are caused by different reasons.
The text was updated successfully, but these errors were encountered:
Environment info
transformers
version: 3.4.0Additional env information from
pip freeze
:import tensorflow
in a python script would causeImportError
, so tensorflow should be considered uninstalled here).Who can help
@sgugger
Information
Model I am using (Bert, XLNet ...):
bert-base-cased
The problem arises when using:
The tasks I am working on is:
To reproduce
Steps to reproduce the behavior:
run_glue.py
from cdc48ce (the newest version up till now).from transformers.trainer_utils import is_main_process
line, and insert below (because this importing throws some exception. Pasting this code circumvents the problem):The error message is:
Expected behavior
I think running the
run_glue.py
will finetune on some GLUE tasks.Note: Issue #4511 is similar, but was threw in
trainer.py
. My issue is thrown intrainer_callback.py
. I think these two issues are caused by different reasons.The text was updated successfully, but these errors were encountered: