Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add reserved_ip_ranges to CustomJobSpec in aiplatform v1 custom_job.proto #1165

Merged
merged 10 commits into from
Apr 25, 2022
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,33 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from .image_classification import ImageClassificationPredictionInstance
from .image_object_detection import ImageObjectDetectionPredictionInstance
from .image_segmentation import ImageSegmentationPredictionInstance
from .text_classification import TextClassificationPredictionInstance
from .text_extraction import TextExtractionPredictionInstance
from .text_sentiment import TextSentimentPredictionInstance
from .video_action_recognition import VideoActionRecognitionPredictionInstance
from .video_classification import VideoClassificationPredictionInstance
from .video_object_tracking import VideoObjectTrackingPredictionInstance
from .image_classification import (
ImageClassificationPredictionInstance,
)
from .image_object_detection import (
ImageObjectDetectionPredictionInstance,
)
from .image_segmentation import (
ImageSegmentationPredictionInstance,
)
from .text_classification import (
TextClassificationPredictionInstance,
)
from .text_extraction import (
TextExtractionPredictionInstance,
)
from .text_sentiment import (
TextSentimentPredictionInstance,
)
from .video_action_recognition import (
VideoActionRecognitionPredictionInstance,
)
from .video_classification import (
VideoClassificationPredictionInstance,
)
from .video_object_tracking import (
VideoObjectTrackingPredictionInstance,
)

__all__ = (
"ImageClassificationPredictionInstance",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,24 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from .image_classification import ImageClassificationPredictionParams
from .image_object_detection import ImageObjectDetectionPredictionParams
from .image_segmentation import ImageSegmentationPredictionParams
from .video_action_recognition import VideoActionRecognitionPredictionParams
from .video_classification import VideoClassificationPredictionParams
from .video_object_tracking import VideoObjectTrackingPredictionParams
from .image_classification import (
ImageClassificationPredictionParams,
)
from .image_object_detection import (
ImageObjectDetectionPredictionParams,
)
from .image_segmentation import (
ImageSegmentationPredictionParams,
)
from .video_action_recognition import (
VideoActionRecognitionPredictionParams,
)
from .video_classification import (
VideoClassificationPredictionParams,
)
from .video_object_tracking import (
VideoObjectTrackingPredictionParams,
)

__all__ = (
"ImageClassificationPredictionParams",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,36 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from .classification import ClassificationPredictionResult
from .image_object_detection import ImageObjectDetectionPredictionResult
from .image_segmentation import ImageSegmentationPredictionResult
from .tabular_classification import TabularClassificationPredictionResult
from .tabular_regression import TabularRegressionPredictionResult
from .text_extraction import TextExtractionPredictionResult
from .text_sentiment import TextSentimentPredictionResult
from .video_action_recognition import VideoActionRecognitionPredictionResult
from .video_classification import VideoClassificationPredictionResult
from .video_object_tracking import VideoObjectTrackingPredictionResult
from .classification import (
ClassificationPredictionResult,
)
from .image_object_detection import (
ImageObjectDetectionPredictionResult,
)
from .image_segmentation import (
ImageSegmentationPredictionResult,
)
from .tabular_classification import (
TabularClassificationPredictionResult,
)
from .tabular_regression import (
TabularRegressionPredictionResult,
)
from .text_extraction import (
TextExtractionPredictionResult,
)
from .text_sentiment import (
TextSentimentPredictionResult,
)
from .video_action_recognition import (
VideoActionRecognitionPredictionResult,
)
from .video_classification import (
VideoClassificationPredictionResult,
)
from .video_object_tracking import (
VideoObjectTrackingPredictionResult,
)

__all__ = (
"ClassificationPredictionResult",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@
AutoMlVideoObjectTracking,
AutoMlVideoObjectTrackingInputs,
)
from .export_evaluated_data_items_config import ExportEvaluatedDataItemsConfig
from .export_evaluated_data_items_config import (
ExportEvaluatedDataItemsConfig,
)

__all__ = (
"AutoMlImageClassification",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,33 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from .image_classification import ImageClassificationPredictionInstance
from .image_object_detection import ImageObjectDetectionPredictionInstance
from .image_segmentation import ImageSegmentationPredictionInstance
from .text_classification import TextClassificationPredictionInstance
from .text_extraction import TextExtractionPredictionInstance
from .text_sentiment import TextSentimentPredictionInstance
from .video_action_recognition import VideoActionRecognitionPredictionInstance
from .video_classification import VideoClassificationPredictionInstance
from .video_object_tracking import VideoObjectTrackingPredictionInstance
from .image_classification import (
ImageClassificationPredictionInstance,
)
from .image_object_detection import (
ImageObjectDetectionPredictionInstance,
)
from .image_segmentation import (
ImageSegmentationPredictionInstance,
)
from .text_classification import (
TextClassificationPredictionInstance,
)
from .text_extraction import (
TextExtractionPredictionInstance,
)
from .text_sentiment import (
TextSentimentPredictionInstance,
)
from .video_action_recognition import (
VideoActionRecognitionPredictionInstance,
)
from .video_classification import (
VideoClassificationPredictionInstance,
)
from .video_object_tracking import (
VideoObjectTrackingPredictionInstance,
)

__all__ = (
"ImageClassificationPredictionInstance",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,24 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from .image_classification import ImageClassificationPredictionParams
from .image_object_detection import ImageObjectDetectionPredictionParams
from .image_segmentation import ImageSegmentationPredictionParams
from .video_action_recognition import VideoActionRecognitionPredictionParams
from .video_classification import VideoClassificationPredictionParams
from .video_object_tracking import VideoObjectTrackingPredictionParams
from .image_classification import (
ImageClassificationPredictionParams,
)
from .image_object_detection import (
ImageObjectDetectionPredictionParams,
)
from .image_segmentation import (
ImageSegmentationPredictionParams,
)
from .video_action_recognition import (
VideoActionRecognitionPredictionParams,
)
from .video_classification import (
VideoClassificationPredictionParams,
)
from .video_object_tracking import (
VideoObjectTrackingPredictionParams,
)

__all__ = (
"ImageClassificationPredictionParams",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,39 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from .classification import ClassificationPredictionResult
from .image_object_detection import ImageObjectDetectionPredictionResult
from .image_segmentation import ImageSegmentationPredictionResult
from .tabular_classification import TabularClassificationPredictionResult
from .tabular_regression import TabularRegressionPredictionResult
from .text_extraction import TextExtractionPredictionResult
from .text_sentiment import TextSentimentPredictionResult
from .time_series_forecasting import TimeSeriesForecastingPredictionResult
from .video_action_recognition import VideoActionRecognitionPredictionResult
from .video_classification import VideoClassificationPredictionResult
from .video_object_tracking import VideoObjectTrackingPredictionResult
from .classification import (
ClassificationPredictionResult,
)
from .image_object_detection import (
ImageObjectDetectionPredictionResult,
)
from .image_segmentation import (
ImageSegmentationPredictionResult,
)
from .tabular_classification import (
TabularClassificationPredictionResult,
)
from .tabular_regression import (
TabularRegressionPredictionResult,
)
from .text_extraction import (
TextExtractionPredictionResult,
)
from .text_sentiment import (
TextSentimentPredictionResult,
)
from .time_series_forecasting import (
TimeSeriesForecastingPredictionResult,
)
from .video_action_recognition import (
VideoActionRecognitionPredictionResult,
)
from .video_classification import (
VideoClassificationPredictionResult,
)
from .video_object_tracking import (
VideoObjectTrackingPredictionResult,
)

__all__ = (
"ClassificationPredictionResult",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@
AutoMlVideoObjectTracking,
AutoMlVideoObjectTrackingInputs,
)
from .export_evaluated_data_items_config import ExportEvaluatedDataItemsConfig
from .export_evaluated_data_items_config import (
ExportEvaluatedDataItemsConfig,
)

__all__ = (
"AutoMlImageClassification",
Expand Down
2 changes: 2 additions & 0 deletions google/cloud/aiplatform_v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@
from .types.machine_resources import DedicatedResources
from .types.machine_resources import DiskSpec
from .types.machine_resources import MachineSpec
from .types.machine_resources import NfsMount
from .types.machine_resources import ResourcesConsumed
from .types.manual_batch_tuning_parameters import ManualBatchTuningParameters
from .types.metadata_schema import MetadataSchema
Expand Down Expand Up @@ -826,6 +827,7 @@
"MutateDeployedIndexRequest",
"MutateDeployedIndexResponse",
"NearestNeighborSearchOperationMetadata",
"NfsMount",
"PauseModelDeploymentMonitoringJobRequest",
"PipelineJob",
"PipelineJobDetail",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from collections import OrderedDict
import functools
import re
from typing import Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core.client_options import ClientOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from collections import OrderedDict
import os
import re
from typing import Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core import client_options as client_options_lib
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def __init__(
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
be used for service account credentials.
"""

# Save the hostname. Default to port 443 (HTTPS) if none is specified.
if ":" not in host:
host += ":443"
Expand Down Expand Up @@ -292,5 +293,9 @@ def list_annotations(
]:
raise NotImplementedError()

@property
def kind(self) -> str:
raise NotImplementedError()


__all__ = ("DatasetServiceTransport",)
Original file line number Diff line number Diff line change
Expand Up @@ -520,5 +520,9 @@ def list_annotations(
def close(self):
self.grpc_channel.close()

@property
def kind(self) -> str:
return "grpc"


__all__ = ("DatasetServiceGrpcTransport",)
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from collections import OrderedDict
import functools
import re
from typing import Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core.client_options import ClientOptions
Expand Down Expand Up @@ -804,17 +804,14 @@ async def deploy_model(
*,
endpoint: str = None,
deployed_model: gca_endpoint.DeployedModel = None,
traffic_split: Sequence[
endpoint_service.DeployModelRequest.TrafficSplitEntry
] = None,
traffic_split: Mapping[str, int] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation_async.AsyncOperation:
r"""Deploys a Model into this Endpoint, creating a
DeployedModel within it.


.. code-block:: python

from google.cloud import aiplatform_v1
Expand Down Expand Up @@ -866,7 +863,7 @@ def sample_deploy_model():
This corresponds to the ``deployed_model`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
traffic_split (:class:`Sequence[google.cloud.aiplatform_v1.types.DeployModelRequest.TrafficSplitEntry]`):
traffic_split (:class:`Mapping[str, int]`):
A map from a DeployedModel's ID to the percentage of
this Endpoint's traffic that should be forwarded to that
DeployedModel.
Expand Down Expand Up @@ -963,9 +960,7 @@ async def undeploy_model(
*,
endpoint: str = None,
deployed_model_id: str = None,
traffic_split: Sequence[
endpoint_service.UndeployModelRequest.TrafficSplitEntry
] = None,
traffic_split: Mapping[str, int] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
Expand All @@ -974,7 +969,6 @@ async def undeploy_model(
DeployedModel from it, and freeing all resources it's
using.


.. code-block:: python

from google.cloud import aiplatform_v1
Expand Down Expand Up @@ -1018,7 +1012,7 @@ def sample_undeploy_model():
This corresponds to the ``deployed_model_id`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
traffic_split (:class:`Sequence[google.cloud.aiplatform_v1.types.UndeployModelRequest.TrafficSplitEntry]`):
traffic_split (:class:`Mapping[str, int]`):
If this field is provided, then the Endpoint's
[traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split]
will be overwritten with it. If last DeployedModel is
Expand Down
Loading