add message when cli train script throws exception (#5009)

* add message when cli train script throws exception

* fix formatting
This commit is contained in:
Sofie Van Landeghem 2020-02-15 15:50:17 +01:00 committed by GitHub
parent ff8e71f46d
commit a27c77ce62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -508,6 +508,8 @@ def train(
"score = {}".format(best_score, current_score)
)
break
except Exception as e:
msg.warn("Aborting and saving the final best model. Encountered exception: {}".format(e))
finally:
best_pipes = nlp.pipe_names
if disabled_pipes: