Codalab submission issue with docker image
minstar opened this issue · 6 comments
Hi, I applied the docker image with robinjia/mrqa:0.1 to utilize as executing allennlp in python 3.6
However, I got some issue while submitting our trained model and baseline model.
we tried a below command at our server and codalab worksheet receives a below error..
- command :
cl run data_dir:mrqa-dev-data :predict_server.py :mrqa_official_eval.py :baseline "python3.6 baseline/serve.py baseline/MIX_6.tar.gz 8888 & python3.6 predict_server.py <(cat data_dir/*.jsonl) predictions.json 8888; for data_file in 'ls data_dir/*.jsonl
'; do base=$(echo ${data_file} | cut -d "/" -f2); python3.6 mrqa_official_eval.py ${data_file} predictions.json > eval${base::-1}; done" -n run-predictions --request-docker-image robinjia/mrqa:0.1 - error :
File "/usr/local/lib/python3.6/dist-packages/allennlp/modules/token_embedders/bert_token_embedder.py", line 135, in init
for param in model.parameters():
AttributeError: 'NoneType' object has no attribute 'parameters'
Thus, we tried with your baseline code and baseline BERT base pre-trained model. But it gives the same error. Can anyone help me to resolve this problem?..
Could you share the bundle ID that has the error, so I can look at the error logs?
This is the bundle ID and thank you for reply.
0xf3d5acb46db94a8ebf6b95b3c9634dec
I suspect there is a problem because your bundle does not have access to the network, so it cannot access BERT. You can set the PYTORCH_PRETRAINED_BERT_CACHE
environment variable, and upload to codalab a bundle that contains the contents of the cache created by the pytorch-pretrained-bert repo. You can see https://worksheets.codalab.org/bundles/0xce14503ba132410f937a9d582407ad0a for an example of how to do this (feel free to re-use our BERT cache bundle if you would like).
Thank you for giving us a solution and we're gonna try it this way!!
God Bless You!!!! Thank you very much..!!!!
Excuse me... @robinjia, may I ask one more favor?
I cannot understand why the command does not show the export of variable
for example) $(data_file) shows up as a blank
this is our bundle ID: 0xda80eeabcaff4640a55980d1aa59b442
We gave an input as below
cl run data_dir:mrqa-dev-data :predict_server.py :mrqa_official_eval.py :bert-cache :baseline "PYTORCH_PRETRAINED_BERT_CACHE=bert-cache python3.6 baseline/serve.py baseline/MIX_6.tar.gz 8888 & python3.6 predict_server.py <(cat data_dir/*.jsonl) predictions.json 8888; for data_file in 'ls data_dir/*.jsonl
'; do base=$(echo ${data_file} | cut -d "/" -f2); python3.6 mrqa_official_eval.py (${data_file}) predictions.json > eval(${base::-1}); done" -n run-predictions --request-docker-image robinjia/mrqa:0.1
However, it came out like this.
PYTORCH_PRETRAINED_BERT_CACHE=bert-cache python3.6 baseline/serve.py MIX_6.tar.gz 8888 & python3.6 predict_server.py <(cat data_dir/*.jsonl) predictions.json 8888; for data_file in data_dir/BioASQ.jsonl data_dir/DROP.jsonl data_dir/DuoRC.ParaphraseRC.jsonl data_dir/RACE.jsonl data_dir/RelationExtraction.jsonl data_dir/TextbookQA.jsonl; do base=; python3.6 mrqa_official_eval.py predictions.json > eval; done
the ${data_file} has gone...