-
Notifications
You must be signed in to change notification settings - Fork 24
feat(samples): add all feature samples #980
Conversation
} | ||
} | ||
} | ||
// [END aiplatform_delete_Feature_sample] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aiplatform_delete_Feature_sample -> aiplatform_delete_feature_sample
both START and END
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, will update it
|
||
Feature feature = Feature.newBuilder().setDescription(description) | ||
.setValueType(ValueType.valueOf(valueType)) | ||
// .setDisableMonitoring(disableMonitoring) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove this unless you guys are asked to put this example explicitly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, will remove it.
FeaturestoreServiceClient.create(featurestoreServiceSettings)) { | ||
|
||
Feature feature = Feature.newBuilder().setDescription(description) | ||
.setValueType(ValueType.valueOf(valueType)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can we use the ENUM directly. Applies to all occurrences.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, will pass the ENUM variable instead of String Variable as below
.setValueType(ValueType.valueOf(valueType)) | |
ValueType valueType = ValueType.STRING; | |
... | |
.setValueType(valueType) |
// Initialize client that will be used to send requests. This client only needs to be created | ||
// once, and can be reused for multiple requests. After completing all of your requests, call | ||
// the "close" method on the client to safely clean up any remaining background resources. | ||
try (FeaturestoreServiceClient featurestoreServiceClient = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we add the close to examples as well ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In other samples of GitHub close is not used, so we were following the same approach.
Should we add it for all the feature samples?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I see it as a plus to have it be there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added for all feature API's
String valueType = "YOUR_FEATURE_VALUE_TYPE"; | ||
String location = "us-central1"; | ||
String endpoint = "us-central1-aiplatform.googleapis.com:443"; | ||
int timeout = 300; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we follow the same timeout strategy as suggested in googleapis/nodejs-ai-platform#338
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was suggested for Featurestore API's, should follow the same timeouts as below for EntityType and Feature API's as well ?
15min for create
5min for delete
10min for update
5sec for list,get
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets do this instead, as Update on Feature/EntityType is syncronous, no long running operation i.e.
15min for create
5min for delete
1min for update
5sec for list,get
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated for create and delete feature API's with timeouts 15min and 5min respectively and for update, list, get timeout is not required.
Looks like the
... Do you mind taking a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make sure sample tests pass before merging.
🤖 I have created a release *beep* *boop* --- ## [3.2.0](v3.1.0...v3.2.0) (2022-08-09) ### Features * add a DeploymentResourcePool API resource_definition ([#997](#997)) ([f3e6d4f](f3e6d4f)) * add DeploymentResourcePool in aiplatform v1beta1 deployment_resource_pool.proto ([#998](#998)) ([49fb069](49fb069)) * add DeploymentResourcePoolService in aiplatform v1beta1 deployment_resource_pool_service.proto ([49fb069](49fb069)) * add shared_resources for supported prediction_resources ([f3e6d4f](f3e6d4f)) * add SHARED_RESOURCES to DeploymentResourcesType in aiplatform v1beta1 model.proto ([49fb069](49fb069)) * added SHARED_RESOURCES enum to aiplatform v1 model.proto ([3935d8f](3935d8f)) * DeploymentResourcePool and DeployementResourcePoolService added to aiplatform v1beta1 model.proto (cl/463147866) ([3935d8f](3935d8f)) * making network arg optional in aiplatform v1 custom_job.proto ([#999](#999)) ([3935d8f](3935d8f)) * making network arg optional in aiplatform v1beta1 custom_job.proto ([3935d8f](3935d8f)) * **samples:** add all feature samples ([#980](#980)) ([a932cf8](a932cf8)) * **samples:** add all feature values samples ([#981](#981)) ([818acab](818acab)) ### Bug Fixes * declaring test-scope artifact as runtime ([#1014](#1014)) ([f90cc12](f90cc12)) ### Documentation * doc edits to aiplatform v1 dataset_service.proto, job_service.proto, model_service.proto, pipeline_service.proto, saved_query.proto, study.proto, types.proto ([3935d8f](3935d8f)) * doc edits to aiplatform v1beta1 job_service.proto, model_service.proto, pipeline_service.proto, saved_query.proto, study.proto, types.proto ([3935d8f](3935d8f)) ### Dependencies * update dependency com.google.api.grpc:proto-google-cloud-aiplatform-v1beta1 to v0.17.0 ([#1003](#1003)) ([c2b98d9](c2b98d9)) * update dependency com.google.cloud:google-cloud-bigquery to v2.14.1 ([#1006](#1006)) ([2c959b9](2c959b9)) * update dependency com.google.cloud:google-cloud-bigquery to v2.14.3 ([#1009](#1009)) ([b170504](b170504)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v3 ([#1000](#1000)) ([6fb1534](6fb1534)) * update dependency com.google.cloud:google-cloud-storage to v2.10.0 ([#1004](#1004)) ([b6e2ab4](b6e2ab4)) * update dependency com.google.cloud:google-cloud-storage to v2.11.0 ([#1005](#1005)) ([26391a3](26391a3)) * update dependency com.google.cloud:google-cloud-storage to v2.11.1 ([#1008](#1008)) ([cba42d1](cba42d1)) * update dependency com.google.cloud:google-cloud-storage to v2.11.2 ([#1010](#1010)) ([4f35eed](4f35eed)) * update dependency com.google.code.gson:gson to v2.9.1 ([#1001](#1001)) ([f12c313](f12c313)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- ## [3.2.0](googleapis/java-aiplatform@v3.1.0...v3.2.0) (2022-08-09) ### Features * add a DeploymentResourcePool API resource_definition ([#997](googleapis/java-aiplatform#997)) ([82551d8](googleapis/java-aiplatform@82551d8)) * add DeploymentResourcePool in aiplatform v1beta1 deployment_resource_pool.proto ([#998](googleapis/java-aiplatform#998)) ([76dc64f](googleapis/java-aiplatform@76dc64f)) * add DeploymentResourcePoolService in aiplatform v1beta1 deployment_resource_pool_service.proto ([76dc64f](googleapis/java-aiplatform@76dc64f)) * add shared_resources for supported prediction_resources ([82551d8](googleapis/java-aiplatform@82551d8)) * add SHARED_RESOURCES to DeploymentResourcesType in aiplatform v1beta1 model.proto ([76dc64f](googleapis/java-aiplatform@76dc64f)) * added SHARED_RESOURCES enum to aiplatform v1 model.proto ([301cfb0](googleapis/java-aiplatform@301cfb0)) * DeploymentResourcePool and DeployementResourcePoolService added to aiplatform v1beta1 model.proto (cl/463147866) ([301cfb0](googleapis/java-aiplatform@301cfb0)) * making network arg optional in aiplatform v1 custom_job.proto ([#999](googleapis/java-aiplatform#999)) ([301cfb0](googleapis/java-aiplatform@301cfb0)) * making network arg optional in aiplatform v1beta1 custom_job.proto ([301cfb0](googleapis/java-aiplatform@301cfb0)) * **samples:** add all feature samples ([#980](googleapis/java-aiplatform#980)) ([8c2a485](googleapis/java-aiplatform@8c2a485)) * **samples:** add all feature values samples ([#981](googleapis/java-aiplatform#981)) ([2d4e6fe](googleapis/java-aiplatform@2d4e6fe)) ### Bug Fixes * declaring test-scope artifact as runtime ([#1014](googleapis/java-aiplatform#1014)) ([6c47c65](googleapis/java-aiplatform@6c47c65)) ### Documentation * doc edits to aiplatform v1 dataset_service.proto, job_service.proto, model_service.proto, pipeline_service.proto, saved_query.proto, study.proto, types.proto ([301cfb0](googleapis/java-aiplatform@301cfb0)) * doc edits to aiplatform v1beta1 job_service.proto, model_service.proto, pipeline_service.proto, saved_query.proto, study.proto, types.proto ([301cfb0](googleapis/java-aiplatform@301cfb0)) ### Dependencies * update dependency com.google.api.grpc:proto-google-cloud-aiplatform-v1beta1 to v0.17.0 ([#1003](googleapis/java-aiplatform#1003)) ([b793732](googleapis/java-aiplatform@b793732)) * update dependency com.google.cloud:google-cloud-bigquery to v2.14.1 ([#1006](googleapis/java-aiplatform#1006)) ([6bb8982](googleapis/java-aiplatform@6bb8982)) * update dependency com.google.cloud:google-cloud-bigquery to v2.14.3 ([#1009](googleapis/java-aiplatform#1009)) ([8cca8b5](googleapis/java-aiplatform@8cca8b5)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v3 ([#1000](googleapis/java-aiplatform#1000)) ([c93de30](googleapis/java-aiplatform@c93de30)) * update dependency com.google.cloud:google-cloud-storage to v2.10.0 ([#1004](googleapis/java-aiplatform#1004)) ([dd52cad](googleapis/java-aiplatform@dd52cad)) * update dependency com.google.cloud:google-cloud-storage to v2.11.0 ([#1005](googleapis/java-aiplatform#1005)) ([60e2f76](googleapis/java-aiplatform@60e2f76)) * update dependency com.google.cloud:google-cloud-storage to v2.11.1 ([#1008](googleapis/java-aiplatform#1008)) ([9a2fe64](googleapis/java-aiplatform@9a2fe64)) * update dependency com.google.cloud:google-cloud-storage to v2.11.2 ([#1010](googleapis/java-aiplatform#1010)) ([3c2ac16](googleapis/java-aiplatform@3c2ac16)) * update dependency com.google.code.gson:gson to v2.9.1 ([#1001](googleapis/java-aiplatform#1001)) ([a6ffed4](googleapis/java-aiplatform@a6ffed4)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #945 ☕️