Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
chore: Launchers - HuggingFace - Improved logging when unknown HF Job status is encountered
Browse files
huggingface_overlay/cloud_pipelines_backend/launchers/huggingface_launchers.py
CHANGED
|
@@ -361,7 +361,10 @@ class LaunchedHuggingFaceJobContainer(interfaces.LaunchedContainer):
|
|
| 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 |
return interfaces.ContainerStatus.PENDING
|
| 364 |
-
|
|
|
|
|
|
|
|
|
|
| 365 |
return interfaces.ContainerStatus.ERROR
|
| 366 |
|
| 367 |
@property
|
|
|
|
| 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 |
return interfaces.ContainerStatus.PENDING
|
| 364 |
+
elif status_str == huggingface_hub.JobStage.DELETED:
|
| 365 |
+
return interfaces.ContainerStatus.ERROR
|
| 366 |
+
else:
|
| 367 |
+
_logger.error(f"Unexpected HF Job status: {self._job.status}")
|
| 368 |
return interfaces.ContainerStatus.ERROR
|
| 369 |
|
| 370 |
@property
|