Skip to content

Commit

Permalink
🦉 Updates from OwlBot post-processor
Browse files Browse the repository at this point in the history
  • Loading branch information
gcf-owl-bot[bot] committed Sep 7, 2023
1 parent ab88317 commit 21f7775
Show file tree
Hide file tree
Showing 1,971 changed files with 357 additions and 706,051 deletions.
2 changes: 1 addition & 1 deletion .kokoro/samples/python3.10/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env_vars: {
# Declare build specific Cloud project.
env_vars: {
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
value: "ucaip-sample-tests"
value: "python-docs-samples-tests-310"
}

env_vars: {
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/samples/python3.11/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env_vars: {
# Declare build specific Cloud project.
env_vars: {
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
value: "ucaip-sample-tests"
value: "python-docs-samples-tests-311"
}

env_vars: {
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/samples/python3.7/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env_vars: {
# Declare build specific Cloud project.
env_vars: {
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
value: "ucaip-sample-tests"
value: "python-docs-samples-tests-py37"
}

env_vars: {
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/samples/python3.7/periodic.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

env_vars: {
key: "INSTALL_LIBRARY_FROM_SOURCE"
value: "True"
value: "False"
}
2 changes: 1 addition & 1 deletion .kokoro/samples/python3.8/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env_vars: {
# Declare build specific Cloud project.
env_vars: {
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
value: "ucaip-sample-tests"
value: "python-docs-samples-tests-py38"
}

env_vars: {
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/samples/python3.9/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env_vars: {
# Declare build specific Cloud project.
env_vars: {
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
value: "ucaip-sample-tests"
value: "python-docs-samples-tests-py39"
}

env_vars: {
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ repos:
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
rev: 3.9.2
hooks:
- id: flake8
54 changes: 0 additions & 54 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,57 +382,3 @@
napoleon_use_ivar = False
napoleon_use_param = True
napoleon_use_rtype = True


def adopt_members_reexported_from_private_modules(public_module: str):
"""Remaps the module items that come from internal modules.
A public module might be exporting items that are imported from private modules.
This function changes the `__module__` of such items to the public module.
Example:
`package/public.py`:
```
from package._private import _PrivateClass as PublicClass
__all__ = ["PublicClass"]
```
Calling this function on the `package.public` module will change:
```
package._private._PrivateClass.__name__ = "PublicClass"
package._private._PrivateClass.__module__ = "package.public"
```
"""
for name, cls in public_module.__dict__.items():
if name in public_module.__all__:
if "._" in cls.__module__:
cls.__name__ = name
cls.__module__ = public_module.__name__


def setup(*args, **kwargs):
# 1. Giving pretty module names to the GA and preview classes
# 2. Giving pretty class names to the preview classes
# 3. Making Sphinx automodule render the class members instead of
# dismissing the exported private classes as "Alias of".
from vertexai import language_models
from vertexai import vision_models
from vertexai.preview import (
language_models as preview_language_models,
)
from vertexai.preview import (
vision_models as preview_vision_models,
)

# There are many possible ways to select which classes to fix.
# We select the publicly exported members that have an internal module ("*._*").

# Setting the modules of the GA classes
adopt_members_reexported_from_private_modules(language_models)
adopt_members_reexported_from_private_modules(vision_models)

# Setting the modules of the public preview classes
# Selecting the members that still have an internal module after the GA fixes.
adopt_members_reexported_from_private_modules(preview_language_models)
adopt_members_reexported_from_private_modules(preview_vision_models)
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ class AutoMlTablesInputs(proto.Message):
The supported optimization objectives depend on
the prediction type. If the field is not set, a
default objective function is used.
classification (binary):
"maximize-au-roc" (default) - Maximize the
Expand All @@ -122,10 +123,12 @@ class AutoMlTablesInputs(proto.Message):
recall value. "maximize-recall-at-precision" -
Maximize recall for a specified
precision value.
classification (multi-class):
"minimize-log-loss" (default) - Minimize log
loss.
regression:
"minimize-rmse" (default) - Minimize
Expand All @@ -137,13 +140,15 @@ class AutoMlTablesInputs(proto.Message):
Required. The train budget of creating this
model, expressed in milli node hours i.e. 1,000
value in this field means 1 node hour.
The training cost of the model will not exceed
this budget. The final cost will be attempted to
be close to the budget, though may end up being
(even) noticeably smaller - at the backend's
discretion. This especially may happen when
further model training ceases to provide any
improvements.
If the budget is set to a value known to be
insufficient to train a model for the given
dataset, the training won't be attempted and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ class AutoMlTablesInputs(proto.Message):
The supported optimization objectives depend on
the prediction type. If the field is not set, a
default objective function is used.
classification (binary):
"maximize-au-roc" (default) - Maximize the
Expand All @@ -122,10 +123,12 @@ class AutoMlTablesInputs(proto.Message):
recall value. "maximize-recall-at-precision" -
Maximize recall for a specified
precision value.
classification (multi-class):
"minimize-log-loss" (default) - Minimize log
loss.
regression:
"minimize-rmse" (default) - Minimize
Expand All @@ -137,13 +140,15 @@ class AutoMlTablesInputs(proto.Message):
Required. The train budget of creating this
model, expressed in milli node hours i.e. 1,000
value in this field means 1 node hour.
The training cost of the model will not exceed
this budget. The final cost will be attempted to
be close to the budget, though may end up being
(even) noticeably smaller - at the backend's
discretion. This especially may happen when
further model training ceases to provide any
improvements.
If the budget is set to a value known to be
insufficient to train a model for the given
dataset, the training won't be attempted and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,15 @@ class AutoMlForecastingInputs(proto.Message):
Required. The train budget of creating this
model, expressed in milli node hours i.e. 1,000
value in this field means 1 node hour.
The training cost of the model will not exceed
this budget. The final cost will be attempted to
be close to the budget, though may end up being
(even) noticeably smaller - at the backend's
discretion. This especially may happen when
further model training ceases to provide any
improvements.
If the budget is set to a value known to be
insufficient to train a model for the given
dataset, the training won't be attempted and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
from google.cloud.location import locations_pb2 # type: ignore
from google.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
from google.longrunning import operations_pb2
from google.longrunning import operations_pb2 # type: ignore
from google.protobuf import empty_pb2 # type: ignore
from google.protobuf import field_mask_pb2 # type: ignore
from google.protobuf import struct_pb2 # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
from google.cloud.location import locations_pb2 # type: ignore
from google.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
from google.longrunning import operations_pb2
from google.longrunning import operations_pb2 # type: ignore
from google.protobuf import empty_pb2 # type: ignore
from google.protobuf import field_mask_pb2 # type: ignore
from google.protobuf import struct_pb2 # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
from google.cloud.location import locations_pb2 # type: ignore
from google.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
from google.longrunning import operations_pb2
from google.longrunning import operations_pb2 # type: ignore

DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
from google.cloud.location import locations_pb2 # type: ignore
from google.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
from google.longrunning import operations_pb2
from google.longrunning import operations_pb2 # type: ignore
from .base import DatasetServiceTransport, DEFAULT_CLIENT_INFO

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
from google.cloud.location import locations_pb2 # type: ignore
from google.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
from google.longrunning import operations_pb2
from google.longrunning import operations_pb2 # type: ignore
from .base import DatasetServiceTransport, DEFAULT_CLIENT_INFO
from .grpc import DatasetServiceGrpcTransport
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
from google.cloud.location import locations_pb2 # type: ignore
from google.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
from google.longrunning import operations_pb2
from google.longrunning import operations_pb2 # type: ignore
from google.protobuf import empty_pb2 # type: ignore
from google.protobuf import field_mask_pb2 # type: ignore
from google.protobuf import timestamp_pb2 # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
from google.cloud.location import locations_pb2 # type: ignore
from google.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
from google.longrunning import operations_pb2
from google.longrunning import operations_pb2 # type: ignore
from google.protobuf import empty_pb2 # type: ignore
from google.protobuf import field_mask_pb2 # type: ignore
from google.protobuf import timestamp_pb2 # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
from google.cloud.location import locations_pb2 # type: ignore
from google.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
from google.longrunning import operations_pb2
from google.longrunning import operations_pb2 # type: ignore

DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
from google.cloud.location import locations_pb2 # type: ignore
from google.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
from google.longrunning import operations_pb2
from google.longrunning import operations_pb2 # type: ignore
from .base import EndpointServiceTransport, DEFAULT_CLIENT_INFO

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
from google.cloud.location import locations_pb2 # type: ignore
from google.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
from google.longrunning import operations_pb2
from google.longrunning import operations_pb2 # type: ignore
from .base import EndpointServiceTransport, DEFAULT_CLIENT_INFO
from .grpc import EndpointServiceGrpcTransport
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
from google.cloud.location import locations_pb2 # type: ignore
from google.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
from google.longrunning import operations_pb2
from google.longrunning import operations_pb2 # type: ignore
from .transports.base import (
FeaturestoreOnlineServingServiceTransport,
DEFAULT_CLIENT_INFO,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
from google.cloud.location import locations_pb2 # type: ignore
from google.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
from google.longrunning import operations_pb2
from google.longrunning import operations_pb2 # type: ignore
from .transports.base import (
FeaturestoreOnlineServingServiceTransport,
DEFAULT_CLIENT_INFO,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from google.cloud.location import locations_pb2 # type: ignore
from google.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
from google.longrunning import operations_pb2
from google.longrunning import operations_pb2 # type: ignore

DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
gapic_version=package_version.__version__
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from google.cloud.location import locations_pb2 # type: ignore
from google.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
from google.longrunning import operations_pb2
from google.longrunning import operations_pb2 # type: ignore
from .base import FeaturestoreOnlineServingServiceTransport, DEFAULT_CLIENT_INFO


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from google.cloud.location import locations_pb2 # type: ignore
from google.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
from google.longrunning import operations_pb2
from google.longrunning import operations_pb2 # type: ignore
from .base import FeaturestoreOnlineServingServiceTransport, DEFAULT_CLIENT_INFO
from .grpc import FeaturestoreOnlineServingServiceGrpcTransport

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
from google.cloud.location import locations_pb2 # type: ignore
from google.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
from google.longrunning import operations_pb2
from google.longrunning import operations_pb2 # type: ignore
from google.protobuf import empty_pb2 # type: ignore
from google.protobuf import field_mask_pb2 # type: ignore
from google.protobuf import timestamp_pb2 # type: ignore
Expand Down Expand Up @@ -2347,13 +2347,16 @@ async def import_feature_values(
operation. The imported features are guaranteed to be
visible to subsequent read operations after the
operation is marked as successfully done.
If an import operation fails, the Feature values
returned from reads and exports may be inconsistent. If
consistency is required, the caller must retry the same
import request again and wait till the new operation
returned is marked as successfully done.
There are also scenarios where the caller can cause
inconsistency.
- Source data for import contains multiple distinct
Feature values for the same entity ID and
timestamp.
Expand Down Expand Up @@ -2494,6 +2497,7 @@ async def batch_read_feature_values(
metadata: Sequence[Tuple[str, str]] = (),
) -> operation_async.AsyncOperation:
r"""Batch reads Feature values from a Featurestore.
This API enables batch reading Feature values, where
each read instance in the batch may read Feature values
of entities from one or more EntityTypes. Point-in-time
Expand Down Expand Up @@ -2763,10 +2767,12 @@ async def delete_feature_values(
metadata: Sequence[Tuple[str, str]] = (),
) -> operation_async.AsyncOperation:
r"""Delete Feature values from Featurestore.
The progress of the deletion is tracked by the returned
operation. The deleted feature values are guaranteed to
be invisible to subsequent read operations after the
operation is marked as successfully done.
If a delete feature values operation fails, the feature
values returned from reads and exports may be
inconsistent. If consistency is required, the caller
Expand Down
Loading

0 comments on commit 21f7775

Please sign in to comment.