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

Add methods for Models API #7562

Merged
merged 12 commits into from
Apr 4, 2019
Merged

Add methods for Models API #7562

merged 12 commits into from
Apr 4, 2019

Conversation

tswast
Copy link
Contributor

@tswast tswast commented Mar 26, 2019

The Models API adds the following methods to the BigQuery client:

  • get_model
  • update_model
  • delete_model
  • list_models

for managing models created by BigQuery ML queries. Also added are models resources, which provide additional statistics about the models resource such as details about the training run.

tswast added 7 commits March 25, 2019 13:39
* Generate protos for Models API.

The Models API is a component of the bigquery_v2 interface.
It is not available as a gRPC API, but it does provide
protocol buffers. This commit adds those protocol buffers
to the client so that they can be used to avoid much manual
work to create resource classes that can be serialized to/from
JSON.
* Fixes BQ Models API generated code for Python 2.7

* Format quoted strings as plain text.
* Add handwritten model API classes.

These classes provide the top-level classes for the Model API. The
protocol buffer objects are used for all sub-objects.

The pattern for mutable properties follows the same as with Table and
Dataset: a `_properties` dictionary contains the property values in the
REST API format.

* Address review comments in Model.

Use setdefault for labels.
Simplify setter logic for expires.

* Combine error messages for too many and too few parts in model/table ID.
* Regen BigQuery Model API classes.

This commit is auto-generated by:

    SYNTHTOOL_GOOGLEAPIS=$HOME/src/googleapis-private python -m synthtool

* Update test for Model to new representation of TrainingRun.startTime.
* Add client methods for Models API.

* Adds hack to workaround milliseconds format for
  model.trainingRun.startTime.
* Adds code samples for Models API, which double as system tests.
Even if the Models API itself is considered GA, I'd like to mark the
client methods as Beta for a time to give us some more ability to make
breaking changes until we're sure of the public interface we want to
expose.
@tswast tswast added the api: bigquery Issues related to the BigQuery API. label Mar 26, 2019
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 26, 2019
@tswast tswast marked this pull request as ready for review March 28, 2019 16:41
@tswast tswast requested a review from shollyman March 28, 2019 16:41
@tswast
Copy link
Contributor Author

tswast commented Mar 28, 2019

Shouldn't be too much to review, as all these commits were reviewed in the private version. Looks like there are a few conflicts now, though. I'll see what I can do about those.

@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Apr 2, 2019
@tswast tswast merged commit c436873 into googleapis:master Apr 4, 2019
@tswast tswast deleted the bqml branch December 27, 2019 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the BigQuery API. cla: yes This human has signed the Contributor License Agreement. 🚨 This issue needs some love.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants