GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(automl): fix TablesClient.predict for array and struct by helinwang · Pull Request #9991 · googleapis/google-cloud-python

Conversation

@helinwang

@helinwang helinwang commented Dec 17, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

The Predict request payload is proto. Previously Python dict is
automatically converted to proto. However, the conversion failed for
list item and dict item. Changing the structure of the Python dict might
fix the problem. However, this PR fixes the problem by generating the
proto message directly. So there is no auto conversion step.

FIXES #9887

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@helinwang
helinwang requested a review from sirtorry December 17, 2019 23:36
@helinwang
helinwang requested a review from busunkim96 as a code owner December 17, 2019 23:37
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 17, 2019
@helinwang
helinwang force-pushed the prediction_fix branch 2 times, most recently from edb9a2a to f58f6b1 Compare December 17, 2019 23:43
@helinwang helinwang changed the title fix(automl): fix TablesClient.predict for array and struct. fix(automl): fix TablesClient.predict for array and struct Dec 17, 2019
@helinwang
helinwang force-pushed the prediction_fix branch from f58f6b1 to f4604f5 Compare December 18, 2019 01:00
Helin Wang
fix(automl): fix TablesClient.predict for list and struct
66302e5
The Predict request payload is proto. Previously Python dict is
automatically converted to proto. However, the conversion failed for
google.protobuf.ListValue and google.protobuf.Struct. Changing the
structure of the Python dict might fix the problem. However, this PR
fixes the problem by generating the proto message directly. So there
is no auto conversion step.

FIXES googleapis#9887
@helinwang
helinwang force-pushed the prediction_fix branch from f4604f5 to 66302e5 Compare December 18, 2019 01:54
sirtorry
sirtorry approved these changes Dec 18, 2019
View reviewed changes
@sirtorry sirtorry assigned busunkim96 Dec 18, 2019
@helinwang

helinwang commented Jan 8, 2020

Copy link
Copy Markdown
Contributor Author

Friendly ping @busunkim96

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

busunkim96
busunkim96 suggested changes Jan 27, 2020
View reviewed changes

@busunkim96 busunkim96 left a comment

Copy link
Copy Markdown
Contributor

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.

LGTM with one small nit about dependencies

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread automl/setup.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Helin Wang
Address comment: remove protobuf dependency requirement.
20209f6
protobuf is already a transitive dependency (see google-api-core's
setup.py)
busunkim96
busunkim96 approved these changes Jan 27, 2020
View reviewed changes
@helinwang
helinwang merged commit 8a0e129 into googleapis:master Jan 28, 2020
This was referenced Jan 29, 2020
chore(asset): bump copyright year to 2020, tweak docstring formatting (via synth) #10223
Merged
chore(automl): bump copyright year to 2020, tweak docstring formatting (via synth) #10224
Merged
chore(bigquery): bump copyright year to 2020, tweak docstring formatting (via synth) #10225
Merged
feat(bigquerydatatransfer): undeprecate resource name helper methods; add py2 deprecation warning; bump copyright year to 2020 (via synth) #10226
Merged
chore(billingbudgets): bump copyright year to 2020, tweak docstring formatting (via synth) #10227
Merged
feat(datacatalog): undeprecate resource name helper methods, bump copyright year to 2020, tweak docstring formatting (via synth) #10228
Merged
docs(datalabeling): update docstrings; bump copyright year to 2020 (via synth) #10229
Merged
feat(documentai): bump copyright year to 2020, tweak docstring formatting (via synth) #10230
Merged
fix(iam): bump copyright year to 2020 (via synth) #10231
Merged
chore(iot): bump copyright year to 2020 (via synth) #10232
Merged
fix(irm): change default retry and timeout config; bump copyright year to 2020 (via synth) #10233
Merged
docs(language): change docstring formatting; bump copyright year to 2020 (via synth) #10234
Merged
chore(phishingprotection): bump copyright year to 2020 (via synth) #10235
Merged
chore(pubsub): bump copyright year to 2020 (via synth) #10236
Closed
This was referenced Jan 29, 2020
chore(redis): bump copyright year to 2020, tweak docstring formatting (via synth) #10237
Merged
chore(speech): bump copyright year to 2020, tweak docstring formatting (via synth) #10238
Merged
fix(talent): change default timeout values; edit docstrings; bump copyright year to 2020 (via synth) #10239
Merged
chore(texttospeech): bump copyright year to 2020, tweak docstring formatting (via synth) #10240
Merged
chore(trace): bump copyright year to 2020, tweak docstring formatting (via synth) #10241
Merged
chore(vision): bump copyright year to 2020, tweak docstring formatting (via synth) #10242
Merged
chore(websecurityscanner): bump copyright year to 2020, tweak docstring formatting (via synth) #10243
Merged
[CHANGE ME] Re-generated container to pick up changes in the API or client library generator. #10256
Closed
[CHANGE ME] Re-generated datastore to pick up changes in the API or client library generator. #10261
Closed
@yoshi-automation yoshi-automation mentioned this pull request Feb 7, 2020
[CHANGE ME] Re-generated recommender to pick up changes in the API or client library generator. #10363
Closed
parthea pushed a commit that referenced this pull request Oct 21, 2023
@helinwang
fix(automl): fix TablesClient.predict for array and struct (#9991)
4fbad6c
* fix(automl): fix TablesClient.predict for list and struct

The Predict request payload is proto. Previously Python dict is
automatically converted to proto. However, the conversion failed for
google.protobuf.ListValue and google.protobuf.Struct. Changing the
structure of the Python dict might fix the problem. However, this PR
fixes the problem by generating the proto message directly. So there
is no auto conversion step.

FIXES #9887

* Address comment: remove protobuf dependency requirement.

protobuf is already a transitive dependency (see google-api-core's
setup.py)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

2 more reviewers
@sirtorry sirtorry sirtorry approved these changes
@busunkim96 busunkim96 busunkim96 approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@busunkim96 busunkim96

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

TablesClient: predict does not work with Python list or dictionary

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@helinwang @sirtorry @busunkim96 @googlebot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.