From 3e732378c5f521bd4bfbec47bfaeda9c63a701ec Mon Sep 17 00:00:00 2001 From: HR Wu <5631010+heiruwu@users.noreply.github.com> Date: Wed, 27 Mar 2024 01:45:27 +0800 Subject: [PATCH] chore(model): add message in watch endpoint (#289) Because - We'd like to provide more information to model state This commit - add message field in watch response --------- Co-authored-by: droplet-bot --- artifact/artifact/v1alpha/artifact.proto | 46 +++++++++---------- .../v1alpha/artifact_private_service.proto | 2 +- model/model/v1alpha/model.proto | 4 ++ openapiv2/model/service.swagger.yaml | 6 +++ 4 files changed, 34 insertions(+), 24 deletions(-) diff --git a/artifact/artifact/v1alpha/artifact.proto b/artifact/artifact/v1alpha/artifact.proto index f2b29db5..f442d8ed 100644 --- a/artifact/artifact/v1alpha/artifact.proto +++ b/artifact/artifact/v1alpha/artifact.proto @@ -35,39 +35,39 @@ message ReadinessResponse { /* -This API is under development and, therefore, some of its entitites and -entpoints are not implemented yet. This section aims to give context about the -current interface and how it fits in the Artifact vision. + This API is under development and, therefore, some of its entitites and + entpoints are not implemented yet. This section aims to give context about the + current interface and how it fits in the Artifact vision. -# Artifact + # Artifact -The Artifact domain is responsible of storing data that will later be used for -processing unstructured data. Artifact will support the following types of -data: + The Artifact domain is responsible of storing data that will later be used for + processing unstructured data. Artifact will support the following types of + data: -- Repositories -- Objects -- Vectors + - Repositories + - Objects + - Vectors -## Repositories + ## Repositories -An implementation of the [OCI Distribution Specification](https://github.com/opencontainers/distribution-spec?tab=readme-ov-file) -is used to manage versioned content. The main use for repositories is storing -container images that can be used to deploy AI models or VDP pipelines. + An implementation of the [OCI Distribution Specification](https://github.com/opencontainers/distribution-spec?tab=readme-ov-file) + is used to manage versioned content. The main use for repositories is storing + container images that can be used to deploy AI models or VDP pipelines. -The ID of a repository has 2 segments, the owner (an Instill user or -organization) and the content ID (the AI model or pipeline ID), e.g. -`curious-wombat/llava-34b`. + The ID of a repository has 2 segments, the owner (an Instill user or + organization) and the content ID (the AI model or pipeline ID), e.g. + `curious-wombat/llava-34b`. -## Objects + ## Objects -Raw data is stored in binary blobs. Object storage allows users to upload data -(e.g. images, audio) that can be used by pipelines or to store the results or a -pipeline trigger. + Raw data is stored in binary blobs. Object storage allows users to upload data + (e.g. images, audio) that can be used by pipelines or to store the results or a + pipeline trigger. -## Vectors + ## Vectors -Vector embeddings have their own storage, which allows fast retrieval and similarity search. + Vector embeddings have their own storage, which allows fast retrieval and similarity search. */ diff --git a/artifact/artifact/v1alpha/artifact_private_service.proto b/artifact/artifact/v1alpha/artifact_private_service.proto index d2c25349..dc2652e6 100644 --- a/artifact/artifact/v1alpha/artifact_private_service.proto +++ b/artifact/artifact/v1alpha/artifact_private_service.proto @@ -2,8 +2,8 @@ syntax = "proto3"; package artifact.artifact.v1alpha; -import "google/api/visibility.proto"; import "artifact/artifact/v1alpha/artifact.proto"; +import "google/api/visibility.proto"; // ArtifactPrivateService exposes the private endpoints that allow clients to // manage artifacts. diff --git a/model/model/v1alpha/model.proto b/model/model/v1alpha/model.proto index c2e29a7e..e19f4b9e 100644 --- a/model/model/v1alpha/model.proto +++ b/model/model/v1alpha/model.proto @@ -438,6 +438,8 @@ message WatchUserModelResponse { State state = 1; // Deprecated field `progress` reserved 2; + // Detail description of the state + string message = 3; } //////////////////////////////////// @@ -817,6 +819,8 @@ message WatchOrganizationModelResponse { State state = 1; // Deprecated field `progress` reserved 2; + // Detail description of the state + string message = 3; } // TriggerOrganizationModelRequest represents a request to trigger a model inference. diff --git a/openapiv2/model/service.swagger.yaml b/openapiv2/model/service.swagger.yaml index 27b1e24e..d644ddef 100644 --- a/openapiv2/model/service.swagger.yaml +++ b/openapiv2/model/service.swagger.yaml @@ -2915,6 +2915,9 @@ definitions: state: $ref: '#/definitions/modelv1alphaState' description: State. + message: + type: string + title: Detail description of the state description: WatchOrganizationModelResponse contains the state of a model. v1alphaWatchUserModelResponse: type: object @@ -2922,6 +2925,9 @@ definitions: state: $ref: '#/definitions/modelv1alphaState' description: State. + message: + type: string + title: Detail description of the state description: WatchUserModelResponse contains the state of a model. v1betaOrganization: type: object