Get
Returns the specified machine learning model.
To get the list of all available models, make a List request.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const GetMlModelRequest =
cloudApi.mdb.clickhouse_ml_model_service.GetMlModelRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.MlModelServiceClient);
const result = await client.get(
GetMlModelRequest.fromPartial({
clusterId: "clusterId",
mlModelName: "mlModelName",
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.mdb.clickhouse.v1.ml_model_service_pb2 import GetMlModelRequest
from yandex.cloud.mdb.clickhouse.v1.ml_model_service_pb2_grpc import MlModelServiceStub
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(MlModelServiceStub)
response = service.Get(GetMlModelRequest(cluster_id="clusterId", ml_model_name="mlModelName"))
print(response)
GetMlModelRequest
clusterId
: string
ID of the cluster that the model belongs to.
mlModelName
: string
Name of the model to return.
To get a model name make a MlModelService.List request.
MlModel
name
: string
Name of the the model.
clusterId
: string
ID of the ClickHouse cluster that the model belongs to.
type
: MlModelType
Type of the model.
uri
: string
Model file URL. You can only use models stored in Object Storage.