Commit 1831c9cc authored by Olga Andreeva's avatar Olga Andreeva Committed by GitHub
Browse files

chore: Clarified docs, added more informative error prints (#342)


Co-authored-by: default avatarOlga Andreeva <oandreeva@oandreeva-mlt.client.nvidia.com>
parent ac863f32
...@@ -86,15 +86,20 @@ apt install -y build-essential libhwloc-dev libudev-dev pkg-config libssl-dev li ...@@ -86,15 +86,20 @@ apt install -y build-essential libhwloc-dev libudev-dev pkg-config libssl-dev li
``` ```
Libraries macOS: Libraries macOS:
- [Homebrew](https://brew.sh/)
```
# if brew is not installed on your system, install it
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```
- [Xcode](https://developer.apple.com/xcode/)
``` ```
brew install cmake protobuf brew install cmake protobuf
# install Xcode from App Store and check that Metal is accessible # Check that Metal is accessible
xcrun -sdk macosx metal xcrun -sdk macosx metal
# may have to install Xcode Command Line Tools:
xcode-select --install
``` ```
If Metal is accessible, you should see an error like `metal: error: no input files`, which confirms it is installed correctly.
Install Rust: Install Rust:
``` ```
......
...@@ -129,20 +129,44 @@ pub async fn run( ...@@ -129,20 +129,44 @@ pub async fn run(
let (maybe_card_path, maybe_card) = match (&model_path, &flags.model_config) { let (maybe_card_path, maybe_card) = match (&model_path, &flags.model_config) {
// --model-config takes precedence // --model-config takes precedence
(_, Some(model_config)) => { (_, Some(model_config)) => {
let card = ModelDeploymentCard::from_local_path(model_config, model_name.as_deref()) let card =
.await match ModelDeploymentCard::from_local_path(model_config, model_name.as_deref())
.ok(); .await
{
Ok(card) => Some(card),
Err(e) => {
tracing::error!(
"Failed to load model card from config path {}: {}",
model_config.display(),
e
);
None
}
};
(Some(model_config.clone()), card) (Some(model_config.clone()), card)
} }
// If --model-path is an HF repo use that // If --model-path is an HF repo use that
(Some(model_path), _) if model_path.is_dir() => { (Some(model_path), _) if model_path.is_dir() => {
let card = ModelDeploymentCard::from_local_path(model_path, model_name.as_deref()) let card = match ModelDeploymentCard::from_local_path(model_path, model_name.as_deref())
.await .await
.ok(); {
Ok(card) => Some(card),
Err(e) => {
tracing::error!(
"Failed to load model card from model path {}: {}",
model_path.display(),
e
);
None
}
};
(Some(model_path.clone()), card) (Some(model_path.clone()), card)
} }
// Otherwise we don't have one, but we only need it if we're tokenizing // Otherwise we don't have one, but we only need it if we're tokenizing
_ => (None, None), _ => {
tracing::debug!("No model card path provided (neither --model-config nor a directory in --model-path)");
(None, None)
}
}; };
#[cfg(any(feature = "vllm", feature = "sglang"))] #[cfg(any(feature = "vllm", feature = "sglang"))]
...@@ -261,7 +285,8 @@ pub async fn run( ...@@ -261,7 +285,8 @@ pub async fn run(
}; };
let Some(card) = maybe_card.clone() else { let Some(card) = maybe_card.clone() else {
anyhow::bail!( anyhow::bail!(
"out=vllm requires --model-path to be an HF repo, or for GGUF add flag --model-config <hf-repo>" "Failed to load model card: either unsupported HuggingFace repo format \
or for GGUF files --model-config is missing."
); );
}; };
let Some(sock_prefix) = zmq_socket_prefix else { let Some(sock_prefix) = zmq_socket_prefix else {
......
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