Skip to content

Commit

Permalink
fix problems with automl docs [(#2501)](GoogleCloudPlatform/python-do…
Browse files Browse the repository at this point in the history
…cs-samples#2501)

Today when we try to use the function `batch_predict` follow the docs we receive and error saying: `the paramaters should be a pandas.Dataframe` it’s happens because the first parameter of the function `batch_predict` is a pandas.Dataframe. To solve this problem we need to use de named parameters of python.
  • Loading branch information
alefhsousa authored and busunkim96 committed Aug 13, 2020
1 parent af31274 commit fe2e911
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions samples/tables/automl_tables_predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ def batch_predict(project_id,
client = automl.TablesClient(project=project_id, region=compute_region)

# Query model
response = client.batch_predict(
gcs_input_uris, gcs_output_uri, model_display_name=model_display_name
)
response = client.batch_predict(gcs_input_uris=gcs_input_uris,
gcs_output_uri_prefix=gcs_output_uri,
model_display_name=model_display_name)
print("Making batch prediction... ")
response.result()
print("Batch prediction complete.\n{}".format(response.metadata))
Expand Down

0 comments on commit fe2e911

Please sign in to comment.