Unverified Commit 9420a1fc authored by Michael Goin's avatar Michael Goin Committed by GitHub
Browse files

Better error message for missing mistral params.json (#17132)


Signed-off-by: default avatarmgoin <mgoin64@gmail.com>
parent 583e9009
...@@ -650,6 +650,11 @@ def load_params_config(model: Union[str, Path], revision: Optional[str], ...@@ -650,6 +650,11 @@ def load_params_config(model: Union[str, Path], revision: Optional[str],
config_file_name = "params.json" config_file_name = "params.json"
config_dict = get_hf_file_to_dict(config_file_name, model, revision) config_dict = get_hf_file_to_dict(config_file_name, model, revision)
if config_dict is None:
raise ValueError(
f"Failed to load mistral '{config_file_name}' config for model "
f"{model}. Please check if the model is a mistral-format model "
f"and if the config file exists.")
assert isinstance(config_dict, dict) assert isinstance(config_dict, dict)
config_mapping = { config_mapping = {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment