Skip to content

Commit 794cedd

Browse files
vertex-sdk-botcopybara-github
authored andcommitted
feat: adding enable_access_logging parameter to Endpoint.deploy() method, minor edit to batch_predict() docstring
PiperOrigin-RevId: 530713908
1 parent 9eb2c99 commit 794cedd

File tree

25 files changed

+44
-43
lines changed

25 files changed

+44
-43
lines changed

.release-please-manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.25.0"
2+
".": "1.24.1"
33
}

CHANGELOG.md

-18
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,6 @@
11
# Changelog
22

33

4-
## [1.25.0](https://github.com/googleapis/python-aiplatform/compare/v1.24.1...v1.25.0) (2023-05-09)
5-
6-
7-
### Features
8-
9-
* Add support for Large Language Models ([866c6aa](https://github.com/googleapis/python-aiplatform/commit/866c6aaf72b9a7a5f6155665f574cc11cf8075f4))
10-
* Add default TensorBoard support. ([fa7d3a0](https://github.com/googleapis/python-aiplatform/commit/fa7d3a0e3cd5040eb4ab1c3b0df4e494dc84bac3))
11-
* Add support for find_neighbors/read_index_datapoints in matching engine public endpoint ([e3a87f0](https://github.com/googleapis/python-aiplatform/commit/e3a87f04abf013341fe4f655b96405e27228ffdb))
12-
* Added the new root `vertexai` package ([fbd03b1](https://github.com/googleapis/python-aiplatform/commit/fbd03b15e9b71cbeeaebc868745a36c892b55c8f))
13-
14-
15-
### Bug Fixes
16-
17-
* EntityType RPC update returns the updated EntityType - not an LRO. ([8f9c714](https://github.com/googleapis/python-aiplatform/commit/8f9c7144c152e105924d87abb30aa734af376486))
18-
* Fix default AutoML Forecasting transformations list. ([77b89c0](https://github.com/googleapis/python-aiplatform/commit/77b89c0151ce3647b8fac8f4e8b6a7f7c07a1192))
19-
* Fix type hints for `Prediction.predictions`. ([56518f1](https://github.com/googleapis/python-aiplatform/commit/56518f166215761354aba43d78301a11d198daf5))
20-
* Removed parameter Resume, due to causing confusion and errors. ([c82e0b5](https://github.com/googleapis/python-aiplatform/commit/c82e0b5fb74fe9ba15f9d0f14a441349499ee257))
21-
224
## [1.24.1](https://github.com/googleapis/python-aiplatform/compare/v1.24.0...v1.24.1) (2023-04-21)
235

246

google/cloud/aiplatform/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.25.0" # {x-release-please-version}
16+
__version__ = "1.24.1" # {x-release-please-version}

google/cloud/aiplatform/models.py

+21-2
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,7 @@ def deploy(
753753
deploy_request_timeout: Optional[float] = None,
754754
autoscaling_target_cpu_utilization: Optional[int] = None,
755755
autoscaling_target_accelerator_duty_cycle: Optional[int] = None,
756+
enable_access_logging=False,
756757
) -> None:
757758
"""Deploys a Model to the Endpoint.
758759
@@ -833,6 +834,8 @@ def deploy(
833834
Target Accelerator Duty Cycle.
834835
Must also set accelerator_type and accelerator_count if specified.
835836
A default value of 60 will be used if not specified.
837+
enable_access_logging (bool):
838+
Whether to enable endpoint access logging. Defaults to False.
836839
"""
837840
self._sync_gca_resource_if_skipped()
838841

@@ -867,6 +870,7 @@ def deploy(
867870
deploy_request_timeout=deploy_request_timeout,
868871
autoscaling_target_cpu_utilization=autoscaling_target_cpu_utilization,
869872
autoscaling_target_accelerator_duty_cycle=autoscaling_target_accelerator_duty_cycle,
873+
enable_access_logging=enable_access_logging,
870874
)
871875

872876
@base.optional_sync()
@@ -888,6 +892,7 @@ def _deploy(
888892
deploy_request_timeout: Optional[float] = None,
889893
autoscaling_target_cpu_utilization: Optional[int] = None,
890894
autoscaling_target_accelerator_duty_cycle: Optional[int] = None,
895+
enable_access_logging=False,
891896
) -> None:
892897
"""Deploys a Model to the Endpoint.
893898
@@ -962,6 +967,8 @@ def _deploy(
962967
Target Accelerator Duty Cycle.
963968
Must also set accelerator_type and accelerator_count if specified.
964969
A default value of 60 will be used if not specified.
970+
enable_access_logging (bool):
971+
Whether to enable endpoint access logging. Defaults to False.
965972
"""
966973
_LOGGER.log_action_start_against_resource(
967974
f"Deploying Model {model.resource_name} to", "", self
@@ -987,6 +994,7 @@ def _deploy(
987994
deploy_request_timeout=deploy_request_timeout,
988995
autoscaling_target_cpu_utilization=autoscaling_target_cpu_utilization,
989996
autoscaling_target_accelerator_duty_cycle=autoscaling_target_accelerator_duty_cycle,
997+
enable_access_logging=enable_access_logging,
990998
)
991999

9921000
_LOGGER.log_action_completed_against_resource("model", "deployed", self)
@@ -1015,6 +1023,7 @@ def _deploy_call(
10151023
deploy_request_timeout: Optional[float] = None,
10161024
autoscaling_target_cpu_utilization: Optional[int] = None,
10171025
autoscaling_target_accelerator_duty_cycle: Optional[int] = None,
1026+
enable_access_logging=False,
10181027
) -> None:
10191028
"""Helper method to deploy model to endpoint.
10201029
@@ -1095,6 +1104,8 @@ def _deploy_call(
10951104
Optional. Target Accelerator Duty Cycle.
10961105
Must also set accelerator_type and accelerator_count if specified.
10971106
A default value of 60 will be used if not specified.
1107+
enable_access_logging (bool):
1108+
Whether to enable endpoint access logging. Defaults to False.
10981109
10991110
Raises:
11001111
ValueError: If only `accelerator_type` or `accelerator_count` is specified.
@@ -1122,6 +1133,7 @@ def _deploy_call(
11221133
model=model.versioned_resource_name,
11231134
display_name=deployed_model_display_name,
11241135
service_account=service_account,
1136+
enable_access_logging=enable_access_logging,
11251137
)
11261138

11271139
supports_automatic_resources = (
@@ -3192,6 +3204,7 @@ def deploy(
31923204
deploy_request_timeout: Optional[float] = None,
31933205
autoscaling_target_cpu_utilization: Optional[int] = None,
31943206
autoscaling_target_accelerator_duty_cycle: Optional[int] = None,
3207+
enable_access_logging=False,
31953208
) -> Union[Endpoint, PrivateEndpoint]:
31963209
"""Deploys model to endpoint. Endpoint will be created if unspecified.
31973210
@@ -3290,6 +3303,8 @@ def deploy(
32903303
Optional. Target Accelerator Duty Cycle.
32913304
Must also set accelerator_type and accelerator_count if specified.
32923305
A default value of 60 will be used if not specified.
3306+
enable_access_logging (bool):
3307+
Whether to enable endpoint access logging. Defaults to False.
32933308
32943309
Returns:
32953310
endpoint (Union[Endpoint, PrivateEndpoint]):
@@ -3342,6 +3357,7 @@ def deploy(
33423357
deploy_request_timeout=deploy_request_timeout,
33433358
autoscaling_target_cpu_utilization=autoscaling_target_cpu_utilization,
33443359
autoscaling_target_accelerator_duty_cycle=autoscaling_target_accelerator_duty_cycle,
3360+
enable_access_logging=enable_access_logging,
33453361
)
33463362

33473363
@base.optional_sync(return_input_arg="endpoint", bind_future_to_self=False)
@@ -3365,6 +3381,7 @@ def _deploy(
33653381
deploy_request_timeout: Optional[float] = None,
33663382
autoscaling_target_cpu_utilization: Optional[int] = None,
33673383
autoscaling_target_accelerator_duty_cycle: Optional[int] = None,
3384+
enable_access_logging=False,
33683385
) -> Union[Endpoint, PrivateEndpoint]:
33693386
"""Deploys model to endpoint. Endpoint will be created if unspecified.
33703387
@@ -3456,6 +3473,8 @@ def _deploy(
34563473
Optional. Target Accelerator Duty Cycle.
34573474
Must also set accelerator_type and accelerator_count if specified.
34583475
A default value of 60 will be used if not specified.
3476+
enable_access_logging (bool):
3477+
Whether to enable endpoint access logging. Defaults to False.
34593478
34603479
Returns:
34613480
endpoint (Union[Endpoint, PrivateEndpoint]):
@@ -3505,6 +3524,7 @@ def _deploy(
35053524
deploy_request_timeout=deploy_request_timeout,
35063525
autoscaling_target_cpu_utilization=autoscaling_target_cpu_utilization,
35073526
autoscaling_target_accelerator_duty_cycle=autoscaling_target_accelerator_duty_cycle,
3527+
enable_access_logging=enable_access_logging,
35083528
)
35093529

35103530
_LOGGER.log_action_completed_against_resource("model", "deployed", endpoint)
@@ -3597,8 +3617,7 @@ def batch_predict(
35973617
When only the project is specified, the Dataset and Table is created.
35983618
When the full table reference is specified, the Dataset must exist and
35993619
table must not exist. Accepted forms: ``bq://projectId`` or
3600-
``bq://projectId.bqDatasetId`` or
3601-
``bq://projectId.bqDatasetId.bqTableId``. If no Dataset is specified,
3620+
``bq://projectId.bqDatasetId``. If no Dataset is specified,
36023621
a new one is created with the name
36033622
``prediction_<model-display-name>_<job-create-time>``
36043623
where the table name is made BigQuery-dataset-name compatible

google/cloud/aiplatform/v1/schema/predict/instance/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.25.0" # {x-release-please-version}
16+
__version__ = "1.24.1" # {x-release-please-version}

google/cloud/aiplatform/v1/schema/predict/instance_v1/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.25.0" # {x-release-please-version}
16+
__version__ = "1.24.1" # {x-release-please-version}

google/cloud/aiplatform/v1/schema/predict/params/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.25.0" # {x-release-please-version}
16+
__version__ = "1.24.1" # {x-release-please-version}

google/cloud/aiplatform/v1/schema/predict/params_v1/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.25.0" # {x-release-please-version}
16+
__version__ = "1.24.1" # {x-release-please-version}

google/cloud/aiplatform/v1/schema/predict/prediction/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.25.0" # {x-release-please-version}
16+
__version__ = "1.24.1" # {x-release-please-version}

google/cloud/aiplatform/v1/schema/predict/prediction_v1/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.25.0" # {x-release-please-version}
16+
__version__ = "1.24.1" # {x-release-please-version}

google/cloud/aiplatform/v1/schema/trainingjob/definition/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.25.0" # {x-release-please-version}
16+
__version__ = "1.24.1" # {x-release-please-version}

google/cloud/aiplatform/v1/schema/trainingjob/definition_v1/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.25.0" # {x-release-please-version}
16+
__version__ = "1.24.1" # {x-release-please-version}

google/cloud/aiplatform/v1beta1/schema/predict/instance/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.25.0" # {x-release-please-version}
16+
__version__ = "1.24.1" # {x-release-please-version}

google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.25.0" # {x-release-please-version}
16+
__version__ = "1.24.1" # {x-release-please-version}

google/cloud/aiplatform/v1beta1/schema/predict/params/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.25.0" # {x-release-please-version}
16+
__version__ = "1.24.1" # {x-release-please-version}

google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.25.0" # {x-release-please-version}
16+
__version__ = "1.24.1" # {x-release-please-version}

google/cloud/aiplatform/v1beta1/schema/predict/prediction/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.25.0" # {x-release-please-version}
16+
__version__ = "1.24.1" # {x-release-please-version}

google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.25.0" # {x-release-please-version}
16+
__version__ = "1.24.1" # {x-release-please-version}

google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.25.0" # {x-release-please-version}
16+
__version__ = "1.24.1" # {x-release-please-version}

google/cloud/aiplatform/v1beta1/schema/trainingjob/definition_v1beta1/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.25.0" # {x-release-please-version}
16+
__version__ = "1.24.1" # {x-release-please-version}

google/cloud/aiplatform/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
# limitations under the License.
1616
#
1717

18-
__version__ = "1.25.0"
18+
__version__ = "1.24.1"

google/cloud/aiplatform_v1/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.25.0" # {x-release-please-version}
16+
__version__ = "1.24.1" # {x-release-please-version}

google/cloud/aiplatform_v1beta1/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.25.0" # {x-release-please-version}
16+
__version__ = "1.24.1" # {x-release-please-version}

samples/generated_samples/snippet_metadata_google.cloud.aiplatform.v1.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-aiplatform",
11-
"version": "1.25.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

samples/generated_samples/snippet_metadata_google.cloud.aiplatform.v1beta1.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-aiplatform",
11-
"version": "1.25.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

0 commit comments

Comments
 (0)