Set model name to empty string if path override exists

Required for parse_package_meta, which composes path of data_path and
model_name (needs to be fixed in the future)
This commit is contained in:
ines 2017-04-16 22:15:51 +02:00
parent 97647c46cd
commit ad168ba88c

View File

@ -30,6 +30,7 @@ def load(name, **overrides):
else: else:
model_path = util.ensure_path(overrides['path']) model_path = util.ensure_path(overrides['path'])
data_path = model_path.parent data_path = model_path.parent
model_name = ''
meta = util.parse_package_meta(data_path, model_name, require=False) meta = util.parse_package_meta(data_path, model_name, require=False)
lang = meta['lang'] if meta and 'lang' in meta else name lang = meta['lang'] if meta and 'lang' in meta else name
cls = util.get_lang_class(lang) cls = util.get_lang_class(lang)