Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
fix: Launchers - HuggingFace - More fixes for the undocumented SCHEDULING Job status since the status comes after RUNNING
Browse files
huggingface_overlay/cloud_pipelines_backend/launchers/huggingface_launchers.py
CHANGED
|
@@ -360,7 +360,12 @@ class LaunchedHuggingFaceJobContainer(interfaces.LaunchedContainer):
|
|
| 360 |
return interfaces.ContainerStatus.FAILED
|
| 361 |
# HF uses the "SCHEDULING" status, but it's missing from the client library: https://github.com/huggingface/huggingface_hub/blame/50013bdfb6879fb49c94cc7ade5b8c10f59000c0/src/huggingface_hub/_jobs_api.py#L32
|
| 362 |
elif status_str == "SCHEDULING":
|
| 363 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 364 |
elif status_str == huggingface_hub.JobStage.DELETED:
|
| 365 |
return interfaces.ContainerStatus.ERROR
|
| 366 |
else:
|
|
|
|
| 360 |
return interfaces.ContainerStatus.FAILED
|
| 361 |
# HF uses the "SCHEDULING" status, but it's missing from the client library: https://github.com/huggingface/huggingface_hub/blame/50013bdfb6879fb49c94cc7ade5b8c10f59000c0/src/huggingface_hub/_jobs_api.py#L32
|
| 362 |
elif status_str == "SCHEDULING":
|
| 363 |
+
# Workaround for HuggingFace x Orchestrator issue:
|
| 364 |
+
# HuggingFace creates a Job in RUNNING state, but then switches it to SCHEDULING==PENDING, which the older version of the orchestrator does not permit.
|
| 365 |
+
# [INFO] cloud_pipelines_backend.orchestrator_sql: Container execution 019db8bca480118220d2 is now in state ContainerStatus.PENDING (was ContainerStatus.RUNNING).
|
| 366 |
+
# [ERROR] cloud_pipelines_backend.orchestrator_sql: Container execution 019db8bca480118220d2 is now in unexpected state ContainerStatus.PENDING. System error.
|
| 367 |
+
# return interfaces.ContainerStatus.PENDING
|
| 368 |
+
return interfaces.ContainerStatus.RUNNING
|
| 369 |
elif status_str == huggingface_hub.JobStage.DELETED:
|
| 370 |
return interfaces.ContainerStatus.ERROR
|
| 371 |
else:
|