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: initial generation of enhanced types #102

Merged
merged 3 commits into from Dec 5, 2020
Merged

Conversation

telpirion
Copy link
Contributor

This PR adds all of the new types for the enhanced client library, including the following modules:

  • google.cloud.aiplatform.schema.predict.instance
  • google.cloud.aiplatform.schema.predict.params
  • google.cloud.aiplatform.schema.predict.prediction
  • google.cloud.aiplatform.schema.trainingjob.definition

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Dec 1, 2020
@telpirion telpirion marked this pull request as ready for review December 2, 2020 00:47
@telpirion telpirion requested a review from a team as a code owner December 2, 2020 00:47
Copy link
Contributor

@dizcology dizcology left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will there need to be changes to google/cloud/aiplatform/gapic/init.py so the enhanced types are exported there? The user should be able to access them with, for example:

from google.cloud import aiplatform
trainingjob_definition = aiplatform.gapic.AutoMlForecasting(...)

@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should exclude schema/**/services/ in synth.py.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@telpirion
Copy link
Contributor Author

Will there need to be changes to google/cloud/aiplatform/gapic/init.py so the enhanced types are exported there? The user should be able to access them with, for example:

from google.cloud import aiplatform
trainingjob_definition = aiplatform.gapic.AutoMlForecasting(...)

No, that's not in the plan for a couple of reasons: 1) there are some message types that have different usages but the same names; and 2) the fully-qualified names of the types indicate their usage within the library. In the snippet you provided above, for example, there's nothing about AutoMlForecasting that tells the developer that it's a training job definition type.

@telpirion
Copy link
Contributor Author

Responded to comments, uploaded new commits. PTAL at your earliest convenience. Thank you!

@@ -996,7 +996,7 @@ async def list_annotations(
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.list_annotations,
default_timeout=None,
default_timeout=5.0,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just an FYI, now that Bazel is being used the timeout values are pulled from the service config. If the timeouts seem too long/short please edit the service config.

https://github.com/googleapis/googleapis/blob/master/google/cloud/aiplatform/v1beta1/aiplatform_grpc_service_config.json

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@telpirion telpirion added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 3, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 3, 2020
@dizcology dizcology added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 4, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 4, 2020
@dizcology dizcology added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 4, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 4, 2020
@dizcology dizcology merged commit 5ddbf16 into master Dec 5, 2020
@dizcology dizcology deleted the enhanced-library branch December 5, 2020 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants