Search in sources :

Example 1 with HyperparameterTuningJobName

use of com.google.cloud.aiplatform.v1.HyperparameterTuningJobName in project java-aiplatform by googleapis.

the class GetHyperparameterTuningJobSample method getHyperparameterTuningJobSample.

static void getHyperparameterTuningJobSample(String project, String hyperparameterTuningJobId) throws IOException {
    JobServiceSettings settings = JobServiceSettings.newBuilder().setEndpoint("us-central1-aiplatform.googleapis.com:443").build();
    String location = "us-central1";
    // the "close" method on the client to safely clean up any remaining background resources.
    try (JobServiceClient client = JobServiceClient.create(settings)) {
        HyperparameterTuningJobName name = HyperparameterTuningJobName.of(project, location, hyperparameterTuningJobId);
        HyperparameterTuningJob response = client.getHyperparameterTuningJob(name);
        System.out.format("response: %s\n", response);
    }
}
Also used : JobServiceSettings(com.google.cloud.aiplatform.v1.JobServiceSettings) HyperparameterTuningJob(com.google.cloud.aiplatform.v1.HyperparameterTuningJob) HyperparameterTuningJobName(com.google.cloud.aiplatform.v1.HyperparameterTuningJobName) JobServiceClient(com.google.cloud.aiplatform.v1.JobServiceClient)

Aggregations

HyperparameterTuningJob (com.google.cloud.aiplatform.v1.HyperparameterTuningJob)1 HyperparameterTuningJobName (com.google.cloud.aiplatform.v1.HyperparameterTuningJobName)1 JobServiceClient (com.google.cloud.aiplatform.v1.JobServiceClient)1 JobServiceSettings (com.google.cloud.aiplatform.v1.JobServiceSettings)1