Skip to content

Commit 5898dc3

Browse files
committed
Add support for RUNNING_APP_STARTING stage and fix import
Fixed two critical issues discovered in deployment logs: 1. **Added RUNNING_APP_STARTING stage support**: HuggingFace introduced a new intermediate stage "RUNNING_APP_STARTING" that occurs when the container is running but the application inside is still starting up. Map this to PENDING status since the health endpoint isn't ready yet. 2. **Fixed DeploymentDefaultEndpoints import**: Corrected import path from `zenml.enums` to `zenml.config.deployment_settings` to fix ImportError that was preventing health checks from running. These fixes allow deployments to properly transition through all HuggingFace Space stages and reach RUNNING status once the app is fully started.
1 parent ff67b36 commit 5898dc3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/zenml/integrations/huggingface/deployers/huggingface_deployer.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,7 @@ def do_get_deployment_state(
529529
elif runtime.stage in [
530530
SpaceStage.BUILDING.value,
531531
SpaceStage.RUNNING_BUILDING.value,
532+
"RUNNING_APP_STARTING", # New HF stage: app is starting
532533
]:
533534
status = DeploymentStatus.PENDING
534535
# Error states - deployment failed or misconfigured
@@ -600,7 +601,9 @@ def _check_deployment_health(
600601
"""
601602
import requests
602603

603-
from zenml.enums import DeploymentDefaultEndpoints
604+
from zenml.config.deployment_settings import (
605+
DeploymentDefaultEndpoints,
606+
)
604607

605608
assert deployment.snapshot, "Deployment snapshot not found"
606609

0 commit comments

Comments
 (0)