| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -39,6 +39,7 @@ | |||
| 39 | 39 | ||
| 40 | 40 | import proto | |
| 41 | 41 | ||
| 42 | + from google.api_core import retry | ||
| 42 | 43 | from google.api_core import operation | |
| 43 | 44 | from google.auth import credentials as auth_credentials | |
| 44 | 45 | from google.cloud.aiplatform import initializer | |
@@ -48,6 +49,9 @@ | |||
| 48 | 49 | ||
| 49 | 50 | logging.basicConfig(level=logging.INFO, stream=sys.stdout) | |
| 50 | 51 | ||
| 52 | + # This is the default retry callback to be used with get methods. | ||
| 53 | + _DEFAULT_RETRY = retry.Retry() | ||
| 54 | + | ||
| 51 | 55 | ||
| 52 | 56 | class Logger: | |
| 53 | 57 | """Logging wrapper class with high level helper methods.""" | |
@@ -532,7 +536,9 @@ def _get_gca_resource(self, resource_name: str) -> proto.Message: | |||
| 532 | 536 | location=self.location, | |
| 533 | 537 | ) | |
| 534 | 538 | ||
| 535 | - return getattr(self.api_client, self._getter_method)(name=resource_name) | ||
| 539 | + return getattr(self.api_client, self._getter_method)( | ||
| 540 | + name=resource_name, retry=_DEFAULT_RETRY | ||
| 541 | + ) | ||
| 536 | 542 | ||
| 537 | 543 | def _sync_gca_resource(self): | |
| 538 | 544 | """Sync GAPIC service representation of client class resource.""" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -94,7 +94,7 @@ def __init__( | |||
| 94 | 94 | ) | |
| 95 | 95 | ||
| 96 | 96 | self._gca_resource = getattr(self.api_client, self._getter_method)( | |
| 97 | - name=full_resource_name | ||
| 97 | + name=full_resource_name, retry=base._DEFAULT_RETRY | ||
| 98 | 98 | ) | |
| 99 | 99 | ||
| 100 | 100 | @property | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,6 +3,7 @@ | |||
| 3 | 3 | from unittest import mock | |
| 4 | 4 | ||
| 5 | 5 | from google.cloud import aiplatform | |
| 6 | + from google.cloud.aiplatform import base | ||
| 6 | 7 | from google.cloud.aiplatform import datasets | |
| 7 | 8 | from google.cloud.aiplatform import initializer | |
| 8 | 9 | from google.cloud.aiplatform import schema | |
@@ -301,7 +302,9 @@ def test_run_call_pipeline_service_create( | |||
| 301 | 302 | ||
| 302 | 303 | assert job._gca_resource is mock_pipeline_service_get.return_value | |
| 303 | 304 | ||
| 304 | - mock_model_service_get.assert_called_once_with(name=_TEST_MODEL_NAME) | ||
| 305 | + mock_model_service_get.assert_called_once_with( | ||
| 306 | + name=_TEST_MODEL_NAME, retry=base._DEFAULT_RETRY | ||
| 307 | + ) | ||
| 305 | 308 | ||
| 306 | 309 | assert model_from_job._gca_resource is mock_model_service_get.return_value | |
| 307 | 310 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,7 +6,7 @@ | |||
| 6 | 6 | from google.protobuf import struct_pb2 | |
| 7 | 7 | ||
| 8 | 8 | from google.cloud import aiplatform | |
| 9 | - | ||
| 9 | + from google.cloud.aiplatform import base | ||
| 10 | 10 | from google.cloud.aiplatform import datasets | |
| 11 | 11 | from google.cloud.aiplatform import initializer | |
| 12 | 12 | from google.cloud.aiplatform import models | |
@@ -309,7 +309,9 @@ def test_run_call_pipeline_service_create( | |||
| 309 | 309 | training_pipeline=true_training_pipeline, | |
| 310 | 310 | ) | |
| 311 | 311 | ||
| 312 | - mock_model_service_get.assert_called_once_with(name=_TEST_MODEL_NAME) | ||
| 312 | + mock_model_service_get.assert_called_once_with( | ||
| 313 | + name=_TEST_MODEL_NAME, retry=base._DEFAULT_RETRY | ||
| 314 | + ) | ||
| 313 | 315 | assert job._gca_resource is mock_pipeline_service_get.return_value | |
| 314 | 316 | assert model_from_job._gca_resource is mock_model_service_get.return_value | |
| 315 | 317 | assert job.get_model()._gca_resource is mock_model_service_get.return_value | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,7 +3,7 @@ | |||
| 3 | 3 | from unittest import mock | |
| 4 | 4 | ||
| 5 | 5 | from google.cloud import aiplatform | |
| 6 | - | ||
| 6 | + from google.cloud.aiplatform import base | ||
| 7 | 7 | from google.cloud.aiplatform import datasets | |
| 8 | 8 | from google.cloud.aiplatform import initializer | |
| 9 | 9 | from google.cloud.aiplatform import schema | |
@@ -367,7 +367,9 @@ def test_run_call_pipeline_service_create( | |||
| 367 | 367 | ||
| 368 | 368 | assert job._gca_resource is mock_pipeline_service_get.return_value | |
| 369 | 369 | ||
| 370 | - mock_model_service_get.assert_called_once_with(name=_TEST_MODEL_NAME) | ||
| 370 | + mock_model_service_get.assert_called_once_with( | ||
| 371 | + name=_TEST_MODEL_NAME, retry=base._DEFAULT_RETRY | ||
| 372 | + ) | ||
| 371 | 373 | ||
| 372 | 374 | assert model_from_job._gca_resource is mock_model_service_get.return_value | |
| 373 | 375 | ||
@@ -446,7 +448,9 @@ def test_run_call_pipeline_service_create_with_export_eval_data_items( | |||
| 446 | 448 | ||
| 447 | 449 | assert job._gca_resource is mock_pipeline_service_get.return_value | |
| 448 | 450 | ||
| 449 | - mock_model_service_get.assert_called_once_with(name=_TEST_MODEL_NAME) | ||
| 451 | + mock_model_service_get.assert_called_once_with( | ||
| 452 | + name=_TEST_MODEL_NAME, retry=base._DEFAULT_RETRY | ||
| 453 | + ) | ||
| 450 | 454 | ||
| 451 | 455 | assert model_from_job._gca_resource is mock_model_service_get.return_value | |
| 452 | 456 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,7 +3,7 @@ | |||
| 3 | 3 | from unittest import mock | |
| 4 | 4 | ||
| 5 | 5 | from google.cloud import aiplatform | |
| 6 | - | ||
| 6 | + from google.cloud.aiplatform import base | ||
| 7 | 7 | from google.cloud.aiplatform import datasets | |
| 8 | 8 | from google.cloud.aiplatform import initializer | |
| 9 | 9 | from google.cloud.aiplatform import models | |
@@ -370,7 +370,9 @@ def test_run_call_pipeline_service_create_classification( | |||
| 370 | 370 | training_pipeline=true_training_pipeline, | |
| 371 | 371 | ) | |
| 372 | 372 | ||
| 373 | - mock_model_service_get.assert_called_once_with(name=_TEST_MODEL_NAME) | ||
| 373 | + mock_model_service_get.assert_called_once_with( | ||
| 374 | + name=_TEST_MODEL_NAME, retry=base._DEFAULT_RETRY | ||
| 375 | + ) | ||
| 374 | 376 | assert job._gca_resource is mock_pipeline_service_get.return_value | |
| 375 | 377 | assert model_from_job._gca_resource is mock_model_service_get.return_value | |
| 376 | 378 | assert job.get_model()._gca_resource is mock_model_service_get.return_value | |
@@ -437,7 +439,9 @@ def test_run_call_pipeline_service_create_extraction( | |||
| 437 | 439 | training_pipeline=true_training_pipeline, | |
| 438 | 440 | ) | |
| 439 | 441 | ||
| 440 | - mock_model_service_get.assert_called_once_with(name=_TEST_MODEL_NAME) | ||
| 442 | + mock_model_service_get.assert_called_once_with( | ||
| 443 | + name=_TEST_MODEL_NAME, retry=base._DEFAULT_RETRY | ||
| 444 | + ) | ||
| 441 | 445 | assert job._gca_resource is mock_pipeline_service_get.return_value | |
| 442 | 446 | assert model_from_job._gca_resource is mock_model_service_get.return_value | |
| 443 | 447 | assert job.get_model()._gca_resource is mock_model_service_get.return_value | |
@@ -505,7 +509,9 @@ def test_run_call_pipeline_service_create_sentiment( | |||
| 505 | 509 | training_pipeline=true_training_pipeline, | |
| 506 | 510 | ) | |
| 507 | 511 | ||
| 508 | - mock_model_service_get.assert_called_once_with(name=_TEST_MODEL_NAME) | ||
| 512 | + mock_model_service_get.assert_called_once_with( | ||
| 513 | + name=_TEST_MODEL_NAME, retry=base._DEFAULT_RETRY | ||
| 514 | + ) | ||
| 509 | 515 | assert job._gca_resource is mock_pipeline_service_get.return_value | |
| 510 | 516 | assert model_from_job._gca_resource is mock_model_service_get.return_value | |
| 511 | 517 | assert job.get_model()._gca_resource is mock_model_service_get.return_value | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,7 +6,7 @@ | |||
| 6 | 6 | from google.protobuf import struct_pb2 | |
| 7 | 7 | ||
| 8 | 8 | from google.cloud import aiplatform | |
| 9 | - | ||
| 9 | + from google.cloud.aiplatform import base | ||
| 10 | 10 | from google.cloud.aiplatform import datasets | |
| 11 | 11 | from google.cloud.aiplatform import initializer | |
| 12 | 12 | from google.cloud.aiplatform import models | |
@@ -271,7 +271,9 @@ def test_init_aiplatform_with_encryption_key_name_and_create_training_job( | |||
| 271 | 271 | training_pipeline=true_training_pipeline, | |
| 272 | 272 | ) | |
| 273 | 273 | ||
| 274 | - mock_model_service_get.assert_called_once_with(name=_TEST_MODEL_NAME) | ||
| 274 | + mock_model_service_get.assert_called_once_with( | ||
| 275 | + name=_TEST_MODEL_NAME, retry=base._DEFAULT_RETRY | ||
| 276 | + ) | ||
| 275 | 277 | assert job._gca_resource is mock_pipeline_service_get.return_value | |
| 276 | 278 | assert model_from_job._gca_resource is mock_model_service_get.return_value | |
| 277 | 279 | assert job.get_model()._gca_resource is mock_model_service_get.return_value | |
@@ -538,7 +540,9 @@ def test_run_call_pipeline_service_create( | |||
| 538 | 540 | training_pipeline=true_training_pipeline, | |
| 539 | 541 | ) | |
| 540 | 542 | ||
| 541 | - mock_model_service_get.assert_called_once_with(name=_TEST_MODEL_NAME) | ||
| 543 | + mock_model_service_get.assert_called_once_with( | ||
| 544 | + name=_TEST_MODEL_NAME, retry=base._DEFAULT_RETRY | ||
| 545 | + ) | ||
| 542 | 546 | assert job._gca_resource is mock_pipeline_service_get.return_value | |
| 543 | 547 | assert model_from_job._gca_resource is mock_model_service_get.return_value | |
| 544 | 548 | assert job.get_model()._gca_resource is mock_model_service_get.return_value | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -29,6 +29,7 @@ | |||
| 29 | 29 | from test_training_jobs import mock_python_package_to_gcs # noqa: F401 | |
| 30 | 30 | ||
| 31 | 31 | from google.cloud import aiplatform | |
| 32 | + from google.cloud.aiplatform import base | ||
| 32 | 33 | from google.cloud.aiplatform.compat.types import custom_job as gca_custom_job_compat | |
| 33 | 34 | from google.cloud.aiplatform.compat.types import ( | |
| 34 | 35 | custom_job_v1beta1 as gca_custom_job_v1beta1, | |
@@ -447,7 +448,9 @@ def test_get_custom_job(self, get_custom_job_mock): | |||
| 447 | 448 | ||
| 448 | 449 | job = aiplatform.CustomJob.get(_TEST_CUSTOM_JOB_NAME) | |
| 449 | 450 | ||
| 450 | - get_custom_job_mock.assert_called_once_with(name=_TEST_CUSTOM_JOB_NAME) | ||
| 451 | + get_custom_job_mock.assert_called_once_with( | ||
| 452 | + name=_TEST_CUSTOM_JOB_NAME, retry=base._DEFAULT_RETRY | ||
| 453 | + ) | ||
| 451 | 454 | assert ( | |
| 452 | 455 | job._gca_resource.state == gca_job_state_compat.JobState.JOB_STATE_PENDING | |
| 453 | 456 | ) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -28,13 +28,13 @@ | |||
| 28 | 28 | from google.auth import credentials as auth_credentials | |
| 29 | 29 | ||
| 30 | 30 | from google.cloud import aiplatform | |
| 31 | - from google.cloud import bigquery | ||
| 32 | - from google.cloud import storage | ||
| 33 | - | ||
| 31 | + from google.cloud.aiplatform import base | ||
| 34 | 32 | from google.cloud.aiplatform import compat | |
| 35 | 33 | from google.cloud.aiplatform import datasets | |
| 36 | 34 | from google.cloud.aiplatform import initializer | |
| 37 | 35 | from google.cloud.aiplatform import schema | |
| 36 | + from google.cloud import bigquery | ||
| 37 | + from google.cloud import storage | ||
| 38 | 38 | ||
| 39 | 39 | from google.cloud.aiplatform_v1.services.dataset_service import ( | |
| 40 | 40 | client as dataset_service_client, | |
@@ -474,7 +474,9 @@ def teardown_method(self): | |||
| 474 | 474 | def test_init_dataset(self, get_dataset_mock): | |
| 475 | 475 | aiplatform.init(project=_TEST_PROJECT) | |
| 476 | 476 | datasets._Dataset(dataset_name=_TEST_NAME) | |
| 477 | - get_dataset_mock.assert_called_once_with(name=_TEST_NAME) | ||
| 477 | + get_dataset_mock.assert_called_once_with( | ||
| 478 | + name=_TEST_NAME, retry=base._DEFAULT_RETRY | ||
| 479 | + ) | ||
| 478 | 480 | ||
| 479 | 481 | def test_init_dataset_with_id_only_with_project_and_location( | |
| 480 | 482 | self, get_dataset_mock | |
@@ -483,21 +485,27 @@ def test_init_dataset_with_id_only_with_project_and_location( | |||
| 483 | 485 | datasets._Dataset( | |
| 484 | 486 | dataset_name=_TEST_ID, project=_TEST_PROJECT, location=_TEST_LOCATION | |
| 485 | 487 | ) | |
| 486 | - get_dataset_mock.assert_called_once_with(name=_TEST_NAME) | ||
| 488 | + get_dataset_mock.assert_called_once_with( | ||
| 489 | + name=_TEST_NAME, retry=base._DEFAULT_RETRY | ||
| 490 | + ) | ||
| 487 | 491 | ||
| 488 | 492 | def test_init_dataset_with_project_and_location(self, get_dataset_mock): | |
| 489 | 493 | aiplatform.init(project=_TEST_PROJECT) | |
| 490 | 494 | datasets._Dataset( | |
| 491 | 495 | dataset_name=_TEST_NAME, project=_TEST_PROJECT, location=_TEST_LOCATION | |
| 492 | 496 | ) | |
| 493 | - get_dataset_mock.assert_called_once_with(name=_TEST_NAME) | ||
| 497 | + get_dataset_mock.assert_called_once_with( | ||
| 498 | + name=_TEST_NAME, retry=base._DEFAULT_RETRY | ||
| 499 | + ) | ||
| 494 | 500 | ||
| 495 | 501 | def test_init_dataset_with_alt_project_and_location(self, get_dataset_mock): | |
| 496 | 502 | aiplatform.init(project=_TEST_PROJECT) | |
| 497 | 503 | datasets._Dataset( | |
| 498 | 504 | dataset_name=_TEST_NAME, project=_TEST_ALT_PROJECT, location=_TEST_LOCATION | |
| 499 | 505 | ) | |
| 500 | - get_dataset_mock.assert_called_once_with(name=_TEST_NAME) | ||
| 506 | + get_dataset_mock.assert_called_once_with( | ||
| 507 | + name=_TEST_NAME, retry=base._DEFAULT_RETRY | ||
| 508 | + ) | ||
| 501 | 509 | ||
| 502 | 510 | def test_init_dataset_with_alt_location(self, get_dataset_tabular_gcs_mock): | |
| 503 | 511 | aiplatform.init(project=_TEST_PROJECT, location=_TEST_ALT_LOCATION) | |
@@ -511,7 +519,9 @@ def test_init_dataset_with_alt_location(self, get_dataset_tabular_gcs_mock): | |||
| 511 | 519 | ||
| 512 | 520 | assert _TEST_ALT_LOCATION != _TEST_LOCATION | |
| 513 | 521 | ||
| 514 | - get_dataset_tabular_gcs_mock.assert_called_once_with(name=_TEST_NAME) | ||
| 522 | + get_dataset_tabular_gcs_mock.assert_called_once_with( | ||
| 523 | + name=_TEST_NAME, retry=base._DEFAULT_RETRY | ||
| 524 | + ) | ||
| 515 | 525 | ||
| 516 | 526 | def test_init_dataset_with_project_and_alt_location(self): | |
| 517 | 527 | aiplatform.init(project=_TEST_PROJECT) | |
@@ -525,7 +535,9 @@ def test_init_dataset_with_project_and_alt_location(self): | |||
| 525 | 535 | def test_init_dataset_with_id_only(self, get_dataset_mock): | |
| 526 | 536 | aiplatform.init(project=_TEST_PROJECT, location=_TEST_LOCATION) | |
| 527 | 537 | datasets._Dataset(dataset_name=_TEST_ID) | |
| 528 | - get_dataset_mock.assert_called_once_with(name=_TEST_NAME) | ||
| 538 | + get_dataset_mock.assert_called_once_with( | ||
| 539 | + name=_TEST_NAME, retry=base._DEFAULT_RETRY | ||
| 540 | + ) | ||
| 529 | 541 | ||
| 530 | 542 | @pytest.mark.usefixtures("get_dataset_without_name_mock") | |
| 531 | 543 | @patch.dict( | |
@@ -541,7 +553,9 @@ def test_init_dataset_with_id_only_without_project_or_location(self): | |||
| 541 | 553 | def test_init_dataset_with_location_override(self, get_dataset_mock): | |
| 542 | 554 | aiplatform.init(project=_TEST_PROJECT, location=_TEST_LOCATION) | |
| 543 | 555 | datasets._Dataset(dataset_name=_TEST_ID, location=_TEST_ALT_LOCATION) | |
| 544 | - get_dataset_mock.assert_called_once_with(name=_TEST_ALT_NAME) | ||
| 556 | + get_dataset_mock.assert_called_once_with( | ||
| 557 | + name=_TEST_ALT_NAME, retry=base._DEFAULT_RETRY | ||
| 558 | + ) | ||
| 545 | 559 | ||
| 546 | 560 | @pytest.mark.usefixtures("get_dataset_mock") | |
| 547 | 561 | def test_init_dataset_with_invalid_name(self): | |
@@ -764,7 +778,9 @@ def test_create_then_import( | |||
| 764 | 778 | metadata=_TEST_REQUEST_METADATA, | |
| 765 | 779 | ) | |
| 766 | 780 | ||
| 767 | - get_dataset_mock.assert_called_once_with(name=_TEST_NAME) | ||
| 781 | + get_dataset_mock.assert_called_once_with( | ||
| 782 | + name=_TEST_NAME, retry=base._DEFAULT_RETRY | ||
| 783 | + ) | ||
| 768 | 784 | ||
| 769 | 785 | import_data_mock.assert_called_once_with( | |
| 770 | 786 | name=_TEST_NAME, import_configs=[expected_import_config] | |
@@ -798,7 +814,9 @@ def teardown_method(self): | |||
| 798 | 814 | def test_init_dataset_image(self, get_dataset_image_mock): | |
| 799 | 815 | aiplatform.init(project=_TEST_PROJECT) | |
| 800 | 816 | datasets.ImageDataset(dataset_name=_TEST_NAME) | |
| 801 | - get_dataset_image_mock.assert_called_once_with(name=_TEST_NAME) | ||
| 817 | + get_dataset_image_mock.assert_called_once_with( | ||
| 818 | + name=_TEST_NAME, retry=base._DEFAULT_RETRY | ||
| 819 | + ) | ||
| 802 | 820 | ||
| 803 | 821 | @pytest.mark.usefixtures("get_dataset_tabular_bq_mock") | |
| 804 | 822 | def test_init_dataset_non_image(self): | |
@@ -934,7 +952,9 @@ def test_create_then_import( | |||
| 934 | 952 | metadata=_TEST_REQUEST_METADATA, | |
| 935 | 953 | ) | |
| 936 | 954 | ||
| 937 | - get_dataset_image_mock.assert_called_once_with(name=_TEST_NAME) | ||
| 955 | + get_dataset_image_mock.assert_called_once_with( | ||
| 956 | + name=_TEST_NAME, retry=base._DEFAULT_RETRY | ||
| 957 | + ) | ||
| 938 | 958 | ||
| 939 | 959 | expected_import_config = gca_dataset.ImportDataConfig( | |
| 940 | 960 | gcs_source=gca_io.GcsSource(uris=[_TEST_SOURCE_URI_GCS]), | |
@@ -989,7 +1009,9 @@ def teardown_method(self): | |||
| 989 | 1009 | def test_init_dataset_tabular(self, get_dataset_tabular_bq_mock): | |
| 990 | 1010 | ||
| 991 | 1011 | datasets.TabularDataset(dataset_name=_TEST_NAME) | |
| 992 | - get_dataset_tabular_bq_mock.assert_called_once_with(name=_TEST_NAME) | ||
| 1012 | + get_dataset_tabular_bq_mock.assert_called_once_with( | ||
| 1013 | + name=_TEST_NAME, retry=base._DEFAULT_RETRY | ||
| 1014 | + ) | ||
| 993 | 1015 | ||
| 994 | 1016 | @pytest.mark.usefixtures("get_dataset_image_mock") | |
| 995 | 1017 | def test_init_dataset_non_tabular(self): | |
@@ -1236,7 +1258,9 @@ def teardown_method(self): | |||
| 1236 | 1258 | def test_init_dataset_text(self, get_dataset_text_mock): | |
| 1237 | 1259 | aiplatform.init(project=_TEST_PROJECT) | |
| 1238 | 1260 | datasets.TextDataset(dataset_name=_TEST_NAME) | |
| 1239 | - get_dataset_text_mock.assert_called_once_with(name=_TEST_NAME) | ||
| 1261 | + get_dataset_text_mock.assert_called_once_with( | ||
| 1262 | + name=_TEST_NAME, retry=base._DEFAULT_RETRY | ||
| 1263 | + ) | ||
| 1240 | 1264 | ||
| 1241 | 1265 | @pytest.mark.usefixtures("get_dataset_image_mock") | |
| 1242 | 1266 | def test_init_dataset_non_text(self): | |
@@ -1409,7 +1433,9 @@ def test_create_then_import( | |||
| 1409 | 1433 | metadata=_TEST_REQUEST_METADATA, | |
| 1410 | 1434 | ) | |
| 1411 | 1435 | ||
| 1412 | - get_dataset_text_mock.assert_called_once_with(name=_TEST_NAME) | ||
| 1436 | + get_dataset_text_mock.assert_called_once_with( | ||
| 1437 | + name=_TEST_NAME, retry=base._DEFAULT_RETRY | ||
| 1438 | + ) | ||
| 1413 | 1439 | ||
| 1414 | 1440 | expected_import_config = gca_dataset.ImportDataConfig( | |
| 1415 | 1441 | gcs_source=gca_io.GcsSource(uris=[_TEST_SOURCE_URI_GCS]), | |
@@ -1463,7 +1489,9 @@ def teardown_method(self): | |||
| 1463 | 1489 | def test_init_dataset_video(self, get_dataset_video_mock): | |
| 1464 | 1490 | aiplatform.init(project=_TEST_PROJECT) | |
| 1465 | 1491 | datasets.VideoDataset(dataset_name=_TEST_NAME) | |
| 1466 | - get_dataset_video_mock.assert_called_once_with(name=_TEST_NAME) | ||
| 1492 | + get_dataset_video_mock.assert_called_once_with( | ||
| 1493 | + name=_TEST_NAME, retry=base._DEFAULT_RETRY | ||
| 1494 | + ) | ||
| 1467 | 1495 | ||
| 1468 | 1496 | @pytest.mark.usefixtures("get_dataset_tabular_bq_mock") | |
| 1469 | 1497 | def test_init_dataset_non_video(self): | |
@@ -1599,7 +1627,9 @@ def test_create_then_import( | |||
| 1599 | 1627 | metadata=_TEST_REQUEST_METADATA, | |
| 1600 | 1628 | ) | |
| 1601 | 1629 | ||
| 1602 | - get_dataset_video_mock.assert_called_once_with(name=_TEST_NAME) | ||
| 1630 | + get_dataset_video_mock.assert_called_once_with( | ||
| 1631 | + name=_TEST_NAME, retry=base._DEFAULT_RETRY | ||
| 1632 | + ) | ||
| 1603 | 1633 | ||
| 1604 | 1634 | expected_import_config = gca_dataset.ImportDataConfig( | |
| 1605 | 1635 | gcs_source=gca_io.GcsSource(uris=[_TEST_SOURCE_URI_GCS]), | |
| Back | FazBrowse Home | New Git URL |
0 commit comments