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 disable_container_logging to BatchPredictionJob in aiplatform v1,v1beta1 batch_prediction_job.proto #5921

Merged
merged 4 commits into from
Mar 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified AiPlatform/metadata/V1/AcceleratorType.php
Binary file not shown.
Binary file modified AiPlatform/metadata/V1/BatchPredictionJob.php
Binary file not shown.
Binary file modified AiPlatform/metadata/V1/Dataset.php
Binary file not shown.
Binary file modified AiPlatform/metadata/V1/DatasetService.php
Binary file not shown.
5 changes: 3 additions & 2 deletions AiPlatform/metadata/V1/EndpointService.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added AiPlatform/metadata/V1/EvaluatedAnnotation.php
Binary file not shown.
Binary file modified AiPlatform/metadata/V1/Featurestore.php
Binary file not shown.
Binary file modified AiPlatform/metadata/V1/FeaturestoreService.php
Binary file not shown.
5 changes: 3 additions & 2 deletions AiPlatform/metadata/V1/IndexEndpointService.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified AiPlatform/metadata/V1/IndexService.php
Binary file not shown.
5 changes: 3 additions & 2 deletions AiPlatform/metadata/V1/MetadataService.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified AiPlatform/metadata/V1/ModelEvaluationSlice.php
Binary file not shown.
Binary file modified AiPlatform/metadata/V1/ModelService.php
Binary file not shown.
Binary file modified AiPlatform/metadata/V1/NasJob.php
Binary file not shown.
5 changes: 3 additions & 2 deletions AiPlatform/metadata/V1/PipelineService.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions AiPlatform/metadata/V1/SpecialistPoolService.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions AiPlatform/metadata/V1/TensorboardService.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@
* Endpoint.
*
* The resource name may contain version id or version alias to specify the
* version, if no version is specified, the default version will be deployed. Please see
* version.
* Example: `projects/{project}/locations/{location}/models/{model}@2`
* or
* `projects/{project}/locations/{location}/models/{model}@golden`
* if no version is specified, the default version will be deployed. Please see
* {@see EndpointServiceClient::modelName()} for help formatting this field.
*/
function deploy_model_sample(string $formattedEndpoint, string $formattedDeployedModelModel): void
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<?php
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/*
* GENERATED CODE WARNING
* This file was automatically generated - do not edit!
*/

require_once __DIR__ . '/../../../vendor/autoload.php';

// [START aiplatform_v1_generated_FeaturestoreService_DeleteFeatureValues_sync]
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\AIPlatform\V1\DeleteFeatureValuesResponse;
use Google\Cloud\AIPlatform\V1\FeaturestoreServiceClient;
use Google\Rpc\Status;

/**
* Delete Feature values from Featurestore.
*
* The progress of the deletion is tracked by the returned operation. The
* deleted feature values are guaranteed to be invisible to subsequent read
* operations after the operation is marked as successfully done.
*
* If a delete feature values operation fails, the feature values
* returned from reads and exports may be inconsistent. If consistency is
* required, the caller must retry the same delete request again and wait till
* the new operation returned is marked as successfully done.
*
* @param string $formattedEntityType The resource name of the EntityType grouping the Features for
* which values are being deleted from. Format:
* `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}`
* Please see {@see FeaturestoreServiceClient::entityTypeName()} for help formatting this field.
*/
function delete_feature_values_sample(string $formattedEntityType): void
{
// Create a client.
$featurestoreServiceClient = new FeaturestoreServiceClient();

// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $featurestoreServiceClient->deleteFeatureValues($formattedEntityType);
$response->pollUntilComplete();

if ($response->operationSucceeded()) {
/** @var DeleteFeatureValuesResponse $result */
$result = $response->getResult();
printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}

/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedEntityType = FeaturestoreServiceClient::entityTypeName(
'[PROJECT]',
'[LOCATION]',
'[FEATURESTORE]',
'[ENTITY_TYPE]'
);

delete_feature_values_sample($formattedEntityType);
}
// [END aiplatform_v1_generated_FeaturestoreService_DeleteFeatureValues_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<?php
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/*
* GENERATED CODE WARNING
* This file was automatically generated - do not edit!
*/

require_once __DIR__ . '/../../../vendor/autoload.php';

// [START aiplatform_v1_generated_ModelService_BatchImportEvaluatedAnnotations_sync]
use Google\ApiCore\ApiException;
use Google\Cloud\AIPlatform\V1\BatchImportEvaluatedAnnotationsResponse;
use Google\Cloud\AIPlatform\V1\EvaluatedAnnotation;
use Google\Cloud\AIPlatform\V1\ModelServiceClient;

/**
* Imports a list of externally generated EvaluatedAnnotations.
*
* @param string $formattedParent The name of the parent ModelEvaluationSlice resource.
* Format:
* `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}`
* Please see {@see ModelServiceClient::modelEvaluationSliceName()} for help formatting this field.
*/
function batch_import_evaluated_annotations_sample(string $formattedParent): void
{
// Create a client.
$modelServiceClient = new ModelServiceClient();

// Prepare any non-scalar elements to be passed along with the request.
$evaluatedAnnotations = [new EvaluatedAnnotation()];

// Call the API and handle any network failures.
try {
/** @var BatchImportEvaluatedAnnotationsResponse $response */
$response = $modelServiceClient->batchImportEvaluatedAnnotations(
$formattedParent,
$evaluatedAnnotations
);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}

/**
* Helper to execute the sample.
*
* This sample 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,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = ModelServiceClient::modelEvaluationSliceName(
'[PROJECT]',
'[LOCATION]',
'[MODEL]',
'[EVALUATION]',
'[SLICE]'
);

batch_import_evaluated_annotations_sample($formattedParent);
}
// [END aiplatform_v1_generated_ModelService_BatchImportEvaluatedAnnotations_sync]
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@
/**
* Deletes a Model version.
*
* Model version can only be deleted if there are no [DeployedModels][]
* created from it. Deleting the only version in the Model is not allowed. Use
* Model version can only be deleted if there are no
* [DeployedModels][google.cloud.aiplatform.v1.DeployedModel] created from it.
* Deleting the only version in the Model is not allowed. Use
* [DeleteModel][google.cloud.aiplatform.v1.ModelService.DeleteModel] for
* deleting the Model instead.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* Checks whether a Trial should stop or not. Returns a
* long-running operation. When the operation is successful,
* it will contain a
* [CheckTrialEarlyStoppingStateResponse][google.cloud.ml.v1.CheckTrialEarlyStoppingStateResponse].
* [CheckTrialEarlyStoppingStateResponse][google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse].
*
* @param string $formattedTrialName The Trial's name.
* Format:
Expand Down
8 changes: 8 additions & 0 deletions AiPlatform/src/V1/AcceleratorType.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading