SmBop icon indicating copy to clipboard operation
SmBop copied to clipboard

lmdb.Error: cache/exp1000train: No such file or directory

Open fjakob opened this issue 1 year ago • 3 comments

I installed everything as described. When I try to run start_demo or the eval script, I get the error:

Traceback (most recent call last): File "eval.py", line 77, in main() File "eval.py", line 49, in main args.archive_path, cuda_device=args.gpu, overrides=overrides File "/mount/arbeitsdaten31/studenten1/aterima/.conda/envs/SmBop/lib/python3.6/site-packages/allennlp/predictors/predictor.py", line 362, in from_path load_archive(archive_path, cuda_device=cuda_device, overrides=overrides), File "/mount/arbeitsdaten31/studenten1/aterima/.conda/envs/SmBop/lib/python3.6/site-packages/allennlp/models/archival.py", line 205, in load_archive config.duplicate(), serialization_dir File "/mount/arbeitsdaten31/studenten1/aterima/.conda/envs/SmBop/lib/python3.6/site-packages/allennlp/models/archival.py", line 231, in _load_dataset_readers dataset_reader_params, serialization_dir=serialization_dir File "/mount/arbeitsdaten31/studenten1/aterima/.conda/envs/SmBop/lib/python3.6/site-packages/allennlp/common/from_params.py", line 593, in from_params **extras, File "/mount/arbeitsdaten31/studenten1/aterima/.conda/envs/SmBop/lib/python3.6/site-packages/allennlp/common/from_params.py", line 623, in from_params return constructor_to_call(**kwargs) # type: ignore File "/mount/arbeitsdaten31/studenten1/aterima/SmBop/smbop/dataset_readers/spider.py", line 69, in init self.cache = TensorCache(cache_directory) File "/mount/arbeitsdaten31/studenten1/aterima/SmBop/smbop/utils/cache.py", line 137, in init lock=use_lock, lmdb.Error: cache/exp1000train: No such file or directory

Do I have to run training first, although model weights are given?

fjakob avatar Jan 12 '24 14:01 fjakob

I also have another problem when trying to run exec.py directly:

If I install all requirements on Python 3.6, I run eventually into the error: contextlib doesn't have the attribure 'nullcontext()'

I read in a forum that migration to python 3.7 solves the issue. So I created another conda environment with python3.7 and installed all requirements. However, then transformers seems to be incompatible, as this error arises: packaging.version.InvalidVersion: Invalid version: '0.10.1,<0.11'

which is an incompatibility issue with the transformers package. How can I solve this?

fjakob avatar Jan 12 '24 16:01 fjakob

It's been a while since I've worked on this code and this error doesn't seem familiar.... You could think something in transformers>=4.1,<4.6 as that was the version that was supported with Allennlp 2.4. Let me know if you solve it.

OhadRubin avatar Jan 13 '24 04:01 OhadRubin

It is simply not possible anymore in Python 3.7 to install Allennlp 2.4 that does not conflict with any version of transformers in >=4.1,<4.6. The error persists. However, all requirements install without any problem in Python 3.6, but then many conflicts witht the code in general arises. I think the code has been written for python 3.7

fjakob avatar Jan 13 '24 17:01 fjakob