Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the reason of "Couldn't load models with roBERTa" #3

Closed
ADaBenxiong opened this issue Feb 3, 2021 · 5 comments
Closed

What is the reason of "Couldn't load models with roBERTa" #3

ADaBenxiong opened this issue Feb 3, 2021 · 5 comments

Comments

@ADaBenxiong
Copy link

No matter what python file I run, it will point out a warnning "Couldn't load models with roBERTa", and then it will make a error.

@SparkJiao
Copy link
Owner

SparkJiao commented Feb 3, 2021

Hi, the problem is caused by that you havn't install the transformers==2.1.0 repository. The warning is raised at here

You can install the transformers repository and the warning will be resolved. Or you can just ignore it if you do not run the roberta-based models.

@SparkJiao
Copy link
Owner

Feel free the re-open the question if you have any further questions.

@ADaBenxiong
Copy link
Author

Thanks for your reply. In the process of running your paper, it produces a assert error, what is the reason of this, thanks a lot

Traceback (most recent call last):
File "../../main_0.6.2.py", line 543, in
main()
File "../../main_0.6.2.py", line 362, in main
loss = model(**inputs)['loss']
File "/opt/conda/envs/mrc-jc/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/opt/conda/envs/mrc-jc/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 152, in forward
outputs = self.parallel_apply(replicas, inputs, kwargs)
File "/opt/conda/envs/mrc-jc/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 162, in parallel_apply
return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)])
File "/opt/conda/envs/mrc-jc/lib/python3.6/site-packages/torch/nn/parallel/parallel_apply.py", line 83, in parallel_apply
raise output
File "/opt/conda/envs/mrc-jc/lib/python3.6/site-packages/torch/nn/parallel/parallel_apply.py", line 59, in _worker
output = module(*input, **kwargs)
File "/opt/conda/envs/mrc-jc/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/workspace/code_python/Self-Training-MRC/bert_model/bert_hierarchical.py", line 52, in forward
layers.split_doc_sen_que(sequence_output, token_type_ids, attention_mask, sentence_span_list)
File "/workspace/code_python/Self-Training-MRC/bert_model/layers.py", line 463, in split_doc_sen_que
assert sen_start >= que_len
AssertionError
Traceback (most recent call last):
File "coqa_scratch_lr_test2.py", line 91, in
run_cmd(cmd)
File "coqa_scratch_lr_test2.py", line 21, in run_cmd
subprocess.check_call(command, shell=True)
File "/opt/conda/envs/mrc-jc/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)

@SparkJiao SparkJiao reopened this Feb 3, 2021
@SparkJiao
Copy link
Owner

Please don't use multiple GPUs. Our model only supports running on single GPU.

@ADaBenxiong
Copy link
Author

OK, I used three GPUs before because of memory, now I will try again. Thank you for your reply

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants