Struct gapi_grpc::google::cloud::ml::v1::model_service_client::ModelServiceClient [−][src]
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 ModelServiceClient<Channel>
[src]
pub async fn connect<D>(dst: D) -> Result<Self, Error> where
D: TryInto<Endpoint>,
D::Error: Into<StdError>,
[src]
D: TryInto<Endpoint>,
D::Error: Into<StdError>,
Attempt to create a new client by connecting to a given endpoint.
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]
T: GrpcService<BoxBody>,
T::ResponseBody: Body + HttpBody + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as HttpBody>::Error: Into<StdError> + Send,
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]
&mut self,
request: impl IntoRequest<CreateModelRequest>
) -> Result<Response<Model>, Status>
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]
&mut self,
request: impl IntoRequest<ListModelsRequest>
) -> Result<Response<ListModelsResponse>, Status>
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]
&mut self,
request: impl IntoRequest<GetModelRequest>
) -> Result<Response<Model>, Status>
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]
&mut self,
request: impl IntoRequest<DeleteModelRequest>
) -> Result<Response<Operation>, Status>
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]
&mut self,
request: impl IntoRequest<CreateVersionRequest>
) -> Result<Response<Operation>, Status>
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]
&mut self,
request: impl IntoRequest<ListVersionsRequest>
) -> Result<Response<ListVersionsResponse>, Status>
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]
&mut self,
request: impl IntoRequest<GetVersionRequest>
) -> Result<Response<Version>, Status>
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]
&mut self,
request: impl IntoRequest<DeleteVersionRequest>
) -> Result<Response<Operation>, Status>
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]
&mut self,
request: impl IntoRequest<SetDefaultVersionRequest>
) -> Result<Response<Version>, Status>
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]
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[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,
T: Send,
impl<T> Sync for ModelServiceClient<T> where
T: Sync,
T: Sync,
impl<T> Unpin for ModelServiceClient<T> where
T: Unpin,
T: Unpin,
impl<T> !UnwindSafe for ModelServiceClient<T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoRequest<T> for T
[src]
pub fn into_request(self) -> Request<T>
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,