From a65cb0a1f548e082fad6cceba5a86fb8b529382d 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 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tables/automl/automl_tables_predict.py b/tables/automl/automl_tables_predict.py index 61643ed66faa..1c52a48cd98a 100644 --- a/tables/automl/automl_tables_predict.py +++ b/tables/automl/automl_tables_predict.py @@ -72,9 +72,7 @@ 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))