class ProjectsModelsVersions extends Resource (View source)

The "versions" collection of methods.

Typical usage is:

 $mlService = new Google\Service\CloudMachineLearningEngine(...);
 $versions = $mlService->projects_models_versions;

Methods

create(string $parent, GoogleCloudMlV1Version $postBody, array $optParams = [])

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.

delete(string $name, array $optParams = [])

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. (versions.delete)

get(string $name, array $optParams = [])

Gets information about a model version. Models can have multiple versions.

listProjectsModelsVersions(string $parent, array $optParams = [])

Gets basic information about all the versions of a model. If you expect that a model has many 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). If there are no versions that match the request parameters, the list request returns an empty response body: {}.

patch(string $name, GoogleCloudMlV1Version $postBody, array $optParams = [])

Updates the specified Version resource. Currently the only update-able fields are description, requestLoggingConfig, autoScaling.minNodes, and manualScaling.nodes. (versions.patch)

setDefault(string $name, GoogleCloudMlV1SetDefaultVersionRequest $postBody, array $optParams = [])

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. (versions.setDefault)

Details

GoogleLongrunningOperation create(string $parent, GoogleCloudMlV1Version $postBody, array $optParams = [])

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.

(versions.create)

Parameters

string $parent

Required. The name of the model.

GoogleCloudMlV1Version $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleLongrunningOperation delete(string $name, array $optParams = [])

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. (versions.delete)

Parameters

string $name

Required. The name of the version. You can get the names of all the versions of a model by calling projects.models.versions.list.

array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleCloudMlV1Version get(string $name, array $optParams = [])

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. (versions.get)

Parameters

string $name

Required. The name of the version.

array $optParams

Optional parameters.

Return Value

GoogleCloudMlV1Version

Exceptions

Exception

GoogleCloudMlV1ListVersionsResponse listProjectsModelsVersions(string $parent, array $optParams = [])

Gets basic information about all the versions of a model. If you expect that a model has many 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). If there are no versions that match the request parameters, the list request returns an empty response body: {}.

(versions.listProjectsModelsVersions)

Parameters

string $parent

Required. The name of the model for which to list the version.

array $optParams

Optional parameters.

Return Value

GoogleCloudMlV1ListVersionsResponse

Exceptions

Exception

GoogleLongrunningOperation patch(string $name, GoogleCloudMlV1Version $postBody, array $optParams = [])

Updates the specified Version resource. Currently the only update-able fields are description, requestLoggingConfig, autoScaling.minNodes, and manualScaling.nodes. (versions.patch)

Parameters

string $name

Required. The name of the model.

GoogleCloudMlV1Version $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleCloudMlV1Version setDefault(string $name, GoogleCloudMlV1SetDefaultVersionRequest $postBody, array $optParams = [])

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. (versions.setDefault)

Parameters

string $name

Required. The name of the version to make the default for the model. You can get the names of all the versions of a model by calling projects.models.versions.list.

GoogleCloudMlV1SetDefaultVersionRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudMlV1Version

Exceptions

Exception