Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
176 commits
Select commit Hold shift + click to select a range
a1dd1fc
Add `network` to SDK initializer
vinnysenthil Dec 20, 2021
1a3e1c8
Merge branch 'main' into private-ep
vinnysenthil Dec 20, 2021
0f597e0
Add urllib3 to library requirements
vinnysenthil Dec 20, 2021
bbb56fd
Fix network init() docstrings
vinnysenthil Dec 23, 2021
27e7ac6
Merge branch 'main' into private-ep
vinnysenthil Feb 15, 2022
e78e5e5
Merge branch 'main' into private-ep
vinnysenthil Feb 22, 2022
7476c10
Update Model/Endpoint docs to use top namespace
vinnysenthil Feb 22, 2022
6ad46dd
Add core Private Endpoint wrapper
vinnysenthil Feb 23, 2022
b8126e0
Drop logs, add URI props
vinnysenthil Feb 23, 2022
f43ab4e
Lint, update typing for Prediction class
vinnysenthil Feb 23, 2022
7c150d4
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Feb 23, 2022
e84761a
Add bug refs, test stubs, minor fixes
vinnysenthil Feb 25, 2022
31ac84e
Merge branch 'private-ep' of github.com:googleapis/python-aiplatform …
vinnysenthil Feb 25, 2022
4dc3c6e
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Feb 25, 2022
c14c5f6
Merge branch 'main' into private-ep
nayaknishant Mar 14, 2022
db589c4
test commit
nayaknishant Mar 22, 2022
f598f02
adding examples, slight changes
nayaknishant Mar 24, 2022
dfc897d
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Mar 24, 2022
80714b6
adding deployed model check:
nayaknishant Mar 29, 2022
2ab5ad5
Merge branch 'private-ep' of https://github.com/googleapis/python-aip…
nayaknishant Mar 29, 2022
2425261
adding deployed model check
nayaknishant Mar 29, 2022
a5bec23
minor changes, adding error catching for explanations
nayaknishant Mar 29, 2022
ddb8cce
testing to get other fields
nayaknishant Mar 30, 2022
9c44b1c
removing edge case
nayaknishant Mar 30, 2022
7c8687a
adding print statement for debugging explain
nayaknishant Mar 31, 2022
4f2b0a1
using GET instead of POST for explain
nayaknishant Apr 1, 2022
fe1e452
using GET instead of POST for explain
nayaknishant Apr 1, 2022
07e6bfd
using GET instead of POST for explain
nayaknishant Apr 1, 2022
fc47135
removing explain for now, adding model id
nayaknishant Apr 4, 2022
8b59894
removing explain for now, adding model id
nayaknishant Apr 4, 2022
6b96c2a
removing explain for now, adding model id
nayaknishant Apr 4, 2022
160c499
cleaned and added docstrings
nayaknishant Apr 5, 2022
c7034ed
Merge branch 'main' into private-ep
nayaknishant Apr 6, 2022
bc9cc8d
Merge branch 'main' into private-ep
nayaknishant Apr 6, 2022
e1ce3a4
adding explain back
nayaknishant Apr 7, 2022
9f2d478
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 7, 2022
f46a555
removing explain until working
nayaknishant Apr 7, 2022
a552c36
removing explain until working
nayaknishant Apr 7, 2022
9c47d74
cleaning up docstrings
nayaknishant Apr 8, 2022
6d80cf0
create test done, working on predict
nayaknishant Apr 12, 2022
f95cd29
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 12, 2022
f3c77e5
added unit tests for PrivateEndpoint
nayaknishant Apr 14, 2022
4aad876
added unit tests for PrivateEndpoint
nayaknishant Apr 14, 2022
2a17700
Merge branch 'main' into private-ep
nayaknishant Apr 14, 2022
ee1102a
test debugging
nayaknishant Apr 19, 2022
7413bf8
Merge branch 'private-ep' of https://github.com/googleapis/python-aip…
nayaknishant Apr 19, 2022
ce11faf
fixing unit tests
nayaknishant Apr 19, 2022
5639ed7
adding fixes
nayaknishant Apr 19, 2022
c50954f
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 19, 2022
fe737d8
formatting encryption_spec_key_name
nayaknishant Apr 19, 2022
107c23e
formatting encryption_spec_key_name
nayaknishant Apr 19, 2022
547aba9
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 19, 2022
e69176a
Merge branch 'main' into private-ep
nayaknishant Apr 20, 2022
a2c8387
fixing comments
nayaknishant Apr 20, 2022
a23523c
adjusting traffic for private endpoint
nayaknishant Apr 20, 2022
af4eabb
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 20, 2022
6e7fd56
adjusting traffic for private endpoint
nayaknishant Apr 20, 2022
7bfc060
adjusting traffic for private endpoint
nayaknishant Apr 20, 2022
dfe532d
adjusting traffic for private endpoint
nayaknishant Apr 20, 2022
4f42cc6
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 20, 2022
0b81035
Merge branch 'main' into private-ep
nayaknishant Apr 21, 2022
f7e64f5
adding fixes
nayaknishant Apr 21, 2022
3ac68ec
Merge branch 'private-ep' of https://github.com/googleapis/python-aip…
nayaknishant Apr 21, 2022
c8b142a
Merge branch 'main' into private-ep
nayaknishant Apr 22, 2022
7522b7a
added delete for private Endpoint
nayaknishant Apr 26, 2022
c6dcfca
Merge branch 'private-ep' of https://github.com/googleapis/python-aip…
nayaknishant Apr 26, 2022
5cc299f
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 26, 2022
a5dc678
Merge branch 'main' into private-ep
nayaknishant Apr 27, 2022
d1c3293
fixing traffic percentage
nayaknishant Apr 27, 2022
e40e53d
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 27, 2022
c26363e
using network instead of class, moving exceptions
nayaknishant Apr 29, 2022
0876b0d
Merge branch 'private-ep' of https://github.com/googleapis/python-aip…
nayaknishant Apr 29, 2022
ade4817
Merge branch 'main' into private-ep
nayaknishant Apr 29, 2022
45c6794
cleaning up docstrings
nayaknishant May 2, 2022
1aab058
adding fixes, delete testing
nayaknishant May 3, 2022
d59a922
Merge branch 'main' of https://github.com/googleapis/python-aiplatfor…
nayaknishant May 3, 2022
b8185ae
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 3, 2022
05ff612
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 3, 2022
4b5bc05
Merge branch 'private-ep' of https://github.com/googleapis/python-aip…
gcf-owl-bot[bot] May 3, 2022
b177cfd
adding fixes
nayaknishant May 4, 2022
daeb49c
adding fixes
nayaknishant May 4, 2022
f5b51ac
adding Raises section to private Endpoint docstrings
nayaknishant May 4, 2022
7151277
added private Endpoint check in init, added to testing
nayaknishant May 5, 2022
b0df987
added private Endpoint check in init, added to testing
nayaknishant May 5, 2022
9ac1aec
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 5, 2022
67ee082
adding try/except inside functions, fixing tests, misc fixes
nayaknishant May 6, 2022
a05018b
adding try/except inside functions, fixing tests, misc fixes
nayaknishant May 6, 2022
d822781
Merge branch 'main' into private-ep
nayaknishant May 6, 2022
8de58a9
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 6, 2022
8f58616
fixes to setup.py
nayaknishant May 6, 2022
d54d8a0
fixes to setup.py
nayaknishant May 6, 2022
80f5f92
Merge branch 'main' into private-ep
nayaknishant May 9, 2022
881d7b7
reverting _validate_deploy_args method
nayaknishant May 9, 2022
b6977f2
Merge branch 'private-ep' of https://github.com/googleapis/python-aip…
nayaknishant May 9, 2022
bceef11
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 9, 2022
90aa205
fixed type hint
nayaknishant May 9, 2022
eb76531
Merge branch 'private-ep' of https://github.com/googleapis/python-aip…
nayaknishant May 9, 2022
90cc453
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 9, 2022
f8bf846
lint issue
nayaknishant May 10, 2022
7e93bab
lint issue
nayaknishant May 10, 2022
1cd43ba
lint issue
nayaknishant May 10, 2022
d626b15
Merge branch 'main' into private-ep
nayaknishant May 10, 2022
849189f
merging in main
nayaknishant May 19, 2022
ce90514
adding system tests
nayaknishant May 31, 2022
fa40d4d
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 31, 2022
dd9d5f8
merging in changes
nayaknishant Jun 1, 2022
3119032
Merge branch 'private-ep' of https://github.com/googleapis/python-aip…
nayaknishant Jun 1, 2022
24f3f74
adding system test changes
nayaknishant Jun 1, 2022
f1be948
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Jun 1, 2022
4abb639
adding shared_state to system test
nayaknishant Jun 3, 2022
bd84969
adding shared_state to system test
nayaknishant Jun 3, 2022
0287e22
adding changes from main in __init__
nayaknishant Jun 3, 2022
66a02d6
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Jun 3, 2022
162eefd
Merge branch 'private-ep' of https://github.com/googleapis/python-aip…
gcf-owl-bot[bot] Jun 3, 2022
356c194
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Jun 3, 2022
33cfa55
Merge branch 'private-ep' of https://github.com/googleapis/python-aip…
gcf-owl-bot[bot] Jun 3, 2022
ba62506
trying outside import
nayaknishant Jun 7, 2022
055d626
Merge branch 'private-ep' of https://github.com/googleapis/python-aip…
nayaknishant Jun 7, 2022
add3ec1
putting imports back inside
nayaknishant Jun 7, 2022
ebd8710
added system test changes
nayaknishant Jun 9, 2022
d1f3e95
added system test changes
nayaknishant Jun 9, 2022
54e12cd
Merge branch 'main' into private-ep
nayaknishant Jun 9, 2022
0e72808
Merge branch 'main' of https://github.com/googleapis/python-aiplatfor…
nayaknishant Jun 9, 2022
ca85cb5
Merge branch 'private-ep' of https://github.com/googleapis/python-aip…
nayaknishant Jun 9, 2022
29dd677
Merge branch 'main' of https://github.com/googleapis/python-aiplatfor…
nayaknishant Jun 10, 2022
595407a
adding fixes
nayaknishant Jun 10, 2022
e3f2686
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Jun 10, 2022
6a00212
fixing system test and init fixes
nayaknishant Jun 13, 2022
5b2fae0
Merge branch 'private-ep' of https://github.com/googleapis/python-aip…
nayaknishant Jun 13, 2022
91c0d7c
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Jun 13, 2022
a9b5ec6
Merge branch 'main' into private-ep
nayaknishant Jun 13, 2022
ef05242
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Jun 13, 2022
8106652
adding fixes
nayaknishant Jun 13, 2022
71de56d
Merge branch 'private-ep' of https://github.com/googleapis/python-aip…
nayaknishant Jun 13, 2022
3db7c64
adding fixes
nayaknishant Jun 13, 2022
91b81b4
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Jun 13, 2022
4b3de6e
Merge branch 'private-ep' of https://github.com/googleapis/python-aip…
gcf-owl-bot[bot] Jun 13, 2022
2a7991b
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Jun 13, 2022
45f5348
Merge branch 'private-ep' of https://github.com/googleapis/python-aip…
gcf-owl-bot[bot] Jun 13, 2022
e96c2cd
adding fixes
nayaknishant Jun 13, 2022
44818ad
adding fixes
nayaknishant Jun 14, 2022
997a97b
Merge branch 'private-ep' of https://github.com/googleapis/python-aip…
nayaknishant Jun 14, 2022
0e646dc
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Jun 14, 2022
74ceab7
added global network arg to associated classes
nayaknishant Jun 14, 2022
1e3f921
Merge branch 'private-ep' of https://github.com/googleapis/python-aip…
nayaknishant Jun 14, 2022
b7e2168
style formatting
nayaknishant Jun 14, 2022
8de7d06
docstring fixes
nayaknishant Jun 14, 2022
6a5fabe
adding extra info to network arg docstring
nayaknishant Jun 14, 2022
15cdb50
adding extra info to network arg docstring
nayaknishant Jun 14, 2022
4e12d49
Merge branch 'main' into private-ep
nayaknishant Jun 15, 2022
64f5ee9
Merge branch 'main' of https://github.com/googleapis/python-aiplatfor…
nayaknishant Jun 15, 2022
d303e6d
Merge branch 'private-ep' of https://github.com/googleapis/python-aip…
nayaknishant Jun 15, 2022
2e6325e
removing changes to noxfile
nayaknishant Jun 15, 2022
f9253d5
reverting noxfile
nayaknishant Jun 15, 2022
75fa4d7
reverting noxfile
nayaknishant Jun 15, 2022
ffa3a40
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Jun 15, 2022
d5c0980
Merge branch 'private-ep' of https://github.com/googleapis/python-aip…
gcf-owl-bot[bot] Jun 15, 2022
63cdee3
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Jun 15, 2022
46cb018
Merge branch 'private-ep' of https://github.com/googleapis/python-aip…
gcf-owl-bot[bot] Jun 15, 2022
75713d8
reverting job files to not include global network
nayaknishant Jun 15, 2022
f699f1d
Merge branch 'private-ep' of https://github.com/googleapis/python-aip…
nayaknishant Jun 15, 2022
dbdd705
reverting initalizer to not include global network config
nayaknishant Jun 15, 2022
1566b61
removing global network config
nayaknishant Jun 15, 2022
b28f8b1
Merge branch 'main' into private-ep
sasha-gitg Jun 16, 2022
fcda7bb
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Jun 16, 2022
2f734ba
Merge branch 'main' into private-ep
nayaknishant Jun 21, 2022
ed00745
Merge branch 'main' into private-ep
nayaknishant Jun 22, 2022
b3eabc7
Merge branch 'main' of https://github.com/googleapis/python-aiplatfor…
nayaknishant Jun 23, 2022
0974ef5
added fix and test to models
nayaknishant Jun 27, 2022
6e2252c
Merge branch 'private-ep' of https://github.com/googleapis/python-aip…
nayaknishant Jun 27, 2022
220277f
added fix and test to models
nayaknishant Jun 27, 2022
9331d83
Merge branch 'main' into private-ep
nayaknishant Jun 27, 2022
66dc001
Merge branch 'main' into private-ep
nayaknishant Jun 28, 2022
ce337f6
simplifying delete method
nayaknishant Jun 28, 2022
10e1d81
Merge branch 'private-ep' of https://github.com/googleapis/python-aip…
nayaknishant Jun 28, 2022
1464d24
Merge branch 'main' into private-ep
nayaknishant Jun 28, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions google/cloud/aiplatform/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
)
from google.cloud.aiplatform import metadata
from google.cloud.aiplatform.models import Endpoint
from google.cloud.aiplatform.models import PrivateEndpoint
from google.cloud.aiplatform.models import Model
from google.cloud.aiplatform.model_evaluation import ModelEvaluation
from google.cloud.aiplatform.jobs import (
Expand Down Expand Up @@ -136,6 +137,7 @@
"Model",
"ModelEvaluation",
"PipelineJob",
"PrivateEndpoint",
"SequenceToSequencePlusForecastingTrainingJob",
"TabularDataset",
"Tensorboard",
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/aiplatform/initializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def init(
Raises:
ValueError:
If experiment_description is provided but experiment is not.
If experiment_tensorboard is provided but expeirment is not.
If experiment_tensorboard is provided but experiment is not.
"""

if experiment_description and experiment is None:
Expand Down
1,186 changes: 963 additions & 223 deletions google/cloud/aiplatform/models.py

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,25 @@
"pandas >= 1.0.0",
"pyarrow >= 6.0.1",
]
pipelines_extra_requires = [
pipelines_extra_require = [
"pyyaml>=5.3,<6",
]
datasets_extra_require = [
"pyarrow >= 3.0.0, < 8.0dev",
]
private_endpoints_extra_require = [
"urllib3 >=1.21.1, <1.27",
]
full_extra_require = list(
set(
tensorboard_extra_require
+ metadata_extra_require
+ xai_extra_require
+ lit_extra_require
+ featurestore_extra_require
+ pipelines_extra_requires
+ pipelines_extra_require
+ datasets_extra_require
+ private_endpoints_extra_require
)
)
testing_extra_require = (
Expand Down Expand Up @@ -118,7 +122,9 @@
"xai": xai_extra_require,
"lit": lit_extra_require,
"cloud_profiler": profiler_extra_require,
"pipelines": pipelines_extra_requires,
"pipelines": pipelines_extra_require,
"datasets": datasets_extra_require,
"private_endpoints": private_endpoints_extra_require,
},
python_requires=">=3.7",
classifiers=[
Expand Down
1 change: 0 additions & 1 deletion tests/system/aiplatform/e2e_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ def tear_down_resources(self, shared_state: Dict[str, Any]):
yield

# TODO(b/218310362): Add resource deletion system tests

# Bring all Endpoints to the front of the list
# Ensures Models are undeployed first before we attempt deletion
shared_state["resources"].sort(
Expand Down
69 changes: 69 additions & 0 deletions tests/system/aiplatform/test_private_endpoint.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# -*- coding: utf-8 -*-

# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
import pytest

from google.cloud import aiplatform

from tests.system.aiplatform import e2e_base

# permanent_custom_mnist_model
_MODEL_ID = "6430031960164270080"
_PRIVATE_ENDPOINT_NETWORK = "projects/580378083368/global/networks/private-endpoint-vpc"


@pytest.mark.usefixtures("tear_down_resources")
class TestPrivateEndpoint(e2e_base.TestEndToEnd):

_temp_prefix = "temp_vertex_sdk_e2e"

def test_create_deploy_delete_private_endpoint(self, shared_state):
# Collection of resources generated by this test, to be deleted during teardown
shared_state["resources"] = []

aiplatform.init(
project=e2e_base._PROJECT,
location=e2e_base._LOCATION,
)

private_endpoint = aiplatform.PrivateEndpoint.create(
display_name=self._make_display_name("private_endpoint_test"),
network=_PRIVATE_ENDPOINT_NETWORK,
)
shared_state["resources"].append(private_endpoint)

# Verify that the retrieved private Endpoint is the same
my_private_endpoint = aiplatform.PrivateEndpoint(
endpoint_name=private_endpoint.resource_name
)
assert private_endpoint.resource_name == my_private_endpoint.resource_name
assert private_endpoint.display_name == my_private_endpoint.display_name

# Verify the endpoint is in the private Endpoint list
list_private_endpoint = aiplatform.PrivateEndpoint.list()
assert private_endpoint.resource_name in [
private_endpoint.resource_name for private_endpoint in list_private_endpoint
]

# Retrieve permanent model, deploy to private Endpoint, then undeploy
my_model = aiplatform.Model(model_name=_MODEL_ID)

my_private_endpoint.deploy(model=my_model)
assert my_private_endpoint._gca_resource.deployed_models

deployed_model_id = my_private_endpoint.list_models()[0].id
my_private_endpoint.undeploy(deployed_model_id=deployed_model_id)
assert not my_private_endpoint._gca_resource.deployed_models
Loading