Ignore paths that don't exist in probe for unit tests

This commit is contained in:
Brandon Rising
2024-10-02 14:16:23 -04:00
committed by Kent Keirsey
parent d328eaf743
commit 814be44cd7

View File

@@ -287,6 +287,12 @@ class ModelProbe(object):
pass
else:
raise e
except ValueError as e:
if f"The provided filename {model_path} does not exist" in str(e):
# This error is expected if the model_path does not exist (which is the case in some unit tests).
pass
else:
raise e
raise InvalidModelConfigException(f"Unable to determine model type for {model_path}")