mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 01:16:28 +03:00
Fix spacy evaluate command on non-GPU
This commit is contained in:
parent
16ba6aa8a6
commit
f4c9a98166
|
@ -42,6 +42,7 @@ def evaluate(cmd, model, data_path, gpu_id=-1, gold_preproc=False,
|
||||||
Evaluate a model. To render a sample of parses in a HTML file, set an output
|
Evaluate a model. To render a sample of parses in a HTML file, set an output
|
||||||
directory as the displacy_path argument.
|
directory as the displacy_path argument.
|
||||||
"""
|
"""
|
||||||
|
if gpu_id >= 0:
|
||||||
util.use_gpu(gpu_id)
|
util.use_gpu(gpu_id)
|
||||||
util.set_env_log(False)
|
util.set_env_log(False)
|
||||||
data_path = util.ensure_path(data_path)
|
data_path = util.ensure_path(data_path)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user