|
31 | 31 | from google.cloud import storage
|
32 | 32 | from google.cloud.aiplatform import utils
|
33 | 33 | from google.cloud.aiplatform import initializer
|
34 |
| -from google.cloud.aiplatform_v1beta1.services import dataset_service |
| 34 | +from google.cloud.aiplatform.compat.services import ( |
| 35 | + dataset_service_client_v1 as dataset_service, |
| 36 | +) |
35 | 37 |
|
36 | 38 | from test_utils.vpcsc_config import vpcsc_config
|
37 | 39 |
|
|
57 | 59 | "bq://ucaip-sample-tests:ucaip_test_us_central1.2020_sales_train"
|
58 | 60 | )
|
59 | 61 | _TEST_TEXT_ENTITY_EXTRACTION_GCS_SOURCE = "gs://ucaip-samples-us-central1/sdk_system_test_resources/text_entity_extraction_dataset_small.jsonl"
|
60 |
| -_TEST_IMAGE_OBJECT_DETECTION_GCS_SOURCE = ( |
61 |
| - "gs://ucaip-test-us-central1/dataset/salads_oid_ml_use_public_unassigned.jsonl" |
62 |
| -) |
| 62 | +_TEST_IMAGE_OBJECT_DETECTION_GCS_SOURCE = "gs://cloud-samples-data-us-central1/ai-platform-unified/datasets/images/isg_data.jsonl" |
63 | 63 | _TEST_TEXT_ENTITY_IMPORT_SCHEMA = "gs://google-cloud-aiplatform/schema/dataset/ioformat/text_extraction_io_format_1.0.0.yaml"
|
64 |
| -_TEST_IMAGE_OBJ_DET_IMPORT_SCHEMA = "gs://google-cloud-aiplatform/schema/dataset/ioformat/image_bounding_box_io_format_1.0.0.yaml" |
| 64 | +_TEST_IMAGE_OBJ_DET_SEGMENTATION_IMPORT_SCHEMA = "gs://google-cloud-aiplatform/schema/dataset/ioformat/image_segmentation_io_format_1.0.0.yaml" |
65 | 65 |
|
66 | 66 | # create_from_dataframe
|
67 | 67 | _TEST_BOOL_COL = "bool_col"
|
@@ -214,16 +214,10 @@ def test_create_and_import_image_dataset(self, dataset_gapic_client):
|
214 | 214 | img_dataset = aiplatform.ImageDataset.create(
|
215 | 215 | display_name=self._make_display_name(key="create_image_dataset"),
|
216 | 216 | gcs_source=_TEST_IMAGE_OBJECT_DETECTION_GCS_SOURCE,
|
217 |
| - import_schema_uri=_TEST_IMAGE_OBJ_DET_IMPORT_SCHEMA, |
| 217 | + import_schema_uri=_TEST_IMAGE_OBJ_DET_SEGMENTATION_IMPORT_SCHEMA, |
218 | 218 | create_request_timeout=None,
|
219 | 219 | )
|
220 | 220 |
|
221 |
| - data_items_iterator = dataset_gapic_client.list_data_items( |
222 |
| - parent=img_dataset.resource_name |
223 |
| - ) |
224 |
| - |
225 |
| - assert len(list(data_items_iterator)) == 14 |
226 |
| - |
227 | 221 | finally:
|
228 | 222 | if img_dataset is not None:
|
229 | 223 | img_dataset.delete()
|
|
0 commit comments