error when evaluate CoNLL04
season1blue opened this issue · 2 comments
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
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.
Thanks for your comments. I have changed my code
ctx = mp.get_context()
(line 7 in config_reader.py)
and your method also works.