Fixed missing vec_path declaration that was failing if 'add_vectors' was set

Added vec_path variable declaration to avoid accessing it before assignment in case 'add_vectors' is in overrides.
This commit is contained in:
JM 2016-12-20 18:21:05 +01:00 committed by GitHub
parent 9a0748b12d
commit 70ff0639b5
1 changed files with 1 additions and 0 deletions

View File

@ -44,6 +44,7 @@ def _fix_deprecated_glove_vectors_loading(overrides):
else:
path = overrides['path']
data_path = path.parent
vec_path = None
if 'add_vectors' not in overrides:
if 'vectors' in overrides:
vec_path = match_best_version(overrides['vectors'], None, data_path)