lavis-nlp / spert

PyTorch code for SpERT: Span-based Entity and Relation Transformer
MIT License
691 stars 148 forks source link

error when evaluate CoNLL04 #31

Closed season1blue closed 4 years ago

season1blue commented 4 years ago

when i run the code by using python ./spert.py eval --config configs/example_eval.conf

it shows:

Traceback (most recent call last): File "./spert.py", line 39, in _eval() File "./spert.py", line 28, in _eval process_configs(target=__eval, arg_parser=arg_parser) File "D:\season\MyCode\spert\config_reader.py", line 7, in process_configs ctx = mp.get_context('fork') File "D:\install\conda\envs\season\lib\multiprocessing\context.py", line 238, in get_context return super().get_context(method) File "D:\install\conda\envs\season\lib\multiprocessing\context.py", line 192, in get_context raise ValueError('cannot find context for %r' % method) from None ValueError: cannot find context for 'fork'

i have already download the datasets and model into /data

markus-eberts commented 4 years ago

You are probably on Windows, where 'fork' is not available. Please change 'fork' to 'spawn' (line 7 in config_reader.py) and check if that works for you.

season1blue commented 4 years ago

Thanks for your comments. I have changed my code ctx = mp.get_context() (line 7 in config_reader.py) and your method also works.