diff --git a/model/model/v1alpha/model.proto b/model/model/v1alpha/model.proto index ed3837f1..b6de9f37 100644 --- a/model/model/v1alpha/model.proto +++ b/model/model/v1alpha/model.proto @@ -134,6 +134,14 @@ message Model { VISIBILITY_PUBLIC = 2; } + // Statistic data + message Stats { + // Number of model runs. + int32 number_of_runs = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Last run time. + google.protobuf.Timestamp last_run_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + // The resource name of the model, which allows its access by owner and ID. // - Format: `users/{user.id}/models/{model.id}`. string name = 1 [ @@ -222,6 +230,8 @@ message Model { repeated string tags = 30 [(google.api.field_behavior) = OUTPUT_ONLY]; // Version names. repeated string versions = 31 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Statistic data. + Stats stats = 32 [(google.api.field_behavior) = OUTPUT_ONLY]; } // ListModelsRequest represents a request to list models. diff --git a/openapiv2/model/service.swagger.yaml b/openapiv2/model/service.swagger.yaml index d52056b4..b5ebc330 100644 --- a/openapiv2/model/service.swagger.yaml +++ b/openapiv2/model/service.swagger.yaml @@ -1248,6 +1248,11 @@ paths: type: string description: Version names. readOnly: true + stats: + description: Statistic data. + readOnly: true + allOf: + - $ref: '#/definitions/ModelStats' title: The model to update required: - id @@ -1986,6 +1991,11 @@ paths: type: string description: Version names. readOnly: true + stats: + description: Statistic data. + readOnly: true + allOf: + - $ref: '#/definitions/ModelStats' title: The model to update required: - id @@ -2734,6 +2744,20 @@ definitions: description: TriggerUserModelRequest represents a request to trigger a model inference. required: - taskInputs + ModelStats: + type: object + properties: + numberOfRuns: + type: integer + format: int32 + description: Number of model runs. + readOnly: true + lastRunTime: + type: string + format: date-time + description: Last run time. + readOnly: true + title: Statistic data googlelongrunningOperation: type: object properties: @@ -3817,6 +3841,11 @@ definitions: type: string description: Version names. readOnly: true + stats: + description: Statistic data. + readOnly: true + allOf: + - $ref: '#/definitions/ModelStats' 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