Compare commits

...

2 Commits

Author SHA1 Message Date
Alex Cheema
9419715ef3 Merge branch 'main' into ciaran/handle-download-error 2026-02-06 16:33:28 -08:00
ciaranbor
dd02bd762d Handle config.json not found (image models) 2026-02-06 20:54:56 +00:00
2 changed files with 8 additions and 1 deletions

View File

@@ -457,6 +457,8 @@ async def download_file_with_retry(
)
except HuggingFaceAuthenticationError:
raise
except FileNotFoundError:
raise
except HuggingFaceRateLimitError as e:
if attempt == n_attempts - 1:
raise e

View File

@@ -386,7 +386,12 @@ class API:
if len(list(self.state.topology.list_nodes())) == 0:
return PlacementPreviewResponse(previews=[])
model_card = await ModelCard.load(model_id)
try:
model_card = await ModelCard.load(model_id)
except Exception as exc:
raise HTTPException(
status_code=400, detail=f"Failed to load model card: {exc}"
) from exc
instance_combinations: list[tuple[Sharding, InstanceMeta, int]] = []
for sharding in (Sharding.Pipeline, Sharding.Tensor):
for instance_meta in (InstanceMeta.MlxRing, InstanceMeta.MlxJaccl):