From 5665d9c079ef91a8e48b0392755cc7d5bf7bf551 Mon Sep 17 00:00:00 2001 From: Alefh Sousa Date: Tue, 19 Nov 2019 15:58:27 -0300 Subject: [PATCH] fix problems with automl docs [(#2501)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/2501) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- samples/tables/automl_tables_predict.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/tables/automl_tables_predict.py b/samples/tables/automl_tables_predict.py index 61643ed6..069faac1 100644 --- a/samples/tables/automl_tables_predict.py +++ b/samples/tables/automl_tables_predict.py @@ -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))