Skip to content

Commit 070ef02

Browse files
committed
Fix warn/error messages on 2_Dense downloads
1 parent c9cddf2 commit 070ef02

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

backends/candle/src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -483,15 +483,13 @@ impl CandleBackend {
483483
let dense_config_str =
484484
std::fs::read_to_string(&dense_config_path).map_err(|err| {
485485
BackendError::Start(format!(
486-
"Unable to read `{}/config.json` file: {err:?}",
487-
dense_path.display()
486+
"Unable to read `{dense_path:?}/config.json` file: {err:?}",
488487
))
489488
})?;
490489
let dense_config: DenseConfig =
491490
serde_json::from_str(&dense_config_str).map_err(|err| {
492491
BackendError::Start(format!(
493-
"Unable to parse `{}/config.json`: {err:?}",
494-
dense_path.display()
492+
"Unable to parse `{dense_path:?}/config.json`: {err:?}",
495493
))
496494
})?;
497495

core/src/download.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ pub async fn download_artifacts(
4848
{
4949
// If dense config is there, try to download the model.safetensors first
5050
if let Err(err) = download_dense_safetensors(api, dense_path.as_deref()).await {
51-
tracing::warn!("Failed to download dense safetensors: {err}");
51+
tracing::warn!("Failed to download `{dense_path:?}/model.safetensors` file: {err}");
5252
// Fallback to pytorch_model.bin
5353
if let Err(err) = download_dense_pytorch_model(api, dense_path.as_deref()).await {
54-
tracing::warn!("Failed to download dense pytorch model: {err}");
54+
tracing::warn!("Failed to download `{dense_path:?}/pytorch_model.bin` file: {err}");
5555
}
5656
}
5757
}

0 commit comments

Comments
 (0)