allenai / sequential_sentence_classification

https://arxiv.org/pdf/1909.04054
Apache License 2.0
77 stars 27 forks source link

jsonnet not loading even though installed #14

Open iperera opened 3 years ago

iperera commented 3 years ago

Running macOS Big Sur (11.2.3). I installed allennlp successfully with pip in my sys environment. The installed version is jsonnet-0.17.0. When I try to run the train script, I get this warning and then error:

WARNING - allennlp.common.params - _jsonnet not loaded, treating sequential_sentence_classification/config.jsonnet as json Traceback (most recent call last): File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "//sequential_sentence_classification/src/allennlp/allennlp/run.py", line 21, in run() File "//sequential_sentence_classification/src/allennlp/allennlp/run.py", line 18, in run main(prog="allennlp") File "//sequential_sentence_classification/src/allennlp/allennlp/commands/init.py", line 102, in main args.func(args) File "//sequential_sentence_classification/src/allennlp/allennlp/commands/train.py", line 124, in train_model_from_args args.cache_prefix) File "//sequential_sentence_classification/src/allennlp/allennlp/commands/train.py", line 162, in train_model_from_file params = Params.from_file(parameter_filename, overrides) File "//sequential_sentence_classification/src/allennlp/allennlp/common/params.py", line 477, in from_file file_dict = json.loads(evaluate_file(params_file, ext_vars=ext_vars)) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/init.py", line 348, in loads return _default_decoder.decode(s) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

iperera commented 3 years ago

Trying to import _jsonnet fails outside of this project too, so I think this might be an OS issue with jsonnet. I get this error when importing it: ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/_jsonnet.cpython-37m-darwin.so, 2): Symbol not found: __ZNSt8ios_base4InitD1Ev Referenced from: /opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/_jsonnet.cpython-37m-darwin.so Expected in: flat namespace in /opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/_jsonnet.cpython-37m-darwin.so

I'll leave it here in case you can provide guidance but feel free to close it if you don't intend to get a workaround (and I'll close it if I find a solution)