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: adds enhanced protos for time series forecasting #374

Merged
merged 7 commits into from Jun 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .github/.OwlBot.lock.yaml
@@ -0,0 +1,4 @@
docker:
digest: sha256:457583330eec64daa02aeb7a72a04d33e7be2428f646671ce4045dcbc0191b1e
image: gcr.io/repo-automation-bots/owlbot-python:latest

26 changes: 26 additions & 0 deletions .github/.OwlBot.yaml
@@ -0,0 +1,26 @@
# Copyright 2021 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.

docker:
image: gcr.io/repo-automation-bots/owlbot-python:latest

deep-remove-regex:
- /owl-bot-staging

deep-copy-regex:
- source: /google/cloud/aiplatform/(v.*)/.*-py/(.*)
dest: /owl-bot-staging/$1/$2

begin-after-commit-hash: 7774246dfb7839067cd64bba0600089b1c91bd85

2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Expand Up @@ -26,6 +26,6 @@ repos:
hooks:
- id: black
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
rev: 3.9.1
hooks:
- id: flake8
Expand Up @@ -36,6 +36,9 @@
from google.cloud.aiplatform.v1beta1.schema.predict.prediction_v1beta1.types.text_sentiment import (
TextSentimentPredictionResult,
)
from google.cloud.aiplatform.v1beta1.schema.predict.prediction_v1beta1.types.time_series_forecasting import (
TimeSeriesForecastingPredictionResult,
)
from google.cloud.aiplatform.v1beta1.schema.predict.prediction_v1beta1.types.video_action_recognition import (
VideoActionRecognitionPredictionResult,
)
Expand All @@ -54,6 +57,7 @@
"TabularRegressionPredictionResult",
"TextExtractionPredictionResult",
"TextSentimentPredictionResult",
"TimeSeriesForecastingPredictionResult",
"VideoActionRecognitionPredictionResult",
"VideoClassificationPredictionResult",
"VideoObjectTrackingPredictionResult",
Expand Down
Expand Up @@ -22,6 +22,7 @@
from .types.tabular_regression import TabularRegressionPredictionResult
from .types.text_extraction import TextExtractionPredictionResult
from .types.text_sentiment import TextSentimentPredictionResult
from .types.time_series_forecasting import TimeSeriesForecastingPredictionResult
from .types.video_action_recognition import VideoActionRecognitionPredictionResult
from .types.video_classification import VideoClassificationPredictionResult
from .types.video_object_tracking import VideoObjectTrackingPredictionResult
Expand All @@ -34,6 +35,7 @@
"TabularRegressionPredictionResult",
"TextExtractionPredictionResult",
"TextSentimentPredictionResult",
"TimeSeriesForecastingPredictionResult",
"VideoActionRecognitionPredictionResult",
"VideoClassificationPredictionResult",
"VideoObjectTrackingPredictionResult",
Expand Down
Expand Up @@ -20,6 +20,7 @@
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
Expand All @@ -32,6 +33,7 @@
"TabularRegressionPredictionResult",
"TextExtractionPredictionResult",
"TextSentimentPredictionResult",
"TimeSeriesForecastingPredictionResult",
"VideoActionRecognitionPredictionResult",
"VideoClassificationPredictionResult",
"VideoObjectTrackingPredictionResult",
Expand Down
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -14,7 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

import proto # type: ignore


Expand All @@ -26,21 +24,12 @@

class TimeSeriesForecastingPredictionResult(proto.Message):
r"""Prediction output format for Time Series Forecasting.

Attributes:
value (float):
The regression value.
lower_bound (float):
The lower bound of the prediction interval.
upper_bound (float):
The upper bound of the prediction interval.
"""

value = proto.Field(proto.FLOAT, number=1)

lower_bound = proto.Field(proto.FLOAT, number=2)

upper_bound = proto.Field(proto.FLOAT, number=3)
value = proto.Field(proto.FLOAT, number=1,)


__all__ = tuple(sorted(__protobuf__.manifest))
Expand Up @@ -69,6 +69,15 @@
from google.cloud.aiplatform.v1beta1.schema.trainingjob.definition_v1beta1.types.automl_text_sentiment import (
AutoMlTextSentimentInputs,
)
from google.cloud.aiplatform.v1beta1.schema.trainingjob.definition_v1beta1.types.automl_time_series_forecasting import (
AutoMlForecasting,
)
from google.cloud.aiplatform.v1beta1.schema.trainingjob.definition_v1beta1.types.automl_time_series_forecasting import (
AutoMlForecastingInputs,
)
from google.cloud.aiplatform.v1beta1.schema.trainingjob.definition_v1beta1.types.automl_time_series_forecasting import (
AutoMlForecastingMetadata,
)
from google.cloud.aiplatform.v1beta1.schema.trainingjob.definition_v1beta1.types.automl_video_action_recognition import (
AutoMlVideoActionRecognition,
)
Expand Down Expand Up @@ -110,6 +119,9 @@
"AutoMlTextExtractionInputs",
"AutoMlTextSentiment",
"AutoMlTextSentimentInputs",
"AutoMlForecasting",
"AutoMlForecastingInputs",
"AutoMlForecastingMetadata",
"AutoMlVideoActionRecognition",
"AutoMlVideoActionRecognitionInputs",
"AutoMlVideoClassification",
Expand Down
Expand Up @@ -33,6 +33,9 @@
from .types.automl_text_extraction import AutoMlTextExtractionInputs
from .types.automl_text_sentiment import AutoMlTextSentiment
from .types.automl_text_sentiment import AutoMlTextSentimentInputs
from .types.automl_time_series_forecasting import AutoMlForecasting
from .types.automl_time_series_forecasting import AutoMlForecastingInputs
from .types.automl_time_series_forecasting import AutoMlForecastingMetadata
from .types.automl_video_action_recognition import AutoMlVideoActionRecognition
from .types.automl_video_action_recognition import AutoMlVideoActionRecognitionInputs
from .types.automl_video_classification import AutoMlVideoClassification
Expand All @@ -42,6 +45,9 @@
from .types.export_evaluated_data_items_config import ExportEvaluatedDataItemsConfig

__all__ = (
"AutoMlForecasting",
"AutoMlForecastingInputs",
"AutoMlForecastingMetadata",
"AutoMlImageClassification",
"AutoMlImageClassificationInputs",
"AutoMlImageClassificationMetadata",
Expand Down
Expand Up @@ -45,6 +45,11 @@
AutoMlTextSentiment,
AutoMlTextSentimentInputs,
)
from .automl_time_series_forecasting import (
AutoMlForecasting,
AutoMlForecastingInputs,
AutoMlForecastingMetadata,
)
from .automl_video_action_recognition import (
AutoMlVideoActionRecognition,
AutoMlVideoActionRecognitionInputs,
Expand Down Expand Up @@ -78,6 +83,9 @@
"AutoMlTextExtractionInputs",
"AutoMlTextSentiment",
"AutoMlTextSentimentInputs",
"AutoMlForecasting",
"AutoMlForecastingInputs",
"AutoMlForecastingMetadata",
"AutoMlVideoActionRecognition",
"AutoMlVideoActionRecognitionInputs",
"AutoMlVideoClassification",
Expand Down