- 3.55.0 (latest)
- 3.54.0
- 3.53.0
- 3.52.0
- 3.50.0
- 3.49.0
- 3.48.0
- 3.47.0
- 3.46.0
- 3.45.0
- 3.44.0
- 3.43.0
- 3.42.0
- 3.41.0
- 3.40.0
- 3.38.0
- 3.37.0
- 3.36.0
- 3.35.0
- 3.34.0
- 3.33.0
- 3.32.0
- 3.31.0
- 3.30.0
- 3.29.0
- 3.28.0
- 3.25.0
- 3.24.0
- 3.23.0
- 3.22.0
- 3.21.0
- 3.20.0
- 3.19.0
- 3.18.0
- 3.17.0
- 3.16.0
- 3.15.0
- 3.14.0
- 3.13.0
- 3.12.0
- 3.11.0
- 3.10.0
- 3.9.0
- 3.8.0
- 3.7.0
- 3.6.0
- 3.5.0
- 3.4.2
- 3.3.0
- 3.2.0
- 3.0.0
- 2.9.8
- 2.8.9
- 2.7.4
- 2.5.3
- 2.4.0
com.google.cloud.aiplatform.util
com.google.cloud.aiplatform.v1
A client to Vertex AI API
The interfaces provided are listed below, along with usage samples.
DatasetServiceClient
Service Description: The service that handles the CRUD of Vertex AI Dataset and its child resources.
Sample for DatasetServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
Dataset response = datasetServiceClient.getDataset(name);
}
EndpointServiceClient
Service Description: A service for managing Vertex AI's Endpoints.
Sample for EndpointServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
EndpointName name =
EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
Endpoint response = endpointServiceClient.getEndpoint(name);
}
FeaturestoreOnlineServingServiceClient
Service Description: A service for serving online feature values.
Sample for FeaturestoreOnlineServingServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeaturestoreOnlineServingServiceClient featurestoreOnlineServingServiceClient =
FeaturestoreOnlineServingServiceClient.create()) {
EntityTypeName entityType =
EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]");
ReadFeatureValuesResponse response =
featurestoreOnlineServingServiceClient.readFeatureValues(entityType);
}
FeaturestoreServiceClient
Service Description: The service that handles CRUD and List for resources for Featurestore.
Sample for FeaturestoreServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
FeaturestoreName name = FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]");
Featurestore response = featurestoreServiceClient.getFeaturestore(name);
}
IndexEndpointServiceClient
Service Description: A service for managing Vertex AI's IndexEndpoints.
Sample for IndexEndpointServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (IndexEndpointServiceClient indexEndpointServiceClient =
IndexEndpointServiceClient.create()) {
IndexEndpointName name = IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]");
IndexEndpoint response = indexEndpointServiceClient.getIndexEndpoint(name);
}
IndexServiceClient
Service Description: A service for creating and managing Vertex AI's Index resources.
Sample for IndexServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
IndexName name = IndexName.of("[PROJECT]", "[LOCATION]", "[INDEX]");
Index response = indexServiceClient.getIndex(name);
}
JobServiceClient
Service Description: A service for creating and managing Vertex AI's jobs.
Sample for JobServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
CustomJob customJob = CustomJob.newBuilder().build();
CustomJob response = jobServiceClient.createCustomJob(parent, customJob);
}
MatchServiceClient
Service Description: MatchService is a Google managed service for efficient vector similarity search at scale.
Sample for MatchServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MatchServiceClient matchServiceClient = MatchServiceClient.create()) {
FindNeighborsRequest request =
FindNeighborsRequest.newBuilder()
.setIndexEndpoint(
IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
.setDeployedIndexId("deployedIndexId-1101212953")
.addAllQueries(new ArrayList<FindNeighborsRequest.Query>())
.setReturnFullDatapoint(true)
.build();
FindNeighborsResponse response = matchServiceClient.findNeighbors(request);
}
MetadataServiceClient
Service Description: Service for reading and writing metadata entries.
Sample for MetadataServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
MetadataStoreName name = MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]");
MetadataStore response = metadataServiceClient.getMetadataStore(name);
}
MigrationServiceClient
Service Description: A service that migrates resources from automl.googleapis.com, datalabeling.googleapis.com and ml.googleapis.com to Vertex AI.
Sample for MigrationServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
Location response = migrationServiceClient.getLocation(request);
}
ModelServiceClient
Service Description: A service for managing Vertex AI's machine learning Models.
Sample for ModelServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
Model response = modelServiceClient.getModel(name);
}
PipelineServiceClient
Service Description: A service for creating and managing Vertex AI's pipelines. This includes
both TrainingPipeline
resources (used for AutoML and custom training) and PipelineJob
resources (used for Vertex AI Pipelines).
Sample for PipelineServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
TrainingPipeline trainingPipeline = TrainingPipeline.newBuilder().build();
TrainingPipeline response =
pipelineServiceClient.createTrainingPipeline(parent, trainingPipeline);
}
PredictionServiceClient
Service Description: A service for online predictions and explanations.
Sample for PredictionServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
EndpointName endpoint =
EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
List<Value> instances = new ArrayList<>();
Value parameters = Value.newBuilder().setBoolValue(true).build();
PredictResponse response = predictionServiceClient.predict(endpoint, instances, parameters);
}
SpecialistPoolServiceClient
Service Description: A service for creating and managing Customer SpecialistPools. When customers start Data Labeling jobs, they can reuse/create Specialist Pools to bring their own Specialists to label the data. Customers can add/remove Managers for the Specialist Pool on Cloud console, then Managers will get email notifications to manage Specialists and tasks on CrowdCompute console.
Sample for SpecialistPoolServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpecialistPoolServiceClient specialistPoolServiceClient =
SpecialistPoolServiceClient.create()) {
SpecialistPoolName name =
SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]");
SpecialistPool response = specialistPoolServiceClient.getSpecialistPool(name);
}
TensorboardServiceClient
Service Description: TensorboardService
Sample for TensorboardServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TensorboardName name = TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]");
Tensorboard response = tensorboardServiceClient.getTensorboard(name);
}
VizierServiceClient
Service Description: Vertex AI Vizier API.
Vertex AI Vizier is a service to solve blackbox optimization problems, such as tuning machine learning hyperparameters and searching over deep learning architectures.
Sample for VizierServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VizierServiceClient vizierServiceClient = VizierServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
Study study = Study.newBuilder().build();
Study response = vizierServiceClient.createStudy(parent, study);
}
com.google.cloud.aiplatform.v1.schema.predict.instance
com.google.cloud.aiplatform.v1.schema.predict.params
com.google.cloud.aiplatform.v1.schema.predict.prediction
com.google.cloud.aiplatform.v1.schema.trainingjob.definition
com.google.cloud.aiplatform.v1.stub
com.google.cloud.aiplatform.v1beta1
A client to Vertex AI API
The interfaces provided are listed below, along with usage samples.
DatasetServiceClient
Service Description: The service that handles the CRUD of Vertex AI Dataset and its child resources.
Sample for DatasetServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
Dataset response = datasetServiceClient.getDataset(name);
}
DeploymentResourcePoolServiceClient
Service Description: A service that manages the DeploymentResourcePool resource.
Sample for DeploymentResourcePoolServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
DeploymentResourcePoolServiceClient.create()) {
DeploymentResourcePoolName name =
DeploymentResourcePoolName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]");
DeploymentResourcePool response =
deploymentResourcePoolServiceClient.getDeploymentResourcePool(name);
}
EndpointServiceClient
Service Description: A service for managing Vertex AI's Endpoints.
Sample for EndpointServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
EndpointName name =
EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
Endpoint response = endpointServiceClient.getEndpoint(name);
}
FeaturestoreOnlineServingServiceClient
Service Description: A service for serving online feature values.
Sample for FeaturestoreOnlineServingServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeaturestoreOnlineServingServiceClient featurestoreOnlineServingServiceClient =
FeaturestoreOnlineServingServiceClient.create()) {
EntityTypeName entityType =
EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]");
ReadFeatureValuesResponse response =
featurestoreOnlineServingServiceClient.readFeatureValues(entityType);
}
FeaturestoreServiceClient
Service Description: The service that handles CRUD and List for resources for Featurestore.
Sample for FeaturestoreServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) {
FeaturestoreName name = FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]");
Featurestore response = featurestoreServiceClient.getFeaturestore(name);
}
IndexEndpointServiceClient
Service Description: A service for managing Vertex AI's IndexEndpoints.
Sample for IndexEndpointServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (IndexEndpointServiceClient indexEndpointServiceClient =
IndexEndpointServiceClient.create()) {
IndexEndpointName name = IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]");
IndexEndpoint response = indexEndpointServiceClient.getIndexEndpoint(name);
}
IndexServiceClient
Service Description: A service for creating and managing Vertex AI's Index resources.
Sample for IndexServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
IndexName name = IndexName.of("[PROJECT]", "[LOCATION]", "[INDEX]");
Index response = indexServiceClient.getIndex(name);
}
JobServiceClient
Service Description: A service for creating and managing Vertex AI's jobs.
Sample for JobServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
CustomJob customJob = CustomJob.newBuilder().build();
CustomJob response = jobServiceClient.createCustomJob(parent, customJob);
}
MatchServiceClient
Service Description: MatchService is a Google managed service for efficient vector similarity search at scale.
Sample for MatchServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MatchServiceClient matchServiceClient = MatchServiceClient.create()) {
FindNeighborsRequest request =
FindNeighborsRequest.newBuilder()
.setIndexEndpoint(
IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
.setDeployedIndexId("deployedIndexId-1101212953")
.addAllQueries(new ArrayList<FindNeighborsRequest.Query>())
.setReturnFullDatapoint(true)
.build();
FindNeighborsResponse response = matchServiceClient.findNeighbors(request);
}
MetadataServiceClient
Service Description: Service for reading and writing metadata entries.
Sample for MetadataServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
MetadataStoreName name = MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]");
MetadataStore response = metadataServiceClient.getMetadataStore(name);
}
MigrationServiceClient
Service Description: A service that migrates resources from automl.googleapis.com, datalabeling.googleapis.com and ml.googleapis.com to Vertex AI.
Sample for MigrationServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
Location response = migrationServiceClient.getLocation(request);
}
ModelGardenServiceClient
Service Description: The interface of Model Garden Service.
Sample for ModelGardenServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ModelGardenServiceClient modelGardenServiceClient = ModelGardenServiceClient.create()) {
PublisherModelName name = PublisherModelName.of("[PUBLISHER]", "[MODEL]");
PublisherModel response = modelGardenServiceClient.getPublisherModel(name);
}
ModelServiceClient
Service Description: A service for managing Vertex AI's machine learning Models.
Sample for ModelServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
Model response = modelServiceClient.getModel(name);
}
PipelineServiceClient
Service Description: A service for creating and managing Vertex AI's pipelines. This includes
both TrainingPipeline
resources (used for AutoML and custom training) and PipelineJob
resources (used for Vertex AI Pipelines).
Sample for PipelineServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
TrainingPipeline trainingPipeline = TrainingPipeline.newBuilder().build();
TrainingPipeline response =
pipelineServiceClient.createTrainingPipeline(parent, trainingPipeline);
}
PredictionServiceClient
Service Description: A service for online predictions and explanations.
Sample for PredictionServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
EndpointName endpoint =
EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
List<Value> instances = new ArrayList<>();
Value parameters = Value.newBuilder().setBoolValue(true).build();
PredictResponse response = predictionServiceClient.predict(endpoint, instances, parameters);
}
ScheduleServiceClient
Service Description: A service for creating and managing Vertex AI's Schedule resources to periodically launch shceudled runs to make API calls.
Sample for ScheduleServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ScheduleServiceClient scheduleServiceClient = ScheduleServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
Schedule schedule = Schedule.newBuilder().build();
Schedule response = scheduleServiceClient.createSchedule(parent, schedule);
}
SpecialistPoolServiceClient
Service Description: A service for creating and managing Customer SpecialistPools. When customers start Data Labeling jobs, they can reuse/create Specialist Pools to bring their own Specialists to label the data. Customers can add/remove Managers for the Specialist Pool on Cloud console, then Managers will get email notifications to manage Specialists and tasks on CrowdCompute console.
Sample for SpecialistPoolServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SpecialistPoolServiceClient specialistPoolServiceClient =
SpecialistPoolServiceClient.create()) {
SpecialistPoolName name =
SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]");
SpecialistPool response = specialistPoolServiceClient.getSpecialistPool(name);
}
TensorboardServiceClient
Service Description: TensorboardService
Sample for TensorboardServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TensorboardName name = TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]");
Tensorboard response = tensorboardServiceClient.getTensorboard(name);
}
VizierServiceClient
Service Description: Vertex AI Vizier API.
Vertex AI Vizier is a service to solve blackbox optimization problems, such as tuning machine learning hyperparameters and searching over deep learning architectures.
Sample for VizierServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VizierServiceClient vizierServiceClient = VizierServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
Study study = Study.newBuilder().build();
Study response = vizierServiceClient.createStudy(parent, study);
}