diff --git a/google/cloud/aiplatform/datasets.py b/google/cloud/aiplatform/datasets.py index 848f902df2..68d90b7f51 100644 --- a/google/cloud/aiplatform/datasets.py +++ b/google/cloud/aiplatform/datasets.py @@ -161,12 +161,6 @@ def create( Instantiated representation of the managed dataset resource. """ - # Validate that source and import schema are passed together or not at all - if bool(gcs_source) ^ bool(import_schema_uri): - raise ValueError( - "Please provide both GCS source and import_schema_uri to import data or omit both." - ) - is_tabular_dataset_metadata = ( metadata_schema_uri == schema.dataset.metadata.tabular ) diff --git a/tests/unit/aiplatform/test_datasets.py b/tests/unit/aiplatform/test_datasets.py index ba9b1c870f..6f946d811b 100644 --- a/tests/unit/aiplatform/test_datasets.py +++ b/tests/unit/aiplatform/test_datasets.py @@ -242,20 +242,6 @@ def test_create_and_import_dataset(self, create_dataset_mock, import_data_mock): expected_dataset.name = _TEST_NAME assert my_dataset._gca_resource == expected_dataset - @pytest.mark.usefixtures("get_dataset_mock") - def test_create_and_import_dataset_without_import_schema_uri( - self, create_dataset_mock - ): - with pytest.raises(ValueError): - aiplatform.init(project=_TEST_PROJECT) - - Dataset.create( - display_name=_TEST_DISPLAY_NAME, - metadata_schema_uri=_TEST_METADATA_SCHEMA_URI_NONTABULAR, - labels=_TEST_LABEL, - gcs_source=_TEST_SOURCE_URI_GCS, - ) - @pytest.mark.usefixtures("get_dataset_mock") def test_import_data(self, import_data_mock): aiplatform.init(project=_TEST_PROJECT)