GeezerVison is showing github.com — Copybara import of the project: · smbale/python-aiplatform@169dd44
File treeExpand file treeCollapse file tree Open diff view settings deployment_resource_pool_service feature_online_store_admin_service feature_online_store_service featurestore_online_serving_service persistent_resource_service
samples/generated_samples
Some content is hiddenLarge Commits have some content hidden by default. Use the searchbox below for content that may be hidden. Dismiss bannerExpand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: google/cloud/aiplatform_v1/__init__.py +6Lines changed: 6 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 705 | 705 | from .types.notebook_service import StartNotebookRuntimeOperationMetadata | 706 | 706 | from .types.notebook_service import StartNotebookRuntimeRequest | 707 | 707 | from .types.notebook_service import StartNotebookRuntimeResponse | | 708 | +from .types.notebook_service import StopNotebookRuntimeOperationMetadata | | 709 | +from .types.notebook_service import StopNotebookRuntimeRequest | | 710 | +from .types.notebook_service import StopNotebookRuntimeResponse | 708 | 711 | from .types.notebook_service import UpdateNotebookRuntimeTemplateRequest | 709 | 712 | from .types.notebook_service import UpgradeNotebookRuntimeOperationMetadata | 710 | 713 | from .types.notebook_service import UpgradeNotebookRuntimeRequest | | 1640 | 1643 | "StartNotebookRuntimeOperationMetadata", | 1641 | 1644 | "StartNotebookRuntimeRequest", | 1642 | 1645 | "StartNotebookRuntimeResponse", | | 1646 | + "StopNotebookRuntimeOperationMetadata", | | 1647 | + "StopNotebookRuntimeRequest", | | 1648 | + "StopNotebookRuntimeResponse", | 1643 | 1649 | "StopTrialRequest", | 1644 | 1650 | "StratifiedSplit", | 1645 | 1651 | "StreamDirectPredictRequest", | |
Collapse file Copy file name to clipboardExpand all lines: google/cloud/aiplatform_v1/gapic_metadata.json +15Lines changed: 15 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 3361 | 3361 | "start_notebook_runtime" | 3362 | 3362 | ] | 3363 | 3363 | }, | | 3364 | + "StopNotebookRuntime": { | | 3365 | + "methods": [ | | 3366 | + "stop_notebook_runtime" | | 3367 | + ] | | 3368 | + }, | 3364 | 3369 | "UpdateNotebookRuntimeTemplate": { | 3365 | 3370 | "methods": [ | 3366 | 3371 | "update_notebook_runtime_template" | | 3441 | 3446 | "start_notebook_runtime" | 3442 | 3447 | ] | 3443 | 3448 | }, | | 3449 | + "StopNotebookRuntime": { | | 3450 | + "methods": [ | | 3451 | + "stop_notebook_runtime" | | 3452 | + ] | | 3453 | + }, | 3444 | 3454 | "UpdateNotebookRuntimeTemplate": { | 3445 | 3455 | "methods": [ | 3446 | 3456 | "update_notebook_runtime_template" | | 3521 | 3531 | "start_notebook_runtime" | 3522 | 3532 | ] | 3523 | 3533 | }, | | 3534 | + "StopNotebookRuntime": { | | 3535 | + "methods": [ | | 3536 | + "stop_notebook_runtime" | | 3537 | + ] | | 3538 | + }, | 3524 | 3539 | "UpdateNotebookRuntimeTemplate": { | 3525 | 3540 | "methods": [ | 3526 | 3541 | "update_notebook_runtime_template" | |
Collapse file Copy file name to clipboardExpand all lines: google/cloud/aiplatform_v1/services/dataset_service/client.py +3-37Lines changed: 3 additions & 37 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -618,36 +618,6 @@ def _get_universe_domain( | 618 | 618 | raise ValueError("Universe Domain cannot be an empty string.") | 619 | 619 | return universe_domain | 620 | 620 |
| 621 | | - @staticmethod | 622 | | - def _compare_universes( | 623 | | - client_universe: str, credentials: ga_credentials.Credentials | 624 | | - ) -> bool: | 625 | | - """Returns True iff the universe domains used by the client and credentials match. | 626 | | -
| 627 | | - Args: | 628 | | - client_universe (str): The universe domain configured via the client options. | 629 | | - credentials (ga_credentials.Credentials): The credentials being used in the client. | 630 | | -
| 631 | | - Returns: | 632 | | - bool: True iff client_universe matches the universe in credentials. | 633 | | -
| 634 | | - Raises: | 635 | | - ValueError: when client_universe does not match the universe in credentials. | 636 | | - """ | 637 | | - | 638 | | - default_universe = DatasetServiceClient._DEFAULT_UNIVERSE | 639 | | - credentials_universe = getattr(credentials, "universe_domain", default_universe) | 640 | | - | 641 | | - if client_universe != credentials_universe: | 642 | | - raise ValueError( | 643 | | - "The configured universe domain " | 644 | | - f"({client_universe}) does not match the universe domain " | 645 | | - f"found in the credentials ({credentials_universe}). " | 646 | | - "If you haven't configured the universe domain explicitly, " | 647 | | - f"`{default_universe}` is the default." | 648 | | - ) | 649 | | - return True | 650 | | - | 651 | 621 | def _validate_universe_domain(self): | 652 | 622 | """Validates client's and credentials' universe domains are consistent. | 653 | 623 |
| @@ -657,13 +627,9 @@ def _validate_universe_domain(self): | 657 | 627 | Raises: | 658 | 628 | ValueError: If the configured universe domain is not valid. | 659 | 629 | """ | 660 | | - self._is_universe_domain_valid = ( | 661 | | - self._is_universe_domain_valid | 662 | | - or DatasetServiceClient._compare_universes( | 663 | | - self.universe_domain, self.transport._credentials | 664 | | - ) | 665 | | - ) | 666 | | - return self._is_universe_domain_valid | | 630 | + | | 631 | + # NOTE (b/349488459): universe validation is disabled until further notice. | | 632 | + return True | 667 | 633 |
| 668 | 634 | @property | 669 | 635 | def api_endpoint(self): | |
Collapse file Copy file name to clipboardExpand all lines: google/cloud/aiplatform_v1/services/deployment_resource_pool_service/client.py +3-37Lines changed: 3 additions & 37 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -565,36 +565,6 @@ def _get_universe_domain( | 565 | 565 | raise ValueError("Universe Domain cannot be an empty string.") | 566 | 566 | return universe_domain | 567 | 567 |
| 568 | | - @staticmethod | 569 | | - def _compare_universes( | 570 | | - client_universe: str, credentials: ga_credentials.Credentials | 571 | | - ) -> bool: | 572 | | - """Returns True iff the universe domains used by the client and credentials match. | 573 | | -
| 574 | | - Args: | 575 | | - client_universe (str): The universe domain configured via the client options. | 576 | | - credentials (ga_credentials.Credentials): The credentials being used in the client. | 577 | | -
| 578 | | - Returns: | 579 | | - bool: True iff client_universe matches the universe in credentials. | 580 | | -
| 581 | | - Raises: | 582 | | - ValueError: when client_universe does not match the universe in credentials. | 583 | | - """ | 584 | | - | 585 | | - default_universe = DeploymentResourcePoolServiceClient._DEFAULT_UNIVERSE | 586 | | - credentials_universe = getattr(credentials, "universe_domain", default_universe) | 587 | | - | 588 | | - if client_universe != credentials_universe: | 589 | | - raise ValueError( | 590 | | - "The configured universe domain " | 591 | | - f"({client_universe}) does not match the universe domain " | 592 | | - f"found in the credentials ({credentials_universe}). " | 593 | | - "If you haven't configured the universe domain explicitly, " | 594 | | - f"`{default_universe}` is the default." | 595 | | - ) | 596 | | - return True | 597 | | - | 598 | 568 | def _validate_universe_domain(self): | 599 | 569 | """Validates client's and credentials' universe domains are consistent. | 600 | 570 |
| @@ -604,13 +574,9 @@ def _validate_universe_domain(self): | 604 | 574 | Raises: | 605 | 575 | ValueError: If the configured universe domain is not valid. | 606 | 576 | """ | 607 | | - self._is_universe_domain_valid = ( | 608 | | - self._is_universe_domain_valid | 609 | | - or DeploymentResourcePoolServiceClient._compare_universes( | 610 | | - self.universe_domain, self.transport._credentials | 611 | | - ) | 612 | | - ) | 613 | | - return self._is_universe_domain_valid | | 577 | + | | 578 | + # NOTE (b/349488459): universe validation is disabled until further notice. | | 579 | + return True | 614 | 580 |
| 615 | 581 | @property | 616 | 582 | def api_endpoint(self): | |
Collapse file Copy file name to clipboardExpand all lines: google/cloud/aiplatform_v1/services/endpoint_service/client.py +3-37Lines changed: 3 additions & 37 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -595,36 +595,6 @@ def _get_universe_domain( | 595 | 595 | raise ValueError("Universe Domain cannot be an empty string.") | 596 | 596 | return universe_domain | 597 | 597 |
| 598 | | - @staticmethod | 599 | | - def _compare_universes( | 600 | | - client_universe: str, credentials: ga_credentials.Credentials | 601 | | - ) -> bool: | 602 | | - """Returns True iff the universe domains used by the client and credentials match. | 603 | | -
| 604 | | - Args: | 605 | | - client_universe (str): The universe domain configured via the client options. | 606 | | - credentials (ga_credentials.Credentials): The credentials being used in the client. | 607 | | -
| 608 | | - Returns: | 609 | | - bool: True iff client_universe matches the universe in credentials. | 610 | | -
| 611 | | - Raises: | 612 | | - ValueError: when client_universe does not match the universe in credentials. | 613 | | - """ | 614 | | - | 615 | | - default_universe = EndpointServiceClient._DEFAULT_UNIVERSE | 616 | | - credentials_universe = getattr(credentials, "universe_domain", default_universe) | 617 | | - | 618 | | - if client_universe != credentials_universe: | 619 | | - raise ValueError( | 620 | | - "The configured universe domain " | 621 | | - f"({client_universe}) does not match the universe domain " | 622 | | - f"found in the credentials ({credentials_universe}). " | 623 | | - "If you haven't configured the universe domain explicitly, " | 624 | | - f"`{default_universe}` is the default." | 625 | | - ) | 626 | | - return True | 627 | | - | 628 | 598 | def _validate_universe_domain(self): | 629 | 599 | """Validates client's and credentials' universe domains are consistent. | 630 | 600 |
| @@ -634,13 +604,9 @@ def _validate_universe_domain(self): | 634 | 604 | Raises: | 635 | 605 | ValueError: If the configured universe domain is not valid. | 636 | 606 | """ | 637 | | - self._is_universe_domain_valid = ( | 638 | | - self._is_universe_domain_valid | 639 | | - or EndpointServiceClient._compare_universes( | 640 | | - self.universe_domain, self.transport._credentials | 641 | | - ) | 642 | | - ) | 643 | | - return self._is_universe_domain_valid | | 607 | + | | 608 | + # NOTE (b/349488459): universe validation is disabled until further notice. | | 609 | + return True | 644 | 610 |
| 645 | 611 | @property | 646 | 612 | def api_endpoint(self): | |
Collapse file Copy file name to clipboardExpand all lines: google/cloud/aiplatform_v1/services/evaluation_service/client.py +3-37Lines changed: 3 additions & 37 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -455,36 +455,6 @@ def _get_universe_domain( | 455 | 455 | raise ValueError("Universe Domain cannot be an empty string.") | 456 | 456 | return universe_domain | 457 | 457 |
| 458 | | - @staticmethod | 459 | | - def _compare_universes( | 460 | | - client_universe: str, credentials: ga_credentials.Credentials | 461 | | - ) -> bool: | 462 | | - """Returns True iff the universe domains used by the client and credentials match. | 463 | | -
| 464 | | - Args: | 465 | | - client_universe (str): The universe domain configured via the client options. | 466 | | - credentials (ga_credentials.Credentials): The credentials being used in the client. | 467 | | -
| 468 | | - Returns: | 469 | | - bool: True iff client_universe matches the universe in credentials. | 470 | | -
| 471 | | - Raises: | 472 | | - ValueError: when client_universe does not match the universe in credentials. | 473 | | - """ | 474 | | - | 475 | | - default_universe = EvaluationServiceClient._DEFAULT_UNIVERSE | 476 | | - credentials_universe = getattr(credentials, "universe_domain", default_universe) | 477 | | - | 478 | | - if client_universe != credentials_universe: | 479 | | - raise ValueError( | 480 | | - "The configured universe domain " | 481 | | - f"({client_universe}) does not match the universe domain " | 482 | | - f"found in the credentials ({credentials_universe}). " | 483 | | - "If you haven't configured the universe domain explicitly, " | 484 | | - f"`{default_universe}` is the default." | 485 | | - ) | 486 | | - return True | 487 | | - | 488 | 458 | def _validate_universe_domain(self): | 489 | 459 | """Validates client's and credentials' universe domains are consistent. | 490 | 460 |
| @@ -494,13 +464,9 @@ def _validate_universe_domain(self): | 494 | 464 | Raises: | 495 | 465 | ValueError: If the configured universe domain is not valid. | 496 | 466 | """ | 497 | | - self._is_universe_domain_valid = ( | 498 | | - self._is_universe_domain_valid | 499 | | - or EvaluationServiceClient._compare_universes( | 500 | | - self.universe_domain, self.transport._credentials | 501 | | - ) | 502 | | - ) | 503 | | - return self._is_universe_domain_valid | | 467 | + | | 468 | + # NOTE (b/349488459): universe validation is disabled until further notice. | | 469 | + return True | 504 | 470 |
| 505 | 471 | @property | 506 | 472 | def api_endpoint(self): | |
Collapse file Copy file name to clipboardExpand all lines: google/cloud/aiplatform_v1/services/feature_online_store_admin_service/client.py +3-37Lines changed: 3 additions & 37 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -559,36 +559,6 @@ def _get_universe_domain( | 559 | 559 | raise ValueError("Universe Domain cannot be an empty string.") | 560 | 560 | return universe_domain | 561 | 561 |
| 562 | | - @staticmethod | 563 | | - def _compare_universes( | 564 | | - client_universe: str, credentials: ga_credentials.Credentials | 565 | | - ) -> bool: | 566 | | - """Returns True iff the universe domains used by the client and credentials match. | 567 | | -
| 568 | | - Args: | 569 | | - client_universe (str): The universe domain configured via the client options. | 570 | | - credentials (ga_credentials.Credentials): The credentials being used in the client. | 571 | | -
| 572 | | - Returns: | 573 | | - bool: True iff client_universe matches the universe in credentials. | 574 | | -
| 575 | | - Raises: | 576 | | - ValueError: when client_universe does not match the universe in credentials. | 577 | | - """ | 578 | | - | 579 | | - default_universe = FeatureOnlineStoreAdminServiceClient._DEFAULT_UNIVERSE | 580 | | - credentials_universe = getattr(credentials, "universe_domain", default_universe) | 581 | | - | 582 | | - if client_universe != credentials_universe: | 583 | | - raise ValueError( | 584 | | - "The configured universe domain " | 585 | | - f"({client_universe}) does not match the universe domain " | 586 | | - f"found in the credentials ({credentials_universe}). " | 587 | | - "If you haven't configured the universe domain explicitly, " | 588 | | - f"`{default_universe}` is the default." | 589 | | - ) | 590 | | - return True | 591 | | - | 592 | 562 | def _validate_universe_domain(self): | 593 | 563 | """Validates client's and credentials' universe domains are consistent. | 594 | 564 |
| @@ -598,13 +568,9 @@ def _validate_universe_domain(self): | 598 | 568 | Raises: | 599 | 569 | ValueError: If the configured universe domain is not valid. | 600 | 570 | """ | 601 | | - self._is_universe_domain_valid = ( | 602 | | - self._is_universe_domain_valid | 603 | | - or FeatureOnlineStoreAdminServiceClient._compare_universes( | 604 | | - self.universe_domain, self.transport._credentials | 605 | | - ) | 606 | | - ) | 607 | | - return self._is_universe_domain_valid | | 571 | + | | 572 | + # NOTE (b/349488459): universe validation is disabled until further notice. | | 573 | + return True | 608 | 574 |
| 609 | 575 | @property | 610 | 576 | def api_endpoint(self): | |
Collapse file Copy file name to clipboardExpand all lines: google/cloud/aiplatform_v1/services/feature_online_store_service/client.py +3-37Lines changed: 3 additions & 37 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -484,36 +484,6 @@ def _get_universe_domain( | 484 | 484 | raise ValueError("Universe Domain cannot be an empty string.") | 485 | 485 | return universe_domain | 486 | 486 |
| 487 | | - @staticmethod | 488 | | - def _compare_universes( | 489 | | - client_universe: str, credentials: ga_credentials.Credentials | 490 | | - ) -> bool: | 491 | | - """Returns True iff the universe domains used by the client and credentials match. | 492 | | -
| 493 | | - Args: | 494 | | - client_universe (str): The universe domain configured via the client options. | 495 | | - credentials (ga_credentials.Credentials): The credentials being used in the client. | 496 | | -
| 497 | | - Returns: | 498 | | - bool: True iff client_universe matches the universe in credentials. | 499 | | -
| 500 | | - Raises: | 501 | | - ValueError: when client_universe does not match the universe in credentials. | 502 | | - """ | 503 | | - | 504 | | - default_universe = FeatureOnlineStoreServiceClient._DEFAULT_UNIVERSE | 505 | | - credentials_universe = getattr(credentials, "universe_domain", default_universe) | 506 | | - | 507 | | - if client_universe != credentials_universe: | 508 | | - raise ValueError( | 509 | | - "The configured universe domain " | 510 | | - f"({client_universe}) does not match the universe domain " | 511 | | - f"found in the credentials ({credentials_universe}). " | 512 | | - "If you haven't configured the universe domain explicitly, " | 513 | | - f"`{default_universe}` is the default." | 514 | | - ) | 515 | | - return True | 516 | | - | 517 | 487 | def _validate_universe_domain(self): | 518 | 488 | """Validates client's and credentials' universe domains are consistent. | 519 | 489 |
| @@ -523,13 +493,9 @@ def _validate_universe_domain(self): | 523 | 493 | Raises: | 524 | 494 | ValueError: If the configured universe domain is not valid. | 525 | 495 | """ | 526 | | - self._is_universe_domain_valid = ( | 527 | | - self._is_universe_domain_valid | 528 | | - or FeatureOnlineStoreServiceClient._compare_universes( | 529 | | - self.universe_domain, self.transport._credentials | 530 | | - ) | 531 | | - ) | 532 | | - return self._is_universe_domain_valid | | 496 | + | | 497 | + # NOTE (b/349488459): universe validation is disabled until further notice. | | 498 | + return True | 533 | 499 |
| 534 | 500 | @property | 535 | 501 | def api_endpoint(self): | |
|