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

fix(automl): pass params to underlying client #9794

Merged
merged 9 commits into from
Nov 15, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion automl/google/cloud/automl_v1beta1/tables/tables_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2596,6 +2596,7 @@ def predict(
model=None,
model_name=None,
model_display_name=None,
params=None,
project=None,
region=None,
**kwargs
Expand Down Expand Up @@ -2642,6 +2643,14 @@ def predict(
The `model` instance you want to predict with . This must be
supplied if `model_display_name` or `model_name` are not
supplied.
params (Dict[str, str]):
Additional domain-specific parameters, any string must be up to
25000 characters long.
``feature_importance`` - (boolean) Whether
[feature\_importance][[google.cloud.automl.v1beta1.TablesModelColumnInfo.feature\_importance]
Copy link
Contributor

@helinwang helinwang Nov 14, 2019

Choose a reason for hiding this comment

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

Non-blocking: curious if there is documentation / spec about how to how to write docstring with links.
E.g.,

  • why \ in feature\_importance is needed,
  • what does (-s) mean, and
  • seems different from markdown, [text][[link] instead of [text][link] is used.

Copy link
Contributor

Choose a reason for hiding this comment

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

This formatting is from the proto comments. I believe it's some flavor of markdown that makes the comments render nicely on cloud.google.com. See https://github.com/googleapis/googleapis/tree/master/google/cloud/automl/v1 and https://cloud.google.com/automl/docs/reference/rpc/google.cloud.automl.v1.

When you need to add docstrings, please follow the Google Python Style Guide

should be populated in the returned
[TablesAnnotation(-s)][[google.cloud.automl.v1beta1.TablesAnnotation].
The default is false.

Returns:
A :class:`~google.cloud.automl_v1beta1.types.PredictResponse`
Expand Down Expand Up @@ -2683,7 +2692,7 @@ def predict(

request = {"row": {"values": values}}

return self.prediction_client.predict(model.name, request, **kwargs)
return self.prediction_client.predict(model.name, request, params, **kwargs)

def batch_predict(
self,
Expand Down