Skip to content

Commit 1831c9c

Browse files
oandreeva-nvOlga Andreeva
andauthored
chore: Clarified docs, added more informative error prints (NVIDIA#342)
Co-authored-by: Olga Andreeva <oandreeva@oandreeva-mlt.client.nvidia.com>
1 parent ac863f3 commit 1831c9c

2 files changed

Lines changed: 41 additions & 11 deletions

File tree

docs/guides/dynamo_run.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,20 @@ apt install -y build-essential libhwloc-dev libudev-dev pkg-config libssl-dev li
8686
```
8787

8888
Libraries macOS:
89+
- [Homebrew](https://brew.sh/)
90+
```
91+
# if brew is not installed on your system, install it
92+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
93+
```
94+
- [Xcode](https://developer.apple.com/xcode/)
95+
8996
```
9097
brew install cmake protobuf
9198
92-
# install Xcode from App Store and check that Metal is accessible
99+
# Check that Metal is accessible
93100
xcrun -sdk macosx metal
94-
95-
# may have to install Xcode Command Line Tools:
96-
xcode-select --install
97101
```
102+
If Metal is accessible, you should see an error like `metal: error: no input files`, which confirms it is installed correctly.
98103

99104
Install Rust:
100105
```

launch/dynamo-run/src/lib.rs

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -129,20 +129,44 @@ pub async fn run(
129129
let (maybe_card_path, maybe_card) = match (&model_path, &flags.model_config) {
130130
// --model-config takes precedence
131131
(_, Some(model_config)) => {
132-
let card = ModelDeploymentCard::from_local_path(model_config, model_name.as_deref())
133-
.await
134-
.ok();
132+
let card =
133+
match ModelDeploymentCard::from_local_path(model_config, model_name.as_deref())
134+
.await
135+
{
136+
Ok(card) => Some(card),
137+
Err(e) => {
138+
tracing::error!(
139+
"Failed to load model card from config path {}: {}",
140+
model_config.display(),
141+
e
142+
);
143+
None
144+
}
145+
};
135146
(Some(model_config.clone()), card)
136147
}
137148
// If --model-path is an HF repo use that
138149
(Some(model_path), _) if model_path.is_dir() => {
139-
let card = ModelDeploymentCard::from_local_path(model_path, model_name.as_deref())
150+
let card = match ModelDeploymentCard::from_local_path(model_path, model_name.as_deref())
140151
.await
141-
.ok();
152+
{
153+
Ok(card) => Some(card),
154+
Err(e) => {
155+
tracing::error!(
156+
"Failed to load model card from model path {}: {}",
157+
model_path.display(),
158+
e
159+
);
160+
None
161+
}
162+
};
142163
(Some(model_path.clone()), card)
143164
}
144165
// Otherwise we don't have one, but we only need it if we're tokenizing
145-
_ => (None, None),
166+
_ => {
167+
tracing::debug!("No model card path provided (neither --model-config nor a directory in --model-path)");
168+
(None, None)
169+
}
146170
};
147171

148172
#[cfg(any(feature = "vllm", feature = "sglang"))]
@@ -261,7 +285,8 @@ pub async fn run(
261285
};
262286
let Some(card) = maybe_card.clone() else {
263287
anyhow::bail!(
264-
"out=vllm requires --model-path to be an HF repo, or for GGUF add flag --model-config <hf-repo>"
288+
"Failed to load model card: either unsupported HuggingFace repo format \
289+
or for GGUF files --model-config is missing."
265290
);
266291
};
267292
let Some(sock_prefix) = zmq_socket_prefix else {

0 commit comments

Comments
 (0)