Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Improve model architecture error message #348

Merged
merged 1 commit into from
Jul 3, 2023
Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion crates/llm-base/src/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,9 @@ pub enum LoadError {
/// There is insufficient information to guess the model architecture from the provided file.
///
/// A model architecture must be provided to load the model.
#[error("could not guess model architecture from {path:?}")]
#[error(
"could not guess model architecture from {path:?}. Please provide a model architecture."
)]
MissingModelArchitecture {
/// The path that failed.
path: PathBuf,
Expand Down
2 changes: 1 addition & 1 deletion crates/llm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ macro_rules! define_models {
)*

_ => Err(UnsupportedModelArchitecture(format!(
"{s} is not a supported model architecture"
"{s} is not one of supported model architectures: {:?}", ModelArchitecture::ALL
))),
}
}
Expand Down
Loading