Skip to content

feat: initial generation of enhanced types#102

Merged
dizcology merged 3 commits into
masterfrom
enhanced-library
Dec 5, 2020
Merged

feat: initial generation of enhanced types#102
dizcology merged 3 commits into
masterfrom
enhanced-library

Conversation

@telpirion

Copy link
Copy Markdown
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 review from a team, busunkim96 and dizcology December 2, 2020 00:47
Comment thread docs/definition_v1beta1/services.rst Outdated

@dizcology dizcology left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

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

rpc = gapic_v1.method_async.wrap_method(
self._client._transport.list_annotations,
default_timeout=None,
default_timeout=5.0,

Copy link
Copy Markdown
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
Copy Markdown
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.

4 participants