Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions nucleus/deploy/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ def create_model_endpoint(
elif gpus > 0 and gpu_type is None:
raise ValueError("If nonzero gpus, must provide gpu_type")
resp = self.connection.post(payload, ENDPOINT_PATH)
endpoint_creation_task_id = resp[
"endpoint_id"
] # Serverside needs updating
endpoint_creation_task_id = resp.get(
"endpoint_creation_task_id", None
) # TODO probably throw on None
logger.info(
"Endpoint creation task id is %s", endpoint_creation_task_id
)
Expand All @@ -194,7 +194,7 @@ def list_model_bundles(self) -> List[ModelBundle]:
"""
resp = self.connection.get("model_bundle")
model_bundles = [
ModelBundle(name=item["bundle_name"]) for item in resp
ModelBundle(name=item["bundle_name"]) for item in resp["bundles"]
]
return model_bundles

Expand All @@ -209,7 +209,7 @@ def list_model_endpoints(self) -> List[AsyncModelEndpoint]:
resp = self.connection.get(ENDPOINT_PATH)
return [
AsyncModelEndpoint(endpoint_id=endpoint_id, client=self)
for endpoint_id in resp
for endpoint_id in resp["endpoints"]
]

def sync_request(self, endpoint_id: str, url: str) -> str:
Expand Down