@@ -253,37 +253,6 @@ def init_gcs():
253253 KaggleKernelCredentials (target = GcpTarget .GCS ))
254254 return storage
255255
256- def init_automl ():
257- from google .cloud import automl , automl_v1beta1
258- if not is_user_secrets_token_set ():
259- return
260-
261- from kaggle_gcp import get_integrations
262- if not get_integrations ().has_cloudai ():
263- return
264-
265- from kaggle_secrets import GcpTarget
266- from kaggle_gcp import KaggleKernelCredentials
267- kaggle_kernel_credentials = KaggleKernelCredentials (target = GcpTarget .CLOUDAI )
268-
269- # Patch the 2 GA clients: AutoMlClient and PreditionServiceClient
270- monkeypatch_client (automl .AutoMlClient , kaggle_kernel_credentials )
271- monkeypatch_client (automl .PredictionServiceClient , kaggle_kernel_credentials )
272-
273- # The AutoML client library exposes 3 different client classes (AutoMlClient,
274- # TablesClient, PredictionServiceClient), so patch each of them.
275- # The same KaggleKernelCredentials are passed to all of them.
276- # The GcsClient class is only used internally by TablesClient.
277-
278- # The beta version of the clients that are now GA are included here for now.
279- # They are deprecated and will be removed by 1 May 2020.
280- monkeypatch_client (automl_v1beta1 .AutoMlClient , kaggle_kernel_credentials )
281- monkeypatch_client (automl_v1beta1 .PredictionServiceClient , kaggle_kernel_credentials )
282-
283- # The TablesClient is still in beta, so this will not be deprecated until
284- # the TablesClient is GA.
285- monkeypatch_client (automl_v1beta1 .TablesClient , kaggle_kernel_credentials )
286-
287256def init_translation_v2 ():
288257 from google .cloud import translate_v2
289258 if not is_user_secrets_token_set ():
@@ -379,7 +348,6 @@ def init_vision():
379348def init ():
380349 init_bigquery ()
381350 init_gcs ()
382- init_automl ()
383351 init_translation_v2 ()
384352 init_translation_v3 ()
385353 init_natural_language ()
0 commit comments