[][src]Struct gcp_client::google::cloud::ml::v1::model_service_client::ModelServiceClient

pub struct ModelServiceClient<T> { /* fields omitted */ }

Provides methods that create and manage machine learning models and their versions.

A model in this context is a container for versions. The model can't provide predictions without first having a version created for it.

Each version is a trained machine learning model, and each is assumed to be an iteration of the same machine learning problem as the other versions of the same model.

Your project can define multiple models, each with multiple versions.

The basic life cycle of a model is:

  • Create and train the machine learning model and save it to a Google Cloud Storage location.
  • Use projects.models.create to make a new model in your project.
  • Use projects.models.versions.create to deploy your saved model.
  • Use [projects.predict](/ml/reference/rest/v1/projects/predict to request predictions of a version of your model, or use projects.jobs.create to start a batch prediction job.

Implementations

impl<T> ModelServiceClient<T> where
    T: GrpcService<BoxBody>,
    T::ResponseBody: Body + HttpBody + Send + 'static,
    T::Error: Into<StdError>,
    <T::ResponseBody as HttpBody>::Error: Into<StdError> + Send
[src]

pub fn new(inner: T) -> Self[src]

pub fn with_interceptor(inner: T, interceptor: impl Into<Interceptor>) -> Self[src]

pub async fn create_model<'_>(
    &'_ mut self,
    request: impl IntoRequest<CreateModelRequest>
) -> Result<Response<Model>, Status>
[src]

Creates a model which will later contain one or more versions.

You must add at least one version before you can request predictions from the model. Add versions by calling projects.models.versions.create.

pub async fn list_models<'_>(
    &'_ mut self,
    request: impl IntoRequest<ListModelsRequest>
) -> Result<Response<ListModelsResponse>, Status>
[src]

Lists the models in a project.

Each project can contain multiple models, and each model can have multiple versions.

pub async fn get_model<'_>(
    &'_ mut self,
    request: impl IntoRequest<GetModelRequest>
) -> Result<Response<Model>, Status>
[src]

Gets information about a model, including its name, the description (if set), and the default version (if at least one version of the model has been deployed).

pub async fn delete_model<'_>(
    &'_ mut self,
    request: impl IntoRequest<DeleteModelRequest>
) -> Result<Response<Operation>, Status>
[src]

Deletes a model.

You can only delete a model if there are no versions in it. You can delete versions by calling projects.models.versions.delete.

pub async fn create_version<'_>(
    &'_ mut self,
    request: impl IntoRequest<CreateVersionRequest>
) -> Result<Response<Operation>, Status>
[src]

Creates a new version of a model from a trained TensorFlow model.

If the version created in the cloud by this call is the first deployed version of the specified model, it will be made the default version of the model. When you add a version to a model that already has one or more versions, the default version does not automatically change. If you want a new version to be the default, you must call projects.models.versions.setDefault.

pub async fn list_versions<'_>(
    &'_ mut self,
    request: impl IntoRequest<ListVersionsRequest>
) -> Result<Response<ListVersionsResponse>, Status>
[src]

Gets basic information about all the versions of a model.

If you expect that a model has a lot of versions, or if you need to handle only a limited number of results at a time, you can request that the list be retrieved in batches (called pages):

pub async fn get_version<'_>(
    &'_ mut self,
    request: impl IntoRequest<GetVersionRequest>
) -> Result<Response<Version>, Status>
[src]

Gets information about a model version.

Models can have multiple versions. You can call projects.models.versions.list to get the same information that this method returns for all of the versions of a model.

pub async fn delete_version<'_>(
    &'_ mut self,
    request: impl IntoRequest<DeleteVersionRequest>
) -> Result<Response<Operation>, Status>
[src]

Deletes a model version.

Each model can have multiple versions deployed and in use at any given time. Use this method to remove a single version.

Note: You cannot delete the version that is set as the default version of the model unless it is the only remaining version.

pub async fn set_default_version<'_>(
    &'_ mut self,
    request: impl IntoRequest<SetDefaultVersionRequest>
) -> Result<Response<Version>, Status>
[src]

Designates a version to be the default for the model.

The default version is used for prediction requests made against the model that don't specify a version.

The first version to be created for a model is automatically set as the default. You must make any subsequent changes to the default version setting manually using this method.

Trait Implementations

impl<T: Clone> Clone for ModelServiceClient<T>[src]

impl<T> Debug for ModelServiceClient<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for ModelServiceClient<T>

impl<T> Send for ModelServiceClient<T> where
    T: Send

impl<T> Sync for ModelServiceClient<T> where
    T: Sync

impl<T> Unpin for ModelServiceClient<T> where
    T: Unpin

impl<T> !UnwindSafe for ModelServiceClient<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]