Skip to content

Commit

Permalink
Merge branch 'main' into fix/purge-user-after-deleting-all-user-refer…
Browse files Browse the repository at this point in the history
…ences
  • Loading branch information
fregataa committed Jul 4, 2024
2 parents f320d36 + dd19d5b commit b7eb52c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions changes/2371.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix mismatches between responses of `/services/_runtimes` and new model service creation input
2 changes: 1 addition & 1 deletion src/ai/backend/manager/api/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@ class RuntimeInfoModel(BaseModel):
async def list_supported_runtimes(request: web.Request) -> RuntimeInfoModel:
return RuntimeInfoModel(
runtimes=[
RuntimeInfo(name=v.name, human_readable_name=MODEL_SERVICE_RUNTIME_PROFILES[v].name)
RuntimeInfo(name=v.value, human_readable_name=MODEL_SERVICE_RUNTIME_PROFILES[v].name)
for v in RuntimeVariant
]
)
Expand Down
4 changes: 2 additions & 2 deletions src/ai/backend/manager/models/endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ class RuntimeVariantInfo(graphene.ObjectType):

@classmethod
def from_enum(cls, enum: RuntimeVariant) -> "RuntimeVariantInfo":
return cls(name=enum.name, human_readable_name=MODEL_SERVICE_RUNTIME_PROFILES[enum].name)
return cls(name=enum.value, human_readable_name=MODEL_SERVICE_RUNTIME_PROFILES[enum].name)


class Endpoint(graphene.ObjectType):
Expand Down Expand Up @@ -1107,7 +1107,7 @@ async def _do_mutate() -> ModifyEndpoint:

if (_newval := props.runtime_variant) and _newval is not Undefined:
try:
endpoint_row.runtime_variant = RuntimeVariant[_newval]
endpoint_row.runtime_variant = RuntimeVariant(_newval)
except KeyError:
raise InvalidAPIParameters(f"Unsupported runtime {_newval}")

Expand Down

0 comments on commit b7eb52c

Please sign in to comment.