fix: offline model retrieval, re-raise to disable instead of returning useless fallback (#22106)
Co-authored-by: ahxxm <1286225+ahxxm@users.noreply.github.com>
This commit is contained in:
1 parent
ff86283be0
commit
0b851cf55a
1 file changed
+2
@@ -1306,6 +1306,8 @@ def get_model_path(model: str, update_model: bool = False):
|
|||||||
return model_repo_path
|
return model_repo_path
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.exception(f"Cannot determine model snapshot path: {e}")
|
log.exception(f"Cannot determine model snapshot path: {e}")
|
||||||
|
if OFFLINE_MODE:
|
||||||
|
raise
|
||||||
return model
|
return model
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user