allenai / kb

KnowBert -- Knowledge Enhanced Contextual Word Representations
Apache License 2.0
371 stars 50 forks source link

allennlp fine-tune doesn't work on tacred dataset #20

Open yushengsu-thu opened 4 years ago

yushengsu-thu commented 4 years ago

OUTPUT_DIRECTORY=output_tacred DATA=training_config/downstream/tacred.jsonnet MODEL=knowbert_wiki_model

allennlp fine-tune --file-friendly-logging --include-package kb.include_all \ -m $MODEL \ -c $DATA \ -s $OUTPUT_DIRECTORY

======================================================= I have a question about fine-tuning knowBert-wiki on tacred (I tried above). I didn't modify any datas in OUTPUT_DIRECTORY, DATA, and MODEL(already been unzip). However, it always returns an error below: "/knowbert/lib/python3.6/site-packages/pytorch_pretrained_bert/modeling.py", line 592, in from_pretrained archive.extractall(tempdir)" . Should I modify something when I fine-tune knowBert-wiki?

matt-peters commented 4 years ago

We use allennlp train for training with the config files in github, and haven't tried to use allennlp fine-tune. Note that we are also using a fork of allennlp that has not been merged into the upstream repository, it's specified in requirements.txt.

xhay-p commented 3 years ago

@matt-peters, About the fork you mentioned, I am getting the following error, while trying to clone

Command "git clone -q git://github.com/matt-peters/allennlp.git /tmp/pip-4tlvzh0_-build" failed with error code 128 in None

gpiat commented 3 years ago

@akshayparakh25 Do you get this error when trying to install dependencies with pip install -r requirements.txt? I have the same issue on a specific machine. As far as I can tell, it's git not managing to connect to github for no apparent reason. I've spent a few hours trying to debug the issue and it seems to be linked to the versions of git (1.8.3.1) and/or g++ (4.8.5 20150623) that the machine is running. I haven't had any issues on machines running git >= 2.18.2 and g++ >= 8.3.1 20191121. I've contacted my sysadmin to perform the updates, I'll keep you posted. In the meantime, can you check your versions of git and g++ to see if that may be the source of the issue?

xhay-p commented 3 years ago

Yes, while installing from requirements.txt. Also, I updated the git and g++ versions. Now I am getting connection timed out error.

github.com[0: 13.234.176.102]: errno=Connection timed out

Command "git clone -q git://github.com/matt-peters/allennlp.git /tmp/pip-3myu79df-build" failed with error code 128 in None
gpiat commented 3 years ago

@akshayparakh25 OK, first of all can you tell us the exact versions of git and g++ that you're running with git --version and g++ --version? Second, can you ping github.com and ping 13.234.276.102? If you can't establish a connection in the first place, you have a network issue. If you don't have any ping problems, can you try installing allennlp without going through the requirements file? i.e. clone the repository, switch branches, and install as a package:

git clone https://github.com/matt-peters/allennlp.git
cd allennlp
git checkout fp16_e_s3
pip install -e .
cd ..

Once you've done that, remove the line that says git+git://github.com/blahblahblah in the kb/requirements.txt file, try running pip install -r requirements.txt again, and tell us how it all went.

xhay-p commented 3 years ago

@akshayparakh25 OK, first of all can you tell us the exact versions of git and g++ that you're running with git --version and g++ --version? Second, can you ping github.com and ping 13.234.276.102? If you can't establish a connection in the first place, you have a network issue. If you don't have any ping problems, can you try installing allennlp without going through the requirements file? i.e. clone the repository, switch branches, and install as a package:

git clone https://github.com/matt-peters/allennlp.git
cd allennlp
git checkout fp16_e_s3
pip install -e .
cd ..

Once you've done that, remove the line that says git+git://github.com/blahblahblah in the kb/requirements.txt file, try running pip install -r requirements.txt again, and tell us how it all went.

I do have network issues. Once I resolve, I will follow the guidelines and get back to you. Thanks for your help @gpiat.

xhay-p commented 3 years ago

@gpiat, Hi,

Thanks for all your help. I am able to complete the entire process.