From c42a00b45838adc5aea842f53849fd8883137eb6 Mon Sep 17 00:00:00 2001 From: Alefh Sousa Date: Mon, 28 Oct 2019 11:33:18 -0300 Subject: [PATCH] fix problems with automl docs 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. --- tables/automl/automl_tables_predict.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tables/automl/automl_tables_predict.py b/tables/automl/automl_tables_predict.py index 61643ed66faa..069faac1cde4 100644 --- a/tables/automl/automl_tables_predict.py +++ b/tables/automl/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))