Managed Service for ClickHouse API, gRPC: MlModelService
A set of methods for managing machine learning models.
Call | Description |
---|---|
Get | Returns the specified machine learning model. |
List | Retrieves the list of machine learning models in the specified cluster. |
Create | Creates a machine learning model in the specified cluster. |
Update | Updates the specified machine learning model. |
Delete | Deletes the specified machine learning model. |
Calls MlModelService
Get
Returns the specified machine learning model.
To get the list of all available models, make a List request.
rpc Get (GetMlModelRequest) returns (MlModel)
GetMlModelRequest
Field | Description |
---|---|
cluster_id | string Required. ID of the cluster that the model belongs to. The maximum string length in characters is 50. |
ml_model_name | string Required. Name of the model to return. To get a model name make a MlModelService.List request. The maximum string length in characters is 63. Value must match the regular expression [a-zA-Z0-9_-]* . |
MlModel
Field | Description |
---|---|
name | string Name of the the model. |
cluster_id | string ID of the ClickHouse cluster that the model belongs to. |
type | enum MlModelType Type of the model.
|
uri | string Model file URL. You can only use models stored in Object Storage. |
List
Retrieves the list of machine learning models in the specified cluster.
rpc List (ListMlModelsRequest) returns (ListMlModelsResponse)
ListMlModelsRequest
Field | Description |
---|---|
cluster_id | string Required. ID of the cluster that models belongs to. The maximum string length in characters is 50. |
page_size | int64 The maximum number of results per page to return. If the number of available results is larger than page_size , the service returns a ListMlModelsResponse.next_page_token that can be used to get the next page of results in subsequent list requests. Default value: 100. The maximum value is 1000. |
page_token | string Page token. To get the next page of results, set page_token to the ListMlModelsResponse.next_page_token returned by the previous list request. The maximum string length in characters is 100. |
ListMlModelsResponse
Field | Description |
---|---|
ml_models[] | MlModel List of models in the specified cluster. |
next_page_token | string Token for getting the next page of the list. If the number of results is greater than the specified ListMlModelsRequest.page_size, use next_page_token as the value for the ListMlModelsRequest.page_token parameter in the next list request. Each subsequent page will have its own next_page_token to continue paging through the results. |
MlModel
Field | Description |
---|---|
name | string Name of the the model. |
cluster_id | string ID of the ClickHouse cluster that the model belongs to. |
type | enum MlModelType Type of the model.
|
uri | string Model file URL. You can only use models stored in Object Storage. |
Create
Creates a machine learning model in the specified cluster.
rpc Create (CreateMlModelRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:CreateMlModelMetadata
Operation.response:MlModel
CreateMlModelRequest
Field | Description |
---|---|
cluster_id | string Required. ID of the cluster to create a model in. To get a cluster ID make a ClusterService.List request. The maximum string length in characters is 50. |
ml_model_name | string Required. Model name. The model name is one of the arguments of the modelEvaluate() function, which is used to call the model in ClickHouse. The maximum string length in characters is 63. Value must match the regular expression [a-zA-Z0-9_-]* . |
type | enum MlModelType Required. Type of the model.
|
uri | string Required. Model file URL. You can only use models stored in Object Storage. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
CreateMlModelMetadata
Field | Description |
---|---|
cluster_id | string ID of the cluster that a model is being added to. |
ml_model_name | string Name of the the model that is being created. |
MlModel
Field | Description |
---|---|
name | string Name of the the model. |
cluster_id | string ID of the ClickHouse cluster that the model belongs to. |
type | enum MlModelType Type of the model.
|
uri | string Model file URL. You can only use models stored in Object Storage. |
Update
Updates the specified machine learning model.
rpc Update (UpdateMlModelRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:UpdateMlModelMetadata
Operation.response:MlModel
UpdateMlModelRequest
Field | Description |
---|---|
cluster_id | string Required. ID of the cluster to update the model in. To get a cluster ID make a ClusterService.List request. The maximum string length in characters is 50. |
ml_model_name | string Required. Name of the the model to update. The maximum string length in characters is 63. Value must match the regular expression [a-zA-Z0-9_-]* . |
update_mask | google.protobuf.FieldMask |
uri | string The new model file URL. You can only use models stored in Object Storage. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
UpdateMlModelMetadata
Field | Description |
---|---|
cluster_id | string ID of the cluster that contains the model being updated. |
ml_model_name | string Name of the the model that is being updated. |
MlModel
Field | Description |
---|---|
name | string Name of the the model. |
cluster_id | string ID of the ClickHouse cluster that the model belongs to. |
type | enum MlModelType Type of the model.
|
uri | string Model file URL. You can only use models stored in Object Storage. |
Delete
Deletes the specified machine learning model.
rpc Delete (DeleteMlModelRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:DeleteMlModelMetadata
Operation.response:google.protobuf.Empty
DeleteMlModelRequest
Field | Description |
---|---|
cluster_id | string Required. ID of the cluster to delete the model in. To get a cluster ID make a ClusterService.List request. The maximum string length in characters is 50. |
ml_model_name | string Required. Name of the the model to delete. The maximum string length in characters is 63. Value must match the regular expression [a-zA-Z0-9_-]* . |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
DeleteMlModelMetadata
Field | Description |
---|---|
cluster_id | string ID of the cluster that contains the model being deleted. |
ml_model_name | string Name of the the model that is being deleted. |