We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
model_files
1 parent 855dc50 commit 297944aCopy full SHA for 297944a
backends/src/lib.rs
@@ -338,11 +338,16 @@ async fn init_backend(
338
{
339
if let Some(api_repo) = api_repo.as_ref() {
340
let start = std::time::Instant::now();
341
- match download_onnx(api_repo).await {
342
- Ok(_) => {
+ let model_files = download_onnx(api_repo)
+ .await
343
+ .map_err(|err| BackendError::WeightsNotFound(err.to_string()))?;
344
+ match model_files.is_empty() {
345
+ true => {
346
+ tracing::error!("Model ONNX files not found in the repository")
347
+ }
348
+ false => {
349
tracing::info!("Model ONNX weights downloaded in {:?}", start.elapsed())
350
}
- Err(err) => BackendError::WeightsNotFound(err.to_string()),
351
352
353
0 commit comments