Compare commits
2 Commits
f9f5fa41b6
...
e9d0a75dd5
| Author | SHA1 | Date | |
|---|---|---|---|
|
e9d0a75dd5
|
|||
|
6cf87e328f
|
@@ -12,6 +12,11 @@ name: build-prerelease
|
|||||||
# so they sort BELOW the eventual 0.1.16-1 stable release.
|
# so they sort BELOW the eventual 0.1.16-1 stable release.
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
# Auto-build on every push to main so the unstable channel tracks
|
||||||
|
# head without a manual dispatch step.
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
# Manual dispatch still available to build from a non-main ref.
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
ref:
|
ref:
|
||||||
@@ -20,7 +25,9 @@ on:
|
|||||||
default: ""
|
default: ""
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: prerelease-build
|
# Coalesce on branch+event so successive pushes don't pile up; the
|
||||||
|
# latest push wins.
|
||||||
|
group: prerelease-build-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -69,11 +69,22 @@ async fn load_model(
|
|||||||
let registry = state.registry.read().await;
|
let registry = state.registry.read().await;
|
||||||
match registry.load_model(&spec).await {
|
match registry.load_model(&spec).await {
|
||||||
Ok(()) => Json(json!({"status": "loaded"})).into_response(),
|
Ok(()) => Json(json!({"status": "loaded"})).into_response(),
|
||||||
Err(e) => (
|
Err(e) => {
|
||||||
|
// Log the full anyhow chain server-side so journalctl shows
|
||||||
|
// the underlying failure (hf-hub timeout, permission denied,
|
||||||
|
// disk full, etc.) without needing to inspect the HTTP
|
||||||
|
// response body separately.
|
||||||
|
tracing::warn!(
|
||||||
|
model = %spec.model_id,
|
||||||
|
error = %format!("{e:#}"),
|
||||||
|
"load_model failed"
|
||||||
|
);
|
||||||
|
(
|
||||||
StatusCode::BAD_REQUEST,
|
StatusCode::BAD_REQUEST,
|
||||||
Json(json!({"error": format!("{e:#}")})),
|
Json(json!({"error": format!("{e:#}")})),
|
||||||
)
|
)
|
||||||
.into_response(),
|
.into_response()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user