allenai / vila

Incorporating VIsual LAyout Structures for Scientific Text Classification
Apache License 2.0
173 stars 16 forks source link

Issue in using allenai/hvila-block-layoutlm-finetuned-grotoap2 as predictor weights #17

Closed NicholasMcElroy closed 2 years ago

NicholasMcElroy commented 2 years ago

Not exactly sure if this is the right place to put this, but something with the allenai/hvila-block-layoutlm-finetuned-grotoap2 weights is causing an infinite loop when trying to initialize the hierarchical predictor using them. I've been using them in my code regularly, so they should be cached locally, but this morning when I tried to use them the code loops infinitely and never resolves. The debug logging shows these two lines repeating infinitely:

DEBUG:filelock:Attempting to acquire lock 140599678945696 on /root/.cache/huggingface/transformers/1343fe6c08b2bb56339b33c7c7e87c4fa05a40da32e38c1fa6c820a33a98d510.559f19b9b7396dc0071cb58bb08226c45ba4272b820059191738466636b64468.lock
DEBUG:filelock:Lock 140599678945696 not acquired on /root/.cache/huggingface/transformers/1343fe6c08b2bb56339b33c7c7e87c4fa05a40da32e38c1fa6c820a33a98d510.559f19b9b7396dc0071cb58bb08226c45ba4272b820059191738466636b64468.lock, waiting 0.05 seconds ...

The other pretrained weights download and work fine, so I'm not sure if this is being caused by something with the weights repo on the Hugging Face website or something else entirely.

lolipopshock commented 2 years ago

Thank you for reporting this -- I think one easy solution is just delete the mentioned "locked" files directly, e.g.,:

 rm /root/.cache/huggingface/transformers/1343fe6c08b2bb56339b33c7c7e87c4fa05a40da32e38c1fa6c820a33a98d510.559f19b9b7396dc0071cb58bb08226c45ba4272b820059191738466636b64468.lock

And then HF should be able to "re-download" the files again.