Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message for when an LLM base model can't be loaded. #3675

Merged
merged 2 commits into from
Sep 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions ludwig/schema/llms/base_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ def validate(model_name: str):
return model_name
except OSError:
raise ConfigValidationError(
f"Specified base model `{model_name}` is not a valid pretrained CausalLM listed on huggingface "
"or a valid local directory containing the weights for a pretrained CausalLM from huggingface."
"Please see: https://huggingface.co/models?pipeline_tag=text-generation&sort=downloads"
f"Specified base model `{model_name}` could not be loaded. If this is a private repository, make "
f"sure to set HUGGING_FACE_HUB_TOKEN in your environment. Check that {model_name} is a valid "
"pretrained CausalLM listed on huggingface or a valid local directory containing the weights for a "
"pretrained CausalLM from huggingface. See: "
"https://huggingface.co/models?pipeline_tag=text-generation&sort=downloads for a full list."
)
raise ValidationError(
f"`base_model` should be a string, instead given: {model_name}. This can be a preset or any pretrained "
Expand Down