From 99c515cd3e003401e5ba92abf9a53ce1b21f8ffa Mon Sep 17 00:00:00 2001 From: HR Wu <5631010+heiruwu@users.noreply.github.com> Date: Thu, 12 Dec 2024 14:41:49 +0800 Subject: [PATCH] chore(model): update model hardware prop type (#536) Because - unify hardware prop type This commit - update model hardware prop type --------- Co-authored-by: droplet-bot --- model/model/v1alpha/model.proto | 8 +++++--- openapi/v2/service.swagger.yaml | 9 +++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/model/model/v1alpha/model.proto b/model/model/v1alpha/model.proto index f69d3da0..b79745c9 100644 --- a/model/model/v1alpha/model.proto +++ b/model/model/v1alpha/model.proto @@ -49,7 +49,7 @@ message ReadinessResponse { // Region describes the supported cloud provider and regions, with // their supported GPU respectively. message Region { - // Concate name of provider and region + // Concatenate name of provider and region string region_name = 1; // Hardware describes the available hardware types in this region repeated Hardware hardware = 2; @@ -200,8 +200,8 @@ message Model { (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE ]; - // Hardware of choice to serve the model. - string hardware = 19 [(google.api.field_behavior) = REQUIRED]; + // Deleted Fields. + reserved 19; // README holds the model documentation. optional string readme = 20 [(google.api.field_behavior) = OPTIONAL]; // A link to the source code of the model (e.g. to a GitHub repository). @@ -228,6 +228,8 @@ message Model { repeated string versions = 31 [(google.api.field_behavior) = OUTPUT_ONLY]; // Statistic data. Stats stats = 32 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Hardware of choice to serve the model. + Hardware hardware = 33 [(google.api.field_behavior) = REQUIRED]; } // ListModelsRequest represents a request to list models. diff --git a/openapi/v2/service.swagger.yaml b/openapi/v2/service.swagger.yaml index 580856c6..76abbe0a 100644 --- a/openapi/v2/service.swagger.yaml +++ b/openapi/v2/service.swagger.yaml @@ -8990,9 +8990,6 @@ definitions: region: type: string description: Region of choice for the particular provider to host the model. - hardware: - type: string - description: Hardware of choice to serve the model. readme: type: string description: README holds the model documentation. @@ -9038,6 +9035,10 @@ definitions: readOnly: true allOf: - $ref: '#/definitions/Model.Stats' + hardware: + description: Hardware of choice to serve the model. + allOf: + - $ref: '#/definitions/Hardware' title: |- Model represents an AI model, i.e. a program that performs tasks as decision making or or pattern recognition based on its training data @@ -9985,7 +9986,7 @@ definitions: properties: regionName: type: string - title: Concate name of provider and region + title: Concatenate name of provider and region hardware: type: array items: