|
24 | 24 | from google.api_core import exceptions
|
25 | 25 | from google.cloud.automl_v1beta1 import gapic
|
26 | 26 | from google.cloud.automl_v1beta1.proto import data_types_pb2
|
27 |
| -from google.cloud import automl_v1beta1 |
| 27 | +from google.cloud.automl_v1beta1.tables import gcs_client |
28 | 28 |
|
29 | 29 | _GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-automl").version
|
30 | 30 | _LOGGER = logging.getLogger(__name__)
|
@@ -734,9 +734,7 @@ def import_data(
|
734 | 734 |
|
735 | 735 | if self.gcs_client is None:
|
736 | 736 | credentials, _ = google.auth.default()
|
737 |
| - self.gcs_client = automl_v1beta1.tables.gcs_client.GcsClient( |
738 |
| - credentials=credentials |
739 |
| - ) |
| 737 | + self.gcs_client = gcs_client.GcsClient(credentials=credentials) |
740 | 738 |
|
741 | 739 | if pandas_dataframe is not None:
|
742 | 740 | bucket_name = self.gcs_client.ensure_bucket_exists(project=project)
|
@@ -2724,9 +2722,7 @@ def batch_predict(
|
2724 | 2722 |
|
2725 | 2723 | if self.gcs_client is None:
|
2726 | 2724 | credentials, _ = google.auth.default()
|
2727 |
| - self.gcs_client = automl_v1beta1.tables.gcs_client.GcsClient( |
2728 |
| - credentials=credentials |
2729 |
| - ) |
| 2725 | + self.gcs_client = gcs_client.GcsClient(credentials=credentials) |
2730 | 2726 |
|
2731 | 2727 | if pandas_dataframe is not None:
|
2732 | 2728 | bucket_name = self.gcs_client.ensure_bucket_exists(project=project)
|
|
0 commit comments