Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [aiplatform] add UpdatePersistentResourceRequest and add resource_pool_images and head_node_resource_pool_id to RaySpec #9769

Merged
merged 7 commits into from
Aug 30, 2023
4 changes: 2 additions & 2 deletions java-aiplatform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.20.0</version>
<version>26.22.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-aiplatform.svg
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-aiplatform/3.23.0
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-aiplatform/3.24.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1092,8 +1092,9 @@ public final UnaryCallable<ResumeScheduleRequest, Empty> resumeScheduleCallable(
* }</pre>
*
* @param schedule Required. The Schedule which replaces the resource on the server. The following
* restrictions will be applied: &#42; The scheduled request type cannot be changed. &#42; The
* output_only fields will be ignored if specified.
* restrictions will be applied:
* <p>&#42; The scheduled request type cannot be changed. &#42; The non-empty fields cannot be
* unset. &#42; The output_only fields will be ignored if specified.
* @param updateMask Required. The update mask applies to the resource. See
* [google.protobuf.FieldMask][google.protobuf.FieldMask].
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1025,6 +1025,126 @@ public final ReadTensorboardUsageResponse readTensorboardUsage(
return stub.readTensorboardUsageCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the storage size for a given TensorBoard instance.
*
* <p>Sample code:
*
* <pre>{@code
* // 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 tensorboard = TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]");
* ReadTensorboardSizeResponse response =
* tensorboardServiceClient.readTensorboardSize(tensorboard);
* }
* }</pre>
*
* @param tensorboard Required. The name of the Tensorboard resource. Format:
* `projects/{project}/locations/{location}/tensorboards/{tensorboard}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ReadTensorboardSizeResponse readTensorboardSize(TensorboardName tensorboard) {
ReadTensorboardSizeRequest request =
ReadTensorboardSizeRequest.newBuilder()
.setTensorboard(tensorboard == null ? null : tensorboard.toString())
.build();
return readTensorboardSize(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the storage size for a given TensorBoard instance.
*
* <p>Sample code:
*
* <pre>{@code
* // 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()) {
* String tensorboard =
* TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString();
* ReadTensorboardSizeResponse response =
* tensorboardServiceClient.readTensorboardSize(tensorboard);
* }
* }</pre>
*
* @param tensorboard Required. The name of the Tensorboard resource. Format:
* `projects/{project}/locations/{location}/tensorboards/{tensorboard}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ReadTensorboardSizeResponse readTensorboardSize(String tensorboard) {
ReadTensorboardSizeRequest request =
ReadTensorboardSizeRequest.newBuilder().setTensorboard(tensorboard).build();
return readTensorboardSize(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the storage size for a given TensorBoard instance.
*
* <p>Sample code:
*
* <pre>{@code
* // 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()) {
* ReadTensorboardSizeRequest request =
* ReadTensorboardSizeRequest.newBuilder()
* .setTensorboard(
* TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString())
* .build();
* ReadTensorboardSizeResponse response = tensorboardServiceClient.readTensorboardSize(request);
* }
* }</pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ReadTensorboardSizeResponse readTensorboardSize(ReadTensorboardSizeRequest request) {
return readTensorboardSizeCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the storage size for a given TensorBoard instance.
*
* <p>Sample code:
*
* <pre>{@code
* // 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()) {
* ReadTensorboardSizeRequest request =
* ReadTensorboardSizeRequest.newBuilder()
* .setTensorboard(
* TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString())
* .build();
* ApiFuture<ReadTensorboardSizeResponse> future =
* tensorboardServiceClient.readTensorboardSizeCallable().futureCall(request);
* // Do something.
* ReadTensorboardSizeResponse response = future.get();
* }
* }</pre>
*/
public final UnaryCallable<ReadTensorboardSizeRequest, ReadTensorboardSizeResponse>
readTensorboardSizeCallable() {
return stub.readTensorboardSizeCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a TensorboardExperiment.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ public UnaryCallSettings<DeleteTensorboardRequest, Operation> deleteTensorboardS
return ((TensorboardServiceStubSettings) getStubSettings()).readTensorboardUsageSettings();
}

/** Returns the object with the settings used for calls to readTensorboardSize. */
public UnaryCallSettings<ReadTensorboardSizeRequest, ReadTensorboardSizeResponse>
readTensorboardSizeSettings() {
return ((TensorboardServiceStubSettings) getStubSettings()).readTensorboardSizeSettings();
}

/** Returns the object with the settings used for calls to createTensorboardExperiment. */
public UnaryCallSettings<CreateTensorboardExperimentRequest, TensorboardExperiment>
createTensorboardExperimentSettings() {
Expand Down Expand Up @@ -514,6 +520,12 @@ public UnaryCallSettings.Builder<GetTensorboardRequest, Tensorboard> getTensorbo
return getStubSettingsBuilder().readTensorboardUsageSettings();
}

/** Returns the builder for the settings used for calls to readTensorboardSize. */
public UnaryCallSettings.Builder<ReadTensorboardSizeRequest, ReadTensorboardSizeResponse>
readTensorboardSizeSettings() {
return getStubSettingsBuilder().readTensorboardSizeSettings();
}

/** Returns the builder for the settings used for calls to createTensorboardExperiment. */
public UnaryCallSettings.Builder<CreateTensorboardExperimentRequest, TensorboardExperiment>
createTensorboardExperimentSettings() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,9 @@
"ReadTensorboardBlobData": {
"methods": ["readTensorboardBlobDataCallable"]
},
"ReadTensorboardSize": {
"methods": ["readTensorboardSize", "readTensorboardSize", "readTensorboardSize", "readTensorboardSizeCallable"]
},
"ReadTensorboardTimeSeriesData": {
"methods": ["readTensorboardTimeSeriesData", "readTensorboardTimeSeriesData", "readTensorboardTimeSeriesData", "readTensorboardTimeSeriesDataCallable"]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@
import com.google.cloud.aiplatform.v1.ListTensorboardsResponse;
import com.google.cloud.aiplatform.v1.ReadTensorboardBlobDataRequest;
import com.google.cloud.aiplatform.v1.ReadTensorboardBlobDataResponse;
import com.google.cloud.aiplatform.v1.ReadTensorboardSizeRequest;
import com.google.cloud.aiplatform.v1.ReadTensorboardSizeResponse;
import com.google.cloud.aiplatform.v1.ReadTensorboardTimeSeriesDataRequest;
import com.google.cloud.aiplatform.v1.ReadTensorboardTimeSeriesDataResponse;
import com.google.cloud.aiplatform.v1.ReadTensorboardUsageRequest;
Expand Down Expand Up @@ -170,6 +172,18 @@ public class GrpcTensorboardServiceStub extends TensorboardServiceStub {
ProtoUtils.marshaller(ReadTensorboardUsageResponse.getDefaultInstance()))
.build();

private static final MethodDescriptor<ReadTensorboardSizeRequest, ReadTensorboardSizeResponse>
readTensorboardSizeMethodDescriptor =
MethodDescriptor.<ReadTensorboardSizeRequest, ReadTensorboardSizeResponse>newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
"google.cloud.aiplatform.v1.TensorboardService/ReadTensorboardSize")
.setRequestMarshaller(
ProtoUtils.marshaller(ReadTensorboardSizeRequest.getDefaultInstance()))
.setResponseMarshaller(
ProtoUtils.marshaller(ReadTensorboardSizeResponse.getDefaultInstance()))
.build();

private static final MethodDescriptor<CreateTensorboardExperimentRequest, TensorboardExperiment>
createTensorboardExperimentMethodDescriptor =
MethodDescriptor.<CreateTensorboardExperimentRequest, TensorboardExperiment>newBuilder()
Expand Down Expand Up @@ -536,6 +550,8 @@ public class GrpcTensorboardServiceStub extends TensorboardServiceStub {
deleteTensorboardOperationCallable;
private final UnaryCallable<ReadTensorboardUsageRequest, ReadTensorboardUsageResponse>
readTensorboardUsageCallable;
private final UnaryCallable<ReadTensorboardSizeRequest, ReadTensorboardSizeResponse>
readTensorboardSizeCallable;
private final UnaryCallable<CreateTensorboardExperimentRequest, TensorboardExperiment>
createTensorboardExperimentCallable;
private final UnaryCallable<GetTensorboardExperimentRequest, TensorboardExperiment>
Expand Down Expand Up @@ -721,6 +737,17 @@ protected GrpcTensorboardServiceStub(
return builder.build();
})
.build();
GrpcCallSettings<ReadTensorboardSizeRequest, ReadTensorboardSizeResponse>
readTensorboardSizeTransportSettings =
GrpcCallSettings.<ReadTensorboardSizeRequest, ReadTensorboardSizeResponse>newBuilder()
.setMethodDescriptor(readTensorboardSizeMethodDescriptor)
.setParamsExtractor(
request -> {
RequestParamsBuilder builder = RequestParamsBuilder.create();
builder.add("tensorboard", String.valueOf(request.getTensorboard()));
return builder.build();
})
.build();
GrpcCallSettings<CreateTensorboardExperimentRequest, TensorboardExperiment>
createTensorboardExperimentTransportSettings =
GrpcCallSettings.<CreateTensorboardExperimentRequest, TensorboardExperiment>newBuilder()
Expand Down Expand Up @@ -1102,6 +1129,11 @@ protected GrpcTensorboardServiceStub(
readTensorboardUsageTransportSettings,
settings.readTensorboardUsageSettings(),
clientContext);
this.readTensorboardSizeCallable =
callableFactory.createUnaryCallable(
readTensorboardSizeTransportSettings,
settings.readTensorboardSizeSettings(),
clientContext);
this.createTensorboardExperimentCallable =
callableFactory.createUnaryCallable(
createTensorboardExperimentTransportSettings,
Expand Down Expand Up @@ -1342,6 +1374,12 @@ public UnaryCallable<DeleteTensorboardRequest, Operation> deleteTensorboardCalla
return readTensorboardUsageCallable;
}

@Override
public UnaryCallable<ReadTensorboardSizeRequest, ReadTensorboardSizeResponse>
readTensorboardSizeCallable() {
return readTensorboardSizeCallable;
}

@Override
public UnaryCallable<CreateTensorboardExperimentRequest, TensorboardExperiment>
createTensorboardExperimentCallable() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@
import com.google.cloud.aiplatform.v1.ListTensorboardsResponse;
import com.google.cloud.aiplatform.v1.ReadTensorboardBlobDataRequest;
import com.google.cloud.aiplatform.v1.ReadTensorboardBlobDataResponse;
import com.google.cloud.aiplatform.v1.ReadTensorboardSizeRequest;
import com.google.cloud.aiplatform.v1.ReadTensorboardSizeResponse;
import com.google.cloud.aiplatform.v1.ReadTensorboardTimeSeriesDataRequest;
import com.google.cloud.aiplatform.v1.ReadTensorboardTimeSeriesDataResponse;
import com.google.cloud.aiplatform.v1.ReadTensorboardUsageRequest;
Expand Down Expand Up @@ -154,6 +156,11 @@ public UnaryCallable<DeleteTensorboardRequest, Operation> deleteTensorboardCalla
throw new UnsupportedOperationException("Not implemented: readTensorboardUsageCallable()");
}

public UnaryCallable<ReadTensorboardSizeRequest, ReadTensorboardSizeResponse>
readTensorboardSizeCallable() {
throw new UnsupportedOperationException("Not implemented: readTensorboardSizeCallable()");
}

public UnaryCallable<CreateTensorboardExperimentRequest, TensorboardExperiment>
createTensorboardExperimentCallable() {
throw new UnsupportedOperationException(
Expand Down
Loading