diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml index 05e54d8f2e..62483abbee 100644 --- a/.github/.OwlBot.yaml +++ b/.github/.OwlBot.yaml @@ -19,8 +19,10 @@ deep-remove-regex: - /owl-bot-staging deep-copy-regex: - - source: /google/cloud/aiplatform/(v.*)/.*-py/(.*) + - source: /google/cloud/aiplatform/(v.*)/aiplatform-.*-py/(.*) dest: /owl-bot-staging/$1/$2 + - source: /google/cloud/aiplatform/v*/schema/.*/.*-py/(google/cloud/.*) + dest: /owl-bot-staging/$1 begin-after-commit-hash: 7774246dfb7839067cd64bba0600089b1c91bd85 diff --git a/schema/predict/instance/.coveragerc b/schema/predict/instance/.coveragerc deleted file mode 100644 index 8bd7ec75f6..0000000000 --- a/schema/predict/instance/.coveragerc +++ /dev/null @@ -1,17 +0,0 @@ -[run] -branch = True - -[report] -show_missing = True -omit = - google/cloud/aiplatform/v1/schema/predict/instance/__init__.py -exclude_lines = - # Re-enable the standard pragma - pragma: NO COVER - # Ignore debug-only repr - def __repr__ - # Ignore pkg_resources exceptions. - # This is added at the module level as a safeguard for if someone - # generates the code and tries to run it without pip installing. This - # makes it virtually impossible to test properly. - except pkg_resources.DistributionNotFound diff --git a/schema/predict/instance/MANIFEST.in b/schema/predict/instance/MANIFEST.in deleted file mode 100644 index 05ea9a66cb..0000000000 --- a/schema/predict/instance/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -recursive-include google/cloud/aiplatform/v1/schema/predict/instance *.py -recursive-include google/cloud/aiplatform/v1/schema/predict/instance_v1 *.py diff --git a/schema/predict/instance/README.rst b/schema/predict/instance/README.rst deleted file mode 100644 index 5e0175e9e4..0000000000 --- a/schema/predict/instance/README.rst +++ /dev/null @@ -1,49 +0,0 @@ -Python Client for Google Cloud Aiplatform V1 Schema Predict Instance API -================================================= - -Quick Start ------------ - -In order to use this library, you first need to go through the following steps: - -1. `Select or create a Cloud Platform project.`_ -2. `Enable billing for your project.`_ -3. Enable the Google Cloud Aiplatform V1 Schema Predict Instance API. -4. `Setup Authentication.`_ - -.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project -.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project -.. _Setup Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html - -Installation -~~~~~~~~~~~~ - -Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to -create isolated Python environments. The basic problem it addresses is one of -dependencies and versions, and indirectly permissions. - -With `virtualenv`_, it's possible to install this library without needing system -install permissions, and without clashing with the installed system -dependencies. - -.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/ - - -Mac/Linux -^^^^^^^^^ - -.. code-block:: console - - python3 -m venv - source /bin/activate - /bin/pip install /path/to/library - - -Windows -^^^^^^^ - -.. code-block:: console - - python3 -m venv - \Scripts\activate - \Scripts\pip.exe install \path\to\library diff --git a/schema/predict/instance/docs/conf.py b/schema/predict/instance/docs/conf.py deleted file mode 100644 index a12fb006b9..0000000000 --- a/schema/predict/instance/docs/conf.py +++ /dev/null @@ -1,376 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# -# google-cloud-aiplatform-v1-schema-predict-instance documentation build configuration file -# -# This file is execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -import sys -import os -import shlex - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -sys.path.insert(0, os.path.abspath("..")) - -__version__ = "0.1.0" - -# -- General configuration ------------------------------------------------ - -# If your documentation needs a minimal Sphinx version, state it here. -needs_sphinx = "1.6.3" - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ - "sphinx.ext.autodoc", - "sphinx.ext.autosummary", - "sphinx.ext.intersphinx", - "sphinx.ext.coverage", - "sphinx.ext.napoleon", - "sphinx.ext.todo", - "sphinx.ext.viewcode", -] - -# autodoc/autosummary flags -autoclass_content = "both" -autodoc_default_flags = ["members"] -autosummary_generate = True - - -# Add any paths that contain templates here, relative to this directory. -templates_path = ["_templates"] - -# Allow markdown includes (so releases.md can include CHANGLEOG.md) -# http://www.sphinx-doc.org/en/master/markdown.html -source_parsers = {".md": "recommonmark.parser.CommonMarkParser"} - -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -source_suffix = [".rst", ".md"] - -# The encoding of source files. -# source_encoding = 'utf-8-sig' - -# The master toctree document. -master_doc = "index" - -# General information about the project. -project = u"google-cloud-aiplatform-v1-schema-predict-instance" -copyright = u"2020, Google, LLC" -author = u"Google APIs" # TODO: autogenerate this bit - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The full version, including alpha/beta/rc tags. -release = __version__ -# The short X.Y version. -version = ".".join(release.split(".")[0:2]) - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -language = None - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -# today = '' -# Else, today_fmt is used as the format for a strftime call. -# today_fmt = '%B %d, %Y' - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -exclude_patterns = ["_build"] - -# The reST default role (used for this markup: `text`) to use for all -# documents. -# default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -# add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -# add_module_names = True - -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -# show_authors = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = "sphinx" - -# A list of ignored prefixes for module index sorting. -# modindex_common_prefix = [] - -# If true, keep warnings as "system message" paragraphs in the built documents. -# keep_warnings = False - -# If true, `todo` and `todoList` produce output, else they produce nothing. -todo_include_todos = True - - -# -- Options for HTML output ---------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -html_theme = "alabaster" - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -html_theme_options = { - "description": "Google Cloud Aiplatform V1 Schema Predict Client Libraries for Python", - "github_user": "googleapis", - "github_repo": "google-cloud-python", - "github_banner": True, - "font_family": "'Roboto', Georgia, sans", - "head_font_family": "'Roboto', Georgia, serif", - "code_font_family": "'Roboto Mono', 'Consolas', monospace", -} - -# Add any paths that contain custom themes here, relative to this directory. -# html_theme_path = [] - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -# html_title = None - -# A shorter title for the navigation bar. Default is the same as html_title. -# html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -# html_logo = None - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -# html_favicon = None - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ["_static"] - -# Add any extra paths that contain custom files (such as robots.txt or -# .htaccess) here, relative to this directory. These files are copied -# directly to the root of the documentation. -# html_extra_path = [] - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -# html_last_updated_fmt = '%b %d, %Y' - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -# html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -# html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -# html_additional_pages = {} - -# If false, no module index is generated. -# html_domain_indices = True - -# If false, no index is generated. -# html_use_index = True - -# If true, the index is split into individual pages for each letter. -# html_split_index = False - -# If true, links to the reST sources are added to the pages. -# html_show_sourcelink = True - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -# html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -# html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -# html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -# html_file_suffix = None - -# Language to be used for generating the HTML full-text search index. -# Sphinx supports the following languages: -# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' -# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr' -# html_search_language = 'en' - -# A dictionary with options for the search language support, empty by default. -# Now only 'ja' uses this config value -# html_search_options = {'type': 'default'} - -# The name of a javascript file (relative to the configuration directory) that -# implements a search results scorer. If empty, the default will be used. -# html_search_scorer = 'scorer.js' - -# Output file base name for HTML help builder. -htmlhelp_basename = "google-cloud-aiplatform-v1-schema-predict-instance-doc" - -# -- Options for warnings ------------------------------------------------------ - - -suppress_warnings = [ - # Temporarily suppress this to avoid "more than one target found for - # cross-reference" warning, which are intractable for us to avoid while in - # a mono-repo. - # See https://github.com/sphinx-doc/sphinx/blob - # /2a65ffeef5c107c19084fabdd706cdff3f52d93c/sphinx/domains/python.py#L843 - "ref.python" -] - -# -- Options for LaTeX output --------------------------------------------- - -latex_elements = { - # The paper size ('letterpaper' or 'a4paper'). - # 'papersize': 'letterpaper', - # The font size ('10pt', '11pt' or '12pt'). - # 'pointsize': '10pt', - # Additional stuff for the LaTeX preamble. - # 'preamble': '', - # Latex figure (float) alignment - # 'figure_align': 'htbp', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - ( - master_doc, - "google-cloud-aiplatform-v1-schema-predict-instance.tex", - u"google-cloud-aiplatform-v1-schema-predict-instance Documentation", - author, - "manual", - ) -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -# latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -# latex_use_parts = False - -# If true, show page references after internal links. -# latex_show_pagerefs = False - -# If true, show URL addresses after external links. -# latex_show_urls = False - -# Documents to append as an appendix to all manuals. -# latex_appendices = [] - -# If false, no module index is generated. -# latex_domain_indices = True - - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - ( - master_doc, - "google-cloud-aiplatform-v1-schema-predict-instance", - u"Google Cloud Aiplatform V1 Schema Predict Instance Documentation", - [author], - 1, - ) -] - -# If true, show URL addresses after external links. -# man_show_urls = False - - -# -- Options for Texinfo output ------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - ( - master_doc, - "google-cloud-aiplatform-v1-schema-predict-instance", - u"google-cloud-aiplatform-v1-schema-predict-instance Documentation", - author, - "google-cloud-aiplatform-v1-schema-predict-instance", - "GAPIC library for Google Cloud Aiplatform V1 Schema Predict Instance API", - "APIs", - ) -] - -# Documents to append as an appendix to all manuals. -# texinfo_appendices = [] - -# If false, no module index is generated. -# texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -# texinfo_show_urls = 'footnote' - -# If true, do not generate a @detailmenu in the "Top" node's menu. -# texinfo_no_detailmenu = False - - -# Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = { - "python": ("http://python.readthedocs.org/en/latest/", None), - "gax": ("https://gax-python.readthedocs.org/en/latest/", None), - "google-auth": ("https://google-auth.readthedocs.io/en/stable", None), - "google-gax": ("https://gax-python.readthedocs.io/en/latest/", None), - "google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None), - "grpc": ("https://grpc.io/grpc/python/", None), - "requests": ("http://requests.kennethreitz.org/en/stable/", None), - "proto": ("https://proto-plus-python.readthedocs.io/en/stable", None), - "protobuf": ("https://googleapis.dev/python/protobuf/latest/", None), -} - - -# Napoleon settings -napoleon_google_docstring = True -napoleon_numpy_docstring = True -napoleon_include_private_with_doc = False -napoleon_include_special_with_doc = True -napoleon_use_admonition_for_examples = False -napoleon_use_admonition_for_notes = False -napoleon_use_admonition_for_references = False -napoleon_use_ivar = False -napoleon_use_param = True -napoleon_use_rtype = True diff --git a/schema/predict/instance/docs/index.rst b/schema/predict/instance/docs/index.rst deleted file mode 100644 index e6c2d156ca..0000000000 --- a/schema/predict/instance/docs/index.rst +++ /dev/null @@ -1,7 +0,0 @@ -API Reference -------------- -.. toctree:: - :maxdepth: 2 - - instance_v1/services - instance_v1/types diff --git a/schema/predict/instance/docs/instance_v1/services.rst b/schema/predict/instance/docs/instance_v1/services.rst deleted file mode 100644 index 50c011c69a..0000000000 --- a/schema/predict/instance/docs/instance_v1/services.rst +++ /dev/null @@ -1,4 +0,0 @@ -Services for Google Cloud Aiplatform V1 Schema Predict Instance v1 API -====================================================================== -.. toctree:: - :maxdepth: 2 diff --git a/schema/predict/instance/docs/instance_v1/types.rst b/schema/predict/instance/docs/instance_v1/types.rst deleted file mode 100644 index 564ab013ee..0000000000 --- a/schema/predict/instance/docs/instance_v1/types.rst +++ /dev/null @@ -1,7 +0,0 @@ -Types for Google Cloud Aiplatform V1 Schema Predict Instance v1 API -=================================================================== - -.. automodule:: google.cloud.aiplatform.v1.schema.predict.instance_v1.types - :members: - :undoc-members: - :show-inheritance: diff --git a/schema/predict/instance/docs/instance_v1beta1/services.rst b/schema/predict/instance/docs/instance_v1beta1/services.rst deleted file mode 100644 index 941dbcca59..0000000000 --- a/schema/predict/instance/docs/instance_v1beta1/services.rst +++ /dev/null @@ -1,4 +0,0 @@ -Services for Google Cloud Aiplatform V1beta1 Schema Predict Instance v1beta1 API -================================================================================ -.. toctree:: - :maxdepth: 2 diff --git a/schema/predict/instance/docs/instance_v1beta1/types.rst b/schema/predict/instance/docs/instance_v1beta1/types.rst deleted file mode 100644 index 7caa088065..0000000000 --- a/schema/predict/instance/docs/instance_v1beta1/types.rst +++ /dev/null @@ -1,7 +0,0 @@ -Types for Google Cloud Aiplatform V1beta1 Schema Predict Instance v1beta1 API -============================================================================= - -.. automodule:: google.cloud.aiplatform.v1beta1.schema.predict.instance_v1beta1.types - :members: - :undoc-members: - :show-inheritance: diff --git a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance/__init__.py b/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance/__init__.py deleted file mode 100644 index 41d6704c1f..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance/__init__.py +++ /dev/null @@ -1,37 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# - - -from google.cloud.aiplatform.v1.schema.predict.instance_v1.types.image_classification import ImageClassificationPredictionInstance -from google.cloud.aiplatform.v1.schema.predict.instance_v1.types.image_object_detection import ImageObjectDetectionPredictionInstance -from google.cloud.aiplatform.v1.schema.predict.instance_v1.types.image_segmentation import ImageSegmentationPredictionInstance -from google.cloud.aiplatform.v1.schema.predict.instance_v1.types.text_classification import TextClassificationPredictionInstance -from google.cloud.aiplatform.v1.schema.predict.instance_v1.types.text_extraction import TextExtractionPredictionInstance -from google.cloud.aiplatform.v1.schema.predict.instance_v1.types.text_sentiment import TextSentimentPredictionInstance -from google.cloud.aiplatform.v1.schema.predict.instance_v1.types.video_action_recognition import VideoActionRecognitionPredictionInstance -from google.cloud.aiplatform.v1.schema.predict.instance_v1.types.video_classification import VideoClassificationPredictionInstance -from google.cloud.aiplatform.v1.schema.predict.instance_v1.types.video_object_tracking import VideoObjectTrackingPredictionInstance - -__all__ = ('ImageClassificationPredictionInstance', - 'ImageObjectDetectionPredictionInstance', - 'ImageSegmentationPredictionInstance', - 'TextClassificationPredictionInstance', - 'TextExtractionPredictionInstance', - 'TextSentimentPredictionInstance', - 'VideoActionRecognitionPredictionInstance', - 'VideoClassificationPredictionInstance', - 'VideoObjectTrackingPredictionInstance', -) diff --git a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance/py.typed b/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance/py.typed deleted file mode 100644 index f70e7f605a..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance/py.typed +++ /dev/null @@ -1,2 +0,0 @@ -# Marker file for PEP 561. -# The google-cloud-aiplatform-v1-schema-predict-instance package uses inline types. diff --git a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/__init__.py b/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/__init__.py deleted file mode 100644 index 41ab5407a7..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/__init__.py +++ /dev/null @@ -1,38 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# - - -from .types.image_classification import ImageClassificationPredictionInstance -from .types.image_object_detection import ImageObjectDetectionPredictionInstance -from .types.image_segmentation import ImageSegmentationPredictionInstance -from .types.text_classification import TextClassificationPredictionInstance -from .types.text_extraction import TextExtractionPredictionInstance -from .types.text_sentiment import TextSentimentPredictionInstance -from .types.video_action_recognition import VideoActionRecognitionPredictionInstance -from .types.video_classification import VideoClassificationPredictionInstance -from .types.video_object_tracking import VideoObjectTrackingPredictionInstance - -__all__ = ( -'ImageClassificationPredictionInstance', -'ImageObjectDetectionPredictionInstance', -'ImageSegmentationPredictionInstance', -'TextClassificationPredictionInstance', -'TextExtractionPredictionInstance', -'TextSentimentPredictionInstance', -'VideoActionRecognitionPredictionInstance', -'VideoClassificationPredictionInstance', -'VideoObjectTrackingPredictionInstance', -) diff --git a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/gapic_metadata.json b/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/gapic_metadata.json deleted file mode 100644 index 0ae909d6ea..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/gapic_metadata.json +++ /dev/null @@ -1,7 +0,0 @@ - { - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "python", - "libraryPackage": "google.cloud.aiplatform.v1.schema.predict.instance_v1", - "protoPackage": "google.cloud.aiplatform.v1.schema.predict.instance", - "schema": "1.0" -} diff --git a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/py.typed b/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/py.typed deleted file mode 100644 index f70e7f605a..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/py.typed +++ /dev/null @@ -1,2 +0,0 @@ -# Marker file for PEP 561. -# The google-cloud-aiplatform-v1-schema-predict-instance package uses inline types. diff --git a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/services/__init__.py b/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/services/__init__.py deleted file mode 100644 index 4de65971c2..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/services/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# diff --git a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/types/__init__.py b/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/types/__init__.py deleted file mode 100644 index 80a5332604..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/types/__init__.py +++ /dev/null @@ -1,54 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -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', - 'ImageObjectDetectionPredictionInstance', - 'ImageSegmentationPredictionInstance', - 'TextClassificationPredictionInstance', - 'TextExtractionPredictionInstance', - 'TextSentimentPredictionInstance', - 'VideoActionRecognitionPredictionInstance', - 'VideoClassificationPredictionInstance', - 'VideoObjectTrackingPredictionInstance', -) diff --git a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/types/image_classification.py b/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/types/image_classification.py deleted file mode 100644 index da17323f05..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/types/image_classification.py +++ /dev/null @@ -1,56 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1.schema.predict.instance', - manifest={ - 'ImageClassificationPredictionInstance', - }, -) - - -class ImageClassificationPredictionInstance(proto.Message): - r"""Prediction input format for Image Classification. - - Attributes: - content (str): - The image bytes or Cloud Storage URI to make - the prediction on. - mime_type (str): - The MIME type of the content of the image. - Only the images in below listed MIME types are - supported. - image/jpeg - - image/gif - - image/png - - image/webp - - image/bmp - - image/tiff - - image/vnd.microsoft.icon - """ - - content = proto.Field( - proto.STRING, - number=1, - ) - mime_type = proto.Field( - proto.STRING, - number=2, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/types/image_object_detection.py b/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/types/image_object_detection.py deleted file mode 100644 index 9e2f3ab651..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/types/image_object_detection.py +++ /dev/null @@ -1,56 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1.schema.predict.instance', - manifest={ - 'ImageObjectDetectionPredictionInstance', - }, -) - - -class ImageObjectDetectionPredictionInstance(proto.Message): - r"""Prediction input format for Image Object Detection. - - Attributes: - content (str): - The image bytes or Cloud Storage URI to make - the prediction on. - mime_type (str): - The MIME type of the content of the image. - Only the images in below listed MIME types are - supported. - image/jpeg - - image/gif - - image/png - - image/webp - - image/bmp - - image/tiff - - image/vnd.microsoft.icon - """ - - content = proto.Field( - proto.STRING, - number=1, - ) - mime_type = proto.Field( - proto.STRING, - number=2, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/types/image_segmentation.py b/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/types/image_segmentation.py deleted file mode 100644 index 18a25a7f29..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/types/image_segmentation.py +++ /dev/null @@ -1,50 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1.schema.predict.instance', - manifest={ - 'ImageSegmentationPredictionInstance', - }, -) - - -class ImageSegmentationPredictionInstance(proto.Message): - r"""Prediction input format for Image Segmentation. - - Attributes: - content (str): - The image bytes to make the predictions on. - mime_type (str): - The MIME type of the content of the image. - Only the images in below listed MIME types are - supported. - image/jpeg - - image/png - """ - - content = proto.Field( - proto.STRING, - number=1, - ) - mime_type = proto.Field( - proto.STRING, - number=2, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/types/text_classification.py b/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/types/text_classification.py deleted file mode 100644 index 7c0dbad65a..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/types/text_classification.py +++ /dev/null @@ -1,49 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1.schema.predict.instance', - manifest={ - 'TextClassificationPredictionInstance', - }, -) - - -class TextClassificationPredictionInstance(proto.Message): - r"""Prediction input format for Text Classification. - - Attributes: - content (str): - The text snippet to make the predictions on. - mime_type (str): - The MIME type of the text snippet. The - supported MIME types are listed below. - - text/plain - """ - - content = proto.Field( - proto.STRING, - number=1, - ) - mime_type = proto.Field( - proto.STRING, - number=2, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/types/text_extraction.py b/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/types/text_extraction.py deleted file mode 100644 index 0ecaa3f41c..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/types/text_extraction.py +++ /dev/null @@ -1,62 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1.schema.predict.instance', - manifest={ - 'TextExtractionPredictionInstance', - }, -) - - -class TextExtractionPredictionInstance(proto.Message): - r"""Prediction input format for Text Extraction. - - Attributes: - content (str): - The text snippet to make the predictions on. - mime_type (str): - The MIME type of the text snippet. The - supported MIME types are listed below. - - text/plain - key (str): - This field is only used for batch prediction. - If a key is provided, the batch prediction - result will by mapped to this key. If omitted, - then the batch prediction result will contain - the entire input instance. Vertex AI will not - check if keys in the request are duplicates, so - it is up to the caller to ensure the keys are - unique. - """ - - content = proto.Field( - proto.STRING, - number=1, - ) - mime_type = proto.Field( - proto.STRING, - number=2, - ) - key = proto.Field( - proto.STRING, - number=3, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/types/text_sentiment.py b/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/types/text_sentiment.py deleted file mode 100644 index 54e90aeac7..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/types/text_sentiment.py +++ /dev/null @@ -1,49 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1.schema.predict.instance', - manifest={ - 'TextSentimentPredictionInstance', - }, -) - - -class TextSentimentPredictionInstance(proto.Message): - r"""Prediction input format for Text Sentiment. - - Attributes: - content (str): - The text snippet to make the predictions on. - mime_type (str): - The MIME type of the text snippet. The - supported MIME types are listed below. - - text/plain - """ - - content = proto.Field( - proto.STRING, - number=1, - ) - mime_type = proto.Field( - proto.STRING, - number=2, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/types/video_action_recognition.py b/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/types/video_action_recognition.py deleted file mode 100644 index 42cf9fc8b4..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/types/video_action_recognition.py +++ /dev/null @@ -1,73 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1.schema.predict.instance', - manifest={ - 'VideoActionRecognitionPredictionInstance', - }, -) - - -class VideoActionRecognitionPredictionInstance(proto.Message): - r"""Prediction input format for Video Action Recognition. - - Attributes: - content (str): - The Google Cloud Storage location of the - video on which to perform the prediction. - mime_type (str): - The MIME type of the content of the video. - Only the following are supported: video/mp4 - video/avi video/quicktime - time_segment_start (str): - The beginning, inclusive, of the video's time - segment on which to perform the prediction. - Expressed as a number of seconds as measured - from the start of the video, with "s" appended - at the end. Fractions are allowed, up to a - microsecond precision. - time_segment_end (str): - The end, exclusive, of the video's time - segment on which to perform the prediction. - Expressed as a number of seconds as measured - from the start of the video, with "s" appended - at the end. Fractions are allowed, up to a - microsecond precision, and "inf" or "Infinity" - is allowed, which means the end of the video. - """ - - content = proto.Field( - proto.STRING, - number=1, - ) - mime_type = proto.Field( - proto.STRING, - number=2, - ) - time_segment_start = proto.Field( - proto.STRING, - number=3, - ) - time_segment_end = proto.Field( - proto.STRING, - number=4, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/types/video_classification.py b/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/types/video_classification.py deleted file mode 100644 index 2f95833b6c..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/types/video_classification.py +++ /dev/null @@ -1,73 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1.schema.predict.instance', - manifest={ - 'VideoClassificationPredictionInstance', - }, -) - - -class VideoClassificationPredictionInstance(proto.Message): - r"""Prediction input format for Video Classification. - - Attributes: - content (str): - The Google Cloud Storage location of the - video on which to perform the prediction. - mime_type (str): - The MIME type of the content of the video. - Only the following are supported: video/mp4 - video/avi video/quicktime - time_segment_start (str): - The beginning, inclusive, of the video's time - segment on which to perform the prediction. - Expressed as a number of seconds as measured - from the start of the video, with "s" appended - at the end. Fractions are allowed, up to a - microsecond precision. - time_segment_end (str): - The end, exclusive, of the video's time - segment on which to perform the prediction. - Expressed as a number of seconds as measured - from the start of the video, with "s" appended - at the end. Fractions are allowed, up to a - microsecond precision, and "inf" or "Infinity" - is allowed, which means the end of the video. - """ - - content = proto.Field( - proto.STRING, - number=1, - ) - mime_type = proto.Field( - proto.STRING, - number=2, - ) - time_segment_start = proto.Field( - proto.STRING, - number=3, - ) - time_segment_end = proto.Field( - proto.STRING, - number=4, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/types/video_object_tracking.py b/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/types/video_object_tracking.py deleted file mode 100644 index e9152e1e38..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1/schema/predict/instance_v1/types/video_object_tracking.py +++ /dev/null @@ -1,73 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1.schema.predict.instance', - manifest={ - 'VideoObjectTrackingPredictionInstance', - }, -) - - -class VideoObjectTrackingPredictionInstance(proto.Message): - r"""Prediction input format for Video Object Tracking. - - Attributes: - content (str): - The Google Cloud Storage location of the - video on which to perform the prediction. - mime_type (str): - The MIME type of the content of the video. - Only the following are supported: video/mp4 - video/avi video/quicktime - time_segment_start (str): - The beginning, inclusive, of the video's time - segment on which to perform the prediction. - Expressed as a number of seconds as measured - from the start of the video, with "s" appended - at the end. Fractions are allowed, up to a - microsecond precision. - time_segment_end (str): - The end, exclusive, of the video's time - segment on which to perform the prediction. - Expressed as a number of seconds as measured - from the start of the video, with "s" appended - at the end. Fractions are allowed, up to a - microsecond precision, and "inf" or "Infinity" - is allowed, which means the end of the video. - """ - - content = proto.Field( - proto.STRING, - number=1, - ) - mime_type = proto.Field( - proto.STRING, - number=2, - ) - time_segment_start = proto.Field( - proto.STRING, - number=3, - ) - time_segment_end = proto.Field( - proto.STRING, - number=4, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance/__init__.py b/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance/__init__.py deleted file mode 100644 index 5f9e065de0..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance/__init__.py +++ /dev/null @@ -1,37 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# - - -from google.cloud.aiplatform.v1beta1.schema.predict.instance_v1beta1.types.image_classification import ImageClassificationPredictionInstance -from google.cloud.aiplatform.v1beta1.schema.predict.instance_v1beta1.types.image_object_detection import ImageObjectDetectionPredictionInstance -from google.cloud.aiplatform.v1beta1.schema.predict.instance_v1beta1.types.image_segmentation import ImageSegmentationPredictionInstance -from google.cloud.aiplatform.v1beta1.schema.predict.instance_v1beta1.types.text_classification import TextClassificationPredictionInstance -from google.cloud.aiplatform.v1beta1.schema.predict.instance_v1beta1.types.text_extraction import TextExtractionPredictionInstance -from google.cloud.aiplatform.v1beta1.schema.predict.instance_v1beta1.types.text_sentiment import TextSentimentPredictionInstance -from google.cloud.aiplatform.v1beta1.schema.predict.instance_v1beta1.types.video_action_recognition import VideoActionRecognitionPredictionInstance -from google.cloud.aiplatform.v1beta1.schema.predict.instance_v1beta1.types.video_classification import VideoClassificationPredictionInstance -from google.cloud.aiplatform.v1beta1.schema.predict.instance_v1beta1.types.video_object_tracking import VideoObjectTrackingPredictionInstance - -__all__ = ('ImageClassificationPredictionInstance', - 'ImageObjectDetectionPredictionInstance', - 'ImageSegmentationPredictionInstance', - 'TextClassificationPredictionInstance', - 'TextExtractionPredictionInstance', - 'TextSentimentPredictionInstance', - 'VideoActionRecognitionPredictionInstance', - 'VideoClassificationPredictionInstance', - 'VideoObjectTrackingPredictionInstance', -) diff --git a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance/py.typed b/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance/py.typed deleted file mode 100644 index 46ccbaf568..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance/py.typed +++ /dev/null @@ -1,2 +0,0 @@ -# Marker file for PEP 561. -# The google-cloud-aiplatform-v1beta1-schema-predict-instance package uses inline types. diff --git a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/__init__.py b/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/__init__.py deleted file mode 100644 index 41ab5407a7..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/__init__.py +++ /dev/null @@ -1,38 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# - - -from .types.image_classification import ImageClassificationPredictionInstance -from .types.image_object_detection import ImageObjectDetectionPredictionInstance -from .types.image_segmentation import ImageSegmentationPredictionInstance -from .types.text_classification import TextClassificationPredictionInstance -from .types.text_extraction import TextExtractionPredictionInstance -from .types.text_sentiment import TextSentimentPredictionInstance -from .types.video_action_recognition import VideoActionRecognitionPredictionInstance -from .types.video_classification import VideoClassificationPredictionInstance -from .types.video_object_tracking import VideoObjectTrackingPredictionInstance - -__all__ = ( -'ImageClassificationPredictionInstance', -'ImageObjectDetectionPredictionInstance', -'ImageSegmentationPredictionInstance', -'TextClassificationPredictionInstance', -'TextExtractionPredictionInstance', -'TextSentimentPredictionInstance', -'VideoActionRecognitionPredictionInstance', -'VideoClassificationPredictionInstance', -'VideoObjectTrackingPredictionInstance', -) diff --git a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/gapic_metadata.json b/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/gapic_metadata.json deleted file mode 100644 index 38379e8208..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/gapic_metadata.json +++ /dev/null @@ -1,7 +0,0 @@ - { - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "python", - "libraryPackage": "google.cloud.aiplatform.v1beta1.schema.predict.instance_v1beta1", - "protoPackage": "google.cloud.aiplatform.v1beta1.schema.predict.instance", - "schema": "1.0" -} diff --git a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/py.typed b/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/py.typed deleted file mode 100644 index 46ccbaf568..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/py.typed +++ /dev/null @@ -1,2 +0,0 @@ -# Marker file for PEP 561. -# The google-cloud-aiplatform-v1beta1-schema-predict-instance package uses inline types. diff --git a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/services/__init__.py b/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/services/__init__.py deleted file mode 100644 index 4de65971c2..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/services/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# diff --git a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/types/__init__.py b/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/types/__init__.py deleted file mode 100644 index 80a5332604..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/types/__init__.py +++ /dev/null @@ -1,54 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -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', - 'ImageObjectDetectionPredictionInstance', - 'ImageSegmentationPredictionInstance', - 'TextClassificationPredictionInstance', - 'TextExtractionPredictionInstance', - 'TextSentimentPredictionInstance', - 'VideoActionRecognitionPredictionInstance', - 'VideoClassificationPredictionInstance', - 'VideoObjectTrackingPredictionInstance', -) diff --git a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/types/image_classification.py b/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/types/image_classification.py deleted file mode 100644 index 1f26544421..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/types/image_classification.py +++ /dev/null @@ -1,56 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1beta1.schema.predict.instance', - manifest={ - 'ImageClassificationPredictionInstance', - }, -) - - -class ImageClassificationPredictionInstance(proto.Message): - r"""Prediction input format for Image Classification. - - Attributes: - content (str): - The image bytes or Cloud Storage URI to make - the prediction on. - mime_type (str): - The MIME type of the content of the image. - Only the images in below listed MIME types are - supported. - image/jpeg - - image/gif - - image/png - - image/webp - - image/bmp - - image/tiff - - image/vnd.microsoft.icon - """ - - content = proto.Field( - proto.STRING, - number=1, - ) - mime_type = proto.Field( - proto.STRING, - number=2, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/types/image_object_detection.py b/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/types/image_object_detection.py deleted file mode 100644 index cfbe0848de..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/types/image_object_detection.py +++ /dev/null @@ -1,56 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1beta1.schema.predict.instance', - manifest={ - 'ImageObjectDetectionPredictionInstance', - }, -) - - -class ImageObjectDetectionPredictionInstance(proto.Message): - r"""Prediction input format for Image Object Detection. - - Attributes: - content (str): - The image bytes or Cloud Storage URI to make - the prediction on. - mime_type (str): - The MIME type of the content of the image. - Only the images in below listed MIME types are - supported. - image/jpeg - - image/gif - - image/png - - image/webp - - image/bmp - - image/tiff - - image/vnd.microsoft.icon - """ - - content = proto.Field( - proto.STRING, - number=1, - ) - mime_type = proto.Field( - proto.STRING, - number=2, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/types/image_segmentation.py b/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/types/image_segmentation.py deleted file mode 100644 index 359fe2b46d..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/types/image_segmentation.py +++ /dev/null @@ -1,50 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1beta1.schema.predict.instance', - manifest={ - 'ImageSegmentationPredictionInstance', - }, -) - - -class ImageSegmentationPredictionInstance(proto.Message): - r"""Prediction input format for Image Segmentation. - - Attributes: - content (str): - The image bytes to make the predictions on. - mime_type (str): - The MIME type of the content of the image. - Only the images in below listed MIME types are - supported. - image/jpeg - - image/png - """ - - content = proto.Field( - proto.STRING, - number=1, - ) - mime_type = proto.Field( - proto.STRING, - number=2, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/types/text_classification.py b/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/types/text_classification.py deleted file mode 100644 index 64d73cf6d5..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/types/text_classification.py +++ /dev/null @@ -1,49 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1beta1.schema.predict.instance', - manifest={ - 'TextClassificationPredictionInstance', - }, -) - - -class TextClassificationPredictionInstance(proto.Message): - r"""Prediction input format for Text Classification. - - Attributes: - content (str): - The text snippet to make the predictions on. - mime_type (str): - The MIME type of the text snippet. The - supported MIME types are listed below. - - text/plain - """ - - content = proto.Field( - proto.STRING, - number=1, - ) - mime_type = proto.Field( - proto.STRING, - number=2, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/types/text_extraction.py b/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/types/text_extraction.py deleted file mode 100644 index 85b3f90db3..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/types/text_extraction.py +++ /dev/null @@ -1,62 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1beta1.schema.predict.instance', - manifest={ - 'TextExtractionPredictionInstance', - }, -) - - -class TextExtractionPredictionInstance(proto.Message): - r"""Prediction input format for Text Extraction. - - Attributes: - content (str): - The text snippet to make the predictions on. - mime_type (str): - The MIME type of the text snippet. The - supported MIME types are listed below. - - text/plain - key (str): - This field is only used for batch prediction. - If a key is provided, the batch prediction - result will by mapped to this key. If omitted, - then the batch prediction result will contain - the entire input instance. Vertex AI will not - check if keys in the request are duplicates, so - it is up to the caller to ensure the keys are - unique. - """ - - content = proto.Field( - proto.STRING, - number=1, - ) - mime_type = proto.Field( - proto.STRING, - number=2, - ) - key = proto.Field( - proto.STRING, - number=3, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/types/text_sentiment.py b/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/types/text_sentiment.py deleted file mode 100644 index 12f3d1bbcb..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/types/text_sentiment.py +++ /dev/null @@ -1,49 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1beta1.schema.predict.instance', - manifest={ - 'TextSentimentPredictionInstance', - }, -) - - -class TextSentimentPredictionInstance(proto.Message): - r"""Prediction input format for Text Sentiment. - - Attributes: - content (str): - The text snippet to make the predictions on. - mime_type (str): - The MIME type of the text snippet. The - supported MIME types are listed below. - - text/plain - """ - - content = proto.Field( - proto.STRING, - number=1, - ) - mime_type = proto.Field( - proto.STRING, - number=2, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/types/video_action_recognition.py b/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/types/video_action_recognition.py deleted file mode 100644 index 8a1c9df47f..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/types/video_action_recognition.py +++ /dev/null @@ -1,73 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1beta1.schema.predict.instance', - manifest={ - 'VideoActionRecognitionPredictionInstance', - }, -) - - -class VideoActionRecognitionPredictionInstance(proto.Message): - r"""Prediction input format for Video Action Recognition. - - Attributes: - content (str): - The Google Cloud Storage location of the - video on which to perform the prediction. - mime_type (str): - The MIME type of the content of the video. - Only the following are supported: video/mp4 - video/avi video/quicktime - time_segment_start (str): - The beginning, inclusive, of the video's time - segment on which to perform the prediction. - Expressed as a number of seconds as measured - from the start of the video, with "s" appended - at the end. Fractions are allowed, up to a - microsecond precision. - time_segment_end (str): - The end, exclusive, of the video's time - segment on which to perform the prediction. - Expressed as a number of seconds as measured - from the start of the video, with "s" appended - at the end. Fractions are allowed, up to a - microsecond precision, and "inf" or "Infinity" - is allowed, which means the end of the video. - """ - - content = proto.Field( - proto.STRING, - number=1, - ) - mime_type = proto.Field( - proto.STRING, - number=2, - ) - time_segment_start = proto.Field( - proto.STRING, - number=3, - ) - time_segment_end = proto.Field( - proto.STRING, - number=4, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/types/video_classification.py b/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/types/video_classification.py deleted file mode 100644 index fee71d3894..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/types/video_classification.py +++ /dev/null @@ -1,73 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1beta1.schema.predict.instance', - manifest={ - 'VideoClassificationPredictionInstance', - }, -) - - -class VideoClassificationPredictionInstance(proto.Message): - r"""Prediction input format for Video Classification. - - Attributes: - content (str): - The Google Cloud Storage location of the - video on which to perform the prediction. - mime_type (str): - The MIME type of the content of the video. - Only the following are supported: video/mp4 - video/avi video/quicktime - time_segment_start (str): - The beginning, inclusive, of the video's time - segment on which to perform the prediction. - Expressed as a number of seconds as measured - from the start of the video, with "s" appended - at the end. Fractions are allowed, up to a - microsecond precision. - time_segment_end (str): - The end, exclusive, of the video's time - segment on which to perform the prediction. - Expressed as a number of seconds as measured - from the start of the video, with "s" appended - at the end. Fractions are allowed, up to a - microsecond precision, and "inf" or "Infinity" - is allowed, which means the end of the video. - """ - - content = proto.Field( - proto.STRING, - number=1, - ) - mime_type = proto.Field( - proto.STRING, - number=2, - ) - time_segment_start = proto.Field( - proto.STRING, - number=3, - ) - time_segment_end = proto.Field( - proto.STRING, - number=4, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/types/video_object_tracking.py b/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/types/video_object_tracking.py deleted file mode 100644 index 19e15615f1..0000000000 --- a/schema/predict/instance/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/types/video_object_tracking.py +++ /dev/null @@ -1,73 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1beta1.schema.predict.instance', - manifest={ - 'VideoObjectTrackingPredictionInstance', - }, -) - - -class VideoObjectTrackingPredictionInstance(proto.Message): - r"""Prediction input format for Video Object Tracking. - - Attributes: - content (str): - The Google Cloud Storage location of the - video on which to perform the prediction. - mime_type (str): - The MIME type of the content of the video. - Only the following are supported: video/mp4 - video/avi video/quicktime - time_segment_start (str): - The beginning, inclusive, of the video's time - segment on which to perform the prediction. - Expressed as a number of seconds as measured - from the start of the video, with "s" appended - at the end. Fractions are allowed, up to a - microsecond precision. - time_segment_end (str): - The end, exclusive, of the video's time - segment on which to perform the prediction. - Expressed as a number of seconds as measured - from the start of the video, with "s" appended - at the end. Fractions are allowed, up to a - microsecond precision, and "inf" or "Infinity" - is allowed, which means the end of the video. - """ - - content = proto.Field( - proto.STRING, - number=1, - ) - mime_type = proto.Field( - proto.STRING, - number=2, - ) - time_segment_start = proto.Field( - proto.STRING, - number=3, - ) - time_segment_end = proto.Field( - proto.STRING, - number=4, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/instance/mypy.ini b/schema/predict/instance/mypy.ini deleted file mode 100644 index 4505b48543..0000000000 --- a/schema/predict/instance/mypy.ini +++ /dev/null @@ -1,3 +0,0 @@ -[mypy] -python_version = 3.6 -namespace_packages = True diff --git a/schema/predict/instance/noxfile.py b/schema/predict/instance/noxfile.py deleted file mode 100644 index c8d234927c..0000000000 --- a/schema/predict/instance/noxfile.py +++ /dev/null @@ -1,132 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 os -import pathlib -import shutil -import subprocess -import sys - - -import nox # type: ignore - -CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() - -LOWER_BOUND_CONSTRAINTS_FILE = CURRENT_DIRECTORY / "constraints.txt" -PACKAGE_NAME = subprocess.check_output([sys.executable, "setup.py", "--name"], encoding="utf-8") - - -nox.sessions = [ - "unit", - "cover", - "mypy", - "check_lower_bounds" - # exclude update_lower_bounds from default - "docs", -] - -@nox.session(python=['3.6', '3.7', '3.8', '3.9']) -def unit(session): - """Run the unit test suite.""" - - session.install('coverage', 'pytest', 'pytest-cov', 'asyncmock', 'pytest-asyncio') - session.install('-e', '.') - - session.run( - 'py.test', - '--quiet', - '--cov=google/cloud/aiplatform/v1/schema/predict/instance_v1/', - '--cov-config=.coveragerc', - '--cov-report=term', - '--cov-report=html', - os.path.join('tests', 'unit', ''.join(session.posargs)) - ) - - -@nox.session(python='3.7') -def cover(session): - """Run the final coverage report. - This outputs the coverage report aggregating coverage from the unit - test runs (not system test runs), and then erases coverage data. - """ - session.install("coverage", "pytest-cov") - session.run("coverage", "report", "--show-missing", "--fail-under=100") - - session.run("coverage", "erase") - - -@nox.session(python=['3.6', '3.7']) -def mypy(session): - """Run the type checker.""" - session.install('mypy', 'types-pkg_resources') - session.install('.') - session.run( - 'mypy', - '--explicit-package-bases', - 'google', - ) - - -@nox.session -def update_lower_bounds(session): - """Update lower bounds in constraints.txt to match setup.py""" - session.install('google-cloud-testutils') - session.install('.') - - session.run( - 'lower-bound-checker', - 'update', - '--package-name', - PACKAGE_NAME, - '--constraints-file', - str(LOWER_BOUND_CONSTRAINTS_FILE), - ) - - -@nox.session -def check_lower_bounds(session): - """Check lower bounds in setup.py are reflected in constraints file""" - session.install('google-cloud-testutils') - session.install('.') - - session.run( - 'lower-bound-checker', - 'check', - '--package-name', - PACKAGE_NAME, - '--constraints-file', - str(LOWER_BOUND_CONSTRAINTS_FILE), - ) - -@nox.session(python='3.6') -def docs(session): - """Build the docs for this library.""" - - session.install("-e", ".") - session.install("sphinx<3.0.0", "alabaster", "recommonmark") - - shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) - session.run( - "sphinx-build", - "-W", # warnings as errors - "-T", # show full traceback on exception - "-N", # no colors - "-b", - "html", - "-d", - os.path.join("docs", "_build", "doctrees", ""), - os.path.join("docs", ""), - os.path.join("docs", "_build", "html", ""), - ) diff --git a/schema/predict/instance/scripts/fixup_instance_v1_keywords.py b/schema/predict/instance/scripts/fixup_instance_v1_keywords.py deleted file mode 100644 index 52fe576948..0000000000 --- a/schema/predict/instance/scripts/fixup_instance_v1_keywords.py +++ /dev/null @@ -1,175 +0,0 @@ -#! /usr/bin/env python3 -# -*- coding: utf-8 -*- -# Copyright 2020 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 argparse -import os -import libcst as cst -import pathlib -import sys -from typing import (Any, Callable, Dict, List, Sequence, Tuple) - - -def partition( - predicate: Callable[[Any], bool], - iterator: Sequence[Any] -) -> Tuple[List[Any], List[Any]]: - """A stable, out-of-place partition.""" - results = ([], []) - - for i in iterator: - results[int(predicate(i))].append(i) - - # Returns trueList, falseList - return results[1], results[0] - - -class instanceCallTransformer(cst.CSTTransformer): - CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata') - METHOD_TO_PARAMS: Dict[str, Tuple[str]] = { - } - - def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: - try: - key = original.func.attr.value - kword_params = self.METHOD_TO_PARAMS[key] - except (AttributeError, KeyError): - # Either not a method from the API or too convoluted to be sure. - return updated - - # If the existing code is valid, keyword args come after positional args. - # Therefore, all positional args must map to the first parameters. - args, kwargs = partition(lambda a: not bool(a.keyword), updated.args) - if any(k.keyword.value == "request" for k in kwargs): - # We've already fixed this file, don't fix it again. - return updated - - kwargs, ctrl_kwargs = partition( - lambda a: a.keyword.value not in self.CTRL_PARAMS, - kwargs - ) - - args, ctrl_args = args[:len(kword_params)], args[len(kword_params):] - ctrl_kwargs.extend(cst.Arg(value=a.value, keyword=cst.Name(value=ctrl)) - for a, ctrl in zip(ctrl_args, self.CTRL_PARAMS)) - - request_arg = cst.Arg( - value=cst.Dict([ - cst.DictElement( - cst.SimpleString("'{}'".format(name)), -cst.Element(value=arg.value) - ) - # Note: the args + kwargs looks silly, but keep in mind that - # the control parameters had to be stripped out, and that - # those could have been passed positionally or by keyword. - for name, arg in zip(kword_params, args + kwargs)]), - keyword=cst.Name("request") - ) - - return updated.with_changes( - args=[request_arg] + ctrl_kwargs - ) - - -def fix_files( - in_dir: pathlib.Path, - out_dir: pathlib.Path, - *, - transformer=instanceCallTransformer(), -): - """Duplicate the input dir to the output dir, fixing file method calls. - - Preconditions: - * in_dir is a real directory - * out_dir is a real, empty directory - """ - pyfile_gen = ( - pathlib.Path(os.path.join(root, f)) - for root, _, files in os.walk(in_dir) - for f in files if os.path.splitext(f)[1] == ".py" - ) - - for fpath in pyfile_gen: - with open(fpath, 'r') as f: - src = f.read() - - # Parse the code and insert method call fixes. - tree = cst.parse_module(src) - updated = tree.visit(transformer) - - # Create the path and directory structure for the new file. - updated_path = out_dir.joinpath(fpath.relative_to(in_dir)) - updated_path.parent.mkdir(parents=True, exist_ok=True) - - # Generate the updated source file at the corresponding path. - with open(updated_path, 'w') as f: - f.write(updated.code) - - -if __name__ == '__main__': - parser = argparse.ArgumentParser( - description="""Fix up source that uses the instance client library. - -The existing sources are NOT overwritten but are copied to output_dir with changes made. - -Note: This tool operates at a best-effort level at converting positional - parameters in client method calls to keyword based parameters. - Cases where it WILL FAIL include - A) * or ** expansion in a method call. - B) Calls via function or method alias (includes free function calls) - C) Indirect or dispatched calls (e.g. the method is looked up dynamically) - - These all constitute false negatives. The tool will also detect false - positives when an API method shares a name with another method. -""") - parser.add_argument( - '-d', - '--input-directory', - required=True, - dest='input_dir', - help='the input directory to walk for python files to fix up', - ) - parser.add_argument( - '-o', - '--output-directory', - required=True, - dest='output_dir', - help='the directory to output files fixed via un-flattening', - ) - args = parser.parse_args() - input_dir = pathlib.Path(args.input_dir) - output_dir = pathlib.Path(args.output_dir) - if not input_dir.is_dir(): - print( - f"input directory '{input_dir}' does not exist or is not a directory", - file=sys.stderr, - ) - sys.exit(-1) - - if not output_dir.is_dir(): - print( - f"output directory '{output_dir}' does not exist or is not a directory", - file=sys.stderr, - ) - sys.exit(-1) - - if os.listdir(output_dir): - print( - f"output directory '{output_dir}' is not empty", - file=sys.stderr, - ) - sys.exit(-1) - - fix_files(input_dir, output_dir) diff --git a/schema/predict/instance/scripts/fixup_instance_v1beta1_keywords.py b/schema/predict/instance/scripts/fixup_instance_v1beta1_keywords.py deleted file mode 100644 index 52fe576948..0000000000 --- a/schema/predict/instance/scripts/fixup_instance_v1beta1_keywords.py +++ /dev/null @@ -1,175 +0,0 @@ -#! /usr/bin/env python3 -# -*- coding: utf-8 -*- -# Copyright 2020 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 argparse -import os -import libcst as cst -import pathlib -import sys -from typing import (Any, Callable, Dict, List, Sequence, Tuple) - - -def partition( - predicate: Callable[[Any], bool], - iterator: Sequence[Any] -) -> Tuple[List[Any], List[Any]]: - """A stable, out-of-place partition.""" - results = ([], []) - - for i in iterator: - results[int(predicate(i))].append(i) - - # Returns trueList, falseList - return results[1], results[0] - - -class instanceCallTransformer(cst.CSTTransformer): - CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata') - METHOD_TO_PARAMS: Dict[str, Tuple[str]] = { - } - - def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: - try: - key = original.func.attr.value - kword_params = self.METHOD_TO_PARAMS[key] - except (AttributeError, KeyError): - # Either not a method from the API or too convoluted to be sure. - return updated - - # If the existing code is valid, keyword args come after positional args. - # Therefore, all positional args must map to the first parameters. - args, kwargs = partition(lambda a: not bool(a.keyword), updated.args) - if any(k.keyword.value == "request" for k in kwargs): - # We've already fixed this file, don't fix it again. - return updated - - kwargs, ctrl_kwargs = partition( - lambda a: a.keyword.value not in self.CTRL_PARAMS, - kwargs - ) - - args, ctrl_args = args[:len(kword_params)], args[len(kword_params):] - ctrl_kwargs.extend(cst.Arg(value=a.value, keyword=cst.Name(value=ctrl)) - for a, ctrl in zip(ctrl_args, self.CTRL_PARAMS)) - - request_arg = cst.Arg( - value=cst.Dict([ - cst.DictElement( - cst.SimpleString("'{}'".format(name)), -cst.Element(value=arg.value) - ) - # Note: the args + kwargs looks silly, but keep in mind that - # the control parameters had to be stripped out, and that - # those could have been passed positionally or by keyword. - for name, arg in zip(kword_params, args + kwargs)]), - keyword=cst.Name("request") - ) - - return updated.with_changes( - args=[request_arg] + ctrl_kwargs - ) - - -def fix_files( - in_dir: pathlib.Path, - out_dir: pathlib.Path, - *, - transformer=instanceCallTransformer(), -): - """Duplicate the input dir to the output dir, fixing file method calls. - - Preconditions: - * in_dir is a real directory - * out_dir is a real, empty directory - """ - pyfile_gen = ( - pathlib.Path(os.path.join(root, f)) - for root, _, files in os.walk(in_dir) - for f in files if os.path.splitext(f)[1] == ".py" - ) - - for fpath in pyfile_gen: - with open(fpath, 'r') as f: - src = f.read() - - # Parse the code and insert method call fixes. - tree = cst.parse_module(src) - updated = tree.visit(transformer) - - # Create the path and directory structure for the new file. - updated_path = out_dir.joinpath(fpath.relative_to(in_dir)) - updated_path.parent.mkdir(parents=True, exist_ok=True) - - # Generate the updated source file at the corresponding path. - with open(updated_path, 'w') as f: - f.write(updated.code) - - -if __name__ == '__main__': - parser = argparse.ArgumentParser( - description="""Fix up source that uses the instance client library. - -The existing sources are NOT overwritten but are copied to output_dir with changes made. - -Note: This tool operates at a best-effort level at converting positional - parameters in client method calls to keyword based parameters. - Cases where it WILL FAIL include - A) * or ** expansion in a method call. - B) Calls via function or method alias (includes free function calls) - C) Indirect or dispatched calls (e.g. the method is looked up dynamically) - - These all constitute false negatives. The tool will also detect false - positives when an API method shares a name with another method. -""") - parser.add_argument( - '-d', - '--input-directory', - required=True, - dest='input_dir', - help='the input directory to walk for python files to fix up', - ) - parser.add_argument( - '-o', - '--output-directory', - required=True, - dest='output_dir', - help='the directory to output files fixed via un-flattening', - ) - args = parser.parse_args() - input_dir = pathlib.Path(args.input_dir) - output_dir = pathlib.Path(args.output_dir) - if not input_dir.is_dir(): - print( - f"input directory '{input_dir}' does not exist or is not a directory", - file=sys.stderr, - ) - sys.exit(-1) - - if not output_dir.is_dir(): - print( - f"output directory '{output_dir}' does not exist or is not a directory", - file=sys.stderr, - ) - sys.exit(-1) - - if os.listdir(output_dir): - print( - f"output directory '{output_dir}' is not empty", - file=sys.stderr, - ) - sys.exit(-1) - - fix_files(input_dir, output_dir) diff --git a/schema/predict/instance/setup.py b/schema/predict/instance/setup.py deleted file mode 100644 index c6f5e50d64..0000000000 --- a/schema/predict/instance/setup.py +++ /dev/null @@ -1,54 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 io -import os -import setuptools # type: ignore - -version = '0.1.0' - -package_root = os.path.abspath(os.path.dirname(__file__)) - -readme_filename = os.path.join(package_root, 'README.rst') -with io.open(readme_filename, encoding='utf-8') as readme_file: - readme = readme_file.read() - -setuptools.setup( - name='google-cloud-aiplatform-v1-schema-predict-instance', - version=version, - long_description=readme, - packages=setuptools.PEP420PackageFinder.find(), - namespace_packages=('google', 'google.cloud', 'google.cloud.aiplatform', 'google.cloud.aiplatform.v1', 'google.cloud.aiplatform.v1.schema', 'google.cloud.aiplatform.v1.schema.predict'), - platforms='Posix; MacOS X; Windows', - include_package_data=True, - install_requires=( - 'google-api-core[grpc] >= 1.27.0, < 3.0.0dev', - 'libcst >= 0.2.5', - 'proto-plus >= 1.15.0', - 'packaging >= 14.3', ), - python_requires='>=3.6', - classifiers=[ - 'Development Status :: 3 - Alpha', - 'Intended Audience :: Developers', - 'Operating System :: OS Independent', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Topic :: Internet', - 'Topic :: Software Development :: Libraries :: Python Modules', - ], - zip_safe=False, -) diff --git a/schema/predict/instance/tests/__init__.py b/schema/predict/instance/tests/__init__.py deleted file mode 100644 index b54a5fcc42..0000000000 --- a/schema/predict/instance/tests/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ - -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# diff --git a/schema/predict/instance/tests/unit/__init__.py b/schema/predict/instance/tests/unit/__init__.py deleted file mode 100644 index b54a5fcc42..0000000000 --- a/schema/predict/instance/tests/unit/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ - -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# diff --git a/schema/predict/instance/tests/unit/gapic/__init__.py b/schema/predict/instance/tests/unit/gapic/__init__.py deleted file mode 100644 index b54a5fcc42..0000000000 --- a/schema/predict/instance/tests/unit/gapic/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ - -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# diff --git a/schema/predict/instance/tests/unit/gapic/instance_v1/__init__.py b/schema/predict/instance/tests/unit/gapic/instance_v1/__init__.py deleted file mode 100644 index b54a5fcc42..0000000000 --- a/schema/predict/instance/tests/unit/gapic/instance_v1/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ - -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# diff --git a/schema/predict/instance/tests/unit/gapic/instance_v1beta1/__init__.py b/schema/predict/instance/tests/unit/gapic/instance_v1beta1/__init__.py deleted file mode 100644 index b54a5fcc42..0000000000 --- a/schema/predict/instance/tests/unit/gapic/instance_v1beta1/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ - -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# diff --git a/schema/predict/params/.coveragerc b/schema/predict/params/.coveragerc deleted file mode 100644 index 06aa51376d..0000000000 --- a/schema/predict/params/.coveragerc +++ /dev/null @@ -1,17 +0,0 @@ -[run] -branch = True - -[report] -show_missing = True -omit = - google/cloud/aiplatform/v1/schema/predict/params/__init__.py -exclude_lines = - # Re-enable the standard pragma - pragma: NO COVER - # Ignore debug-only repr - def __repr__ - # Ignore pkg_resources exceptions. - # This is added at the module level as a safeguard for if someone - # generates the code and tries to run it without pip installing. This - # makes it virtually impossible to test properly. - except pkg_resources.DistributionNotFound diff --git a/schema/predict/params/MANIFEST.in b/schema/predict/params/MANIFEST.in deleted file mode 100644 index b990fba651..0000000000 --- a/schema/predict/params/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -recursive-include google/cloud/aiplatform/v1/schema/predict/params *.py -recursive-include google/cloud/aiplatform/v1/schema/predict/params_v1 *.py diff --git a/schema/predict/params/README.rst b/schema/predict/params/README.rst deleted file mode 100644 index 60be3b2705..0000000000 --- a/schema/predict/params/README.rst +++ /dev/null @@ -1,49 +0,0 @@ -Python Client for Google Cloud Aiplatform V1 Schema Predict Params API -================================================= - -Quick Start ------------ - -In order to use this library, you first need to go through the following steps: - -1. `Select or create a Cloud Platform project.`_ -2. `Enable billing for your project.`_ -3. Enable the Google Cloud Aiplatform V1 Schema Predict Params API. -4. `Setup Authentication.`_ - -.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project -.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project -.. _Setup Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html - -Installation -~~~~~~~~~~~~ - -Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to -create isolated Python environments. The basic problem it addresses is one of -dependencies and versions, and indirectly permissions. - -With `virtualenv`_, it's possible to install this library without needing system -install permissions, and without clashing with the installed system -dependencies. - -.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/ - - -Mac/Linux -^^^^^^^^^ - -.. code-block:: console - - python3 -m venv - source /bin/activate - /bin/pip install /path/to/library - - -Windows -^^^^^^^ - -.. code-block:: console - - python3 -m venv - \Scripts\activate - \Scripts\pip.exe install \path\to\library diff --git a/schema/predict/params/docs/conf.py b/schema/predict/params/docs/conf.py deleted file mode 100644 index 6917071403..0000000000 --- a/schema/predict/params/docs/conf.py +++ /dev/null @@ -1,376 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# -# google-cloud-aiplatform-v1-schema-predict-params documentation build configuration file -# -# This file is execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -import sys -import os -import shlex - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -sys.path.insert(0, os.path.abspath("..")) - -__version__ = "0.1.0" - -# -- General configuration ------------------------------------------------ - -# If your documentation needs a minimal Sphinx version, state it here. -needs_sphinx = "1.6.3" - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ - "sphinx.ext.autodoc", - "sphinx.ext.autosummary", - "sphinx.ext.intersphinx", - "sphinx.ext.coverage", - "sphinx.ext.napoleon", - "sphinx.ext.todo", - "sphinx.ext.viewcode", -] - -# autodoc/autosummary flags -autoclass_content = "both" -autodoc_default_flags = ["members"] -autosummary_generate = True - - -# Add any paths that contain templates here, relative to this directory. -templates_path = ["_templates"] - -# Allow markdown includes (so releases.md can include CHANGLEOG.md) -# http://www.sphinx-doc.org/en/master/markdown.html -source_parsers = {".md": "recommonmark.parser.CommonMarkParser"} - -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -source_suffix = [".rst", ".md"] - -# The encoding of source files. -# source_encoding = 'utf-8-sig' - -# The master toctree document. -master_doc = "index" - -# General information about the project. -project = u"google-cloud-aiplatform-v1-schema-predict-params" -copyright = u"2020, Google, LLC" -author = u"Google APIs" # TODO: autogenerate this bit - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The full version, including alpha/beta/rc tags. -release = __version__ -# The short X.Y version. -version = ".".join(release.split(".")[0:2]) - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -language = None - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -# today = '' -# Else, today_fmt is used as the format for a strftime call. -# today_fmt = '%B %d, %Y' - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -exclude_patterns = ["_build"] - -# The reST default role (used for this markup: `text`) to use for all -# documents. -# default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -# add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -# add_module_names = True - -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -# show_authors = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = "sphinx" - -# A list of ignored prefixes for module index sorting. -# modindex_common_prefix = [] - -# If true, keep warnings as "system message" paragraphs in the built documents. -# keep_warnings = False - -# If true, `todo` and `todoList` produce output, else they produce nothing. -todo_include_todos = True - - -# -- Options for HTML output ---------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -html_theme = "alabaster" - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -html_theme_options = { - "description": "Google Cloud Aiplatform V1 Schema Predict Client Libraries for Python", - "github_user": "googleapis", - "github_repo": "google-cloud-python", - "github_banner": True, - "font_family": "'Roboto', Georgia, sans", - "head_font_family": "'Roboto', Georgia, serif", - "code_font_family": "'Roboto Mono', 'Consolas', monospace", -} - -# Add any paths that contain custom themes here, relative to this directory. -# html_theme_path = [] - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -# html_title = None - -# A shorter title for the navigation bar. Default is the same as html_title. -# html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -# html_logo = None - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -# html_favicon = None - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ["_static"] - -# Add any extra paths that contain custom files (such as robots.txt or -# .htaccess) here, relative to this directory. These files are copied -# directly to the root of the documentation. -# html_extra_path = [] - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -# html_last_updated_fmt = '%b %d, %Y' - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -# html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -# html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -# html_additional_pages = {} - -# If false, no module index is generated. -# html_domain_indices = True - -# If false, no index is generated. -# html_use_index = True - -# If true, the index is split into individual pages for each letter. -# html_split_index = False - -# If true, links to the reST sources are added to the pages. -# html_show_sourcelink = True - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -# html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -# html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -# html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -# html_file_suffix = None - -# Language to be used for generating the HTML full-text search index. -# Sphinx supports the following languages: -# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' -# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr' -# html_search_language = 'en' - -# A dictionary with options for the search language support, empty by default. -# Now only 'ja' uses this config value -# html_search_options = {'type': 'default'} - -# The name of a javascript file (relative to the configuration directory) that -# implements a search results scorer. If empty, the default will be used. -# html_search_scorer = 'scorer.js' - -# Output file base name for HTML help builder. -htmlhelp_basename = "google-cloud-aiplatform-v1-schema-predict-params-doc" - -# -- Options for warnings ------------------------------------------------------ - - -suppress_warnings = [ - # Temporarily suppress this to avoid "more than one target found for - # cross-reference" warning, which are intractable for us to avoid while in - # a mono-repo. - # See https://github.com/sphinx-doc/sphinx/blob - # /2a65ffeef5c107c19084fabdd706cdff3f52d93c/sphinx/domains/python.py#L843 - "ref.python" -] - -# -- Options for LaTeX output --------------------------------------------- - -latex_elements = { - # The paper size ('letterpaper' or 'a4paper'). - # 'papersize': 'letterpaper', - # The font size ('10pt', '11pt' or '12pt'). - # 'pointsize': '10pt', - # Additional stuff for the LaTeX preamble. - # 'preamble': '', - # Latex figure (float) alignment - # 'figure_align': 'htbp', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - ( - master_doc, - "google-cloud-aiplatform-v1-schema-predict-params.tex", - u"google-cloud-aiplatform-v1-schema-predict-params Documentation", - author, - "manual", - ) -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -# latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -# latex_use_parts = False - -# If true, show page references after internal links. -# latex_show_pagerefs = False - -# If true, show URL addresses after external links. -# latex_show_urls = False - -# Documents to append as an appendix to all manuals. -# latex_appendices = [] - -# If false, no module index is generated. -# latex_domain_indices = True - - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - ( - master_doc, - "google-cloud-aiplatform-v1-schema-predict-params", - u"Google Cloud Aiplatform V1 Schema Predict Params Documentation", - [author], - 1, - ) -] - -# If true, show URL addresses after external links. -# man_show_urls = False - - -# -- Options for Texinfo output ------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - ( - master_doc, - "google-cloud-aiplatform-v1-schema-predict-params", - u"google-cloud-aiplatform-v1-schema-predict-params Documentation", - author, - "google-cloud-aiplatform-v1-schema-predict-params", - "GAPIC library for Google Cloud Aiplatform V1 Schema Predict Params API", - "APIs", - ) -] - -# Documents to append as an appendix to all manuals. -# texinfo_appendices = [] - -# If false, no module index is generated. -# texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -# texinfo_show_urls = 'footnote' - -# If true, do not generate a @detailmenu in the "Top" node's menu. -# texinfo_no_detailmenu = False - - -# Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = { - "python": ("http://python.readthedocs.org/en/latest/", None), - "gax": ("https://gax-python.readthedocs.org/en/latest/", None), - "google-auth": ("https://google-auth.readthedocs.io/en/stable", None), - "google-gax": ("https://gax-python.readthedocs.io/en/latest/", None), - "google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None), - "grpc": ("https://grpc.io/grpc/python/", None), - "requests": ("http://requests.kennethreitz.org/en/stable/", None), - "proto": ("https://proto-plus-python.readthedocs.io/en/stable", None), - "protobuf": ("https://googleapis.dev/python/protobuf/latest/", None), -} - - -# Napoleon settings -napoleon_google_docstring = True -napoleon_numpy_docstring = True -napoleon_include_private_with_doc = False -napoleon_include_special_with_doc = True -napoleon_use_admonition_for_examples = False -napoleon_use_admonition_for_notes = False -napoleon_use_admonition_for_references = False -napoleon_use_ivar = False -napoleon_use_param = True -napoleon_use_rtype = True diff --git a/schema/predict/params/docs/index.rst b/schema/predict/params/docs/index.rst deleted file mode 100644 index e90a1a5814..0000000000 --- a/schema/predict/params/docs/index.rst +++ /dev/null @@ -1,7 +0,0 @@ -API Reference -------------- -.. toctree:: - :maxdepth: 2 - - params_v1/services - params_v1/types diff --git a/schema/predict/params/docs/params_v1/services.rst b/schema/predict/params/docs/params_v1/services.rst deleted file mode 100644 index bf08ea6e98..0000000000 --- a/schema/predict/params/docs/params_v1/services.rst +++ /dev/null @@ -1,4 +0,0 @@ -Services for Google Cloud Aiplatform V1 Schema Predict Params v1 API -==================================================================== -.. toctree:: - :maxdepth: 2 diff --git a/schema/predict/params/docs/params_v1/types.rst b/schema/predict/params/docs/params_v1/types.rst deleted file mode 100644 index 956ef5224d..0000000000 --- a/schema/predict/params/docs/params_v1/types.rst +++ /dev/null @@ -1,7 +0,0 @@ -Types for Google Cloud Aiplatform V1 Schema Predict Params v1 API -================================================================= - -.. automodule:: google.cloud.aiplatform.v1.schema.predict.params_v1.types - :members: - :undoc-members: - :show-inheritance: diff --git a/schema/predict/params/docs/params_v1beta1/services.rst b/schema/predict/params/docs/params_v1beta1/services.rst deleted file mode 100644 index b3b897a0f4..0000000000 --- a/schema/predict/params/docs/params_v1beta1/services.rst +++ /dev/null @@ -1,4 +0,0 @@ -Services for Google Cloud Aiplatform V1beta1 Schema Predict Params v1beta1 API -============================================================================== -.. toctree:: - :maxdepth: 2 diff --git a/schema/predict/params/docs/params_v1beta1/types.rst b/schema/predict/params/docs/params_v1beta1/types.rst deleted file mode 100644 index 722a1d8ba0..0000000000 --- a/schema/predict/params/docs/params_v1beta1/types.rst +++ /dev/null @@ -1,7 +0,0 @@ -Types for Google Cloud Aiplatform V1beta1 Schema Predict Params v1beta1 API -=========================================================================== - -.. automodule:: google.cloud.aiplatform.v1beta1.schema.predict.params_v1beta1.types - :members: - :undoc-members: - :show-inheritance: diff --git a/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params/__init__.py b/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params/__init__.py deleted file mode 100644 index 91ae7f0d5c..0000000000 --- a/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# - - -from google.cloud.aiplatform.v1.schema.predict.params_v1.types.image_classification import ImageClassificationPredictionParams -from google.cloud.aiplatform.v1.schema.predict.params_v1.types.image_object_detection import ImageObjectDetectionPredictionParams -from google.cloud.aiplatform.v1.schema.predict.params_v1.types.image_segmentation import ImageSegmentationPredictionParams -from google.cloud.aiplatform.v1.schema.predict.params_v1.types.video_action_recognition import VideoActionRecognitionPredictionParams -from google.cloud.aiplatform.v1.schema.predict.params_v1.types.video_classification import VideoClassificationPredictionParams -from google.cloud.aiplatform.v1.schema.predict.params_v1.types.video_object_tracking import VideoObjectTrackingPredictionParams - -__all__ = ('ImageClassificationPredictionParams', - 'ImageObjectDetectionPredictionParams', - 'ImageSegmentationPredictionParams', - 'VideoActionRecognitionPredictionParams', - 'VideoClassificationPredictionParams', - 'VideoObjectTrackingPredictionParams', -) diff --git a/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params/py.typed b/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params/py.typed deleted file mode 100644 index df96e61590..0000000000 --- a/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params/py.typed +++ /dev/null @@ -1,2 +0,0 @@ -# Marker file for PEP 561. -# The google-cloud-aiplatform-v1-schema-predict-params package uses inline types. diff --git a/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/__init__.py b/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/__init__.py deleted file mode 100644 index 91b718b437..0000000000 --- a/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/__init__.py +++ /dev/null @@ -1,32 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# - - -from .types.image_classification import ImageClassificationPredictionParams -from .types.image_object_detection import ImageObjectDetectionPredictionParams -from .types.image_segmentation import ImageSegmentationPredictionParams -from .types.video_action_recognition import VideoActionRecognitionPredictionParams -from .types.video_classification import VideoClassificationPredictionParams -from .types.video_object_tracking import VideoObjectTrackingPredictionParams - -__all__ = ( -'ImageClassificationPredictionParams', -'ImageObjectDetectionPredictionParams', -'ImageSegmentationPredictionParams', -'VideoActionRecognitionPredictionParams', -'VideoClassificationPredictionParams', -'VideoObjectTrackingPredictionParams', -) diff --git a/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/gapic_metadata.json b/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/gapic_metadata.json deleted file mode 100644 index edfffb441b..0000000000 --- a/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/gapic_metadata.json +++ /dev/null @@ -1,7 +0,0 @@ - { - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "python", - "libraryPackage": "google.cloud.aiplatform.v1.schema.predict.params_v1", - "protoPackage": "google.cloud.aiplatform.v1.schema.predict.params", - "schema": "1.0" -} diff --git a/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/py.typed b/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/py.typed deleted file mode 100644 index df96e61590..0000000000 --- a/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/py.typed +++ /dev/null @@ -1,2 +0,0 @@ -# Marker file for PEP 561. -# The google-cloud-aiplatform-v1-schema-predict-params package uses inline types. diff --git a/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/services/__init__.py b/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/services/__init__.py deleted file mode 100644 index 4de65971c2..0000000000 --- a/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/services/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# diff --git a/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/types/__init__.py b/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/types/__init__.py deleted file mode 100644 index 70a92bb59c..0000000000 --- a/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/types/__init__.py +++ /dev/null @@ -1,42 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -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', - 'ImageObjectDetectionPredictionParams', - 'ImageSegmentationPredictionParams', - 'VideoActionRecognitionPredictionParams', - 'VideoClassificationPredictionParams', - 'VideoObjectTrackingPredictionParams', -) diff --git a/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/types/image_classification.py b/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/types/image_classification.py deleted file mode 100644 index 07324dfbb8..0000000000 --- a/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/types/image_classification.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1.schema.predict.params', - manifest={ - 'ImageClassificationPredictionParams', - }, -) - - -class ImageClassificationPredictionParams(proto.Message): - r"""Prediction model parameters for Image Classification. - - Attributes: - confidence_threshold (float): - The Model only returns predictions with at - least this confidence score. Default value is - 0.0 - max_predictions (int): - The Model only returns up to that many top, - by confidence score, predictions per instance. - If this number is very high, the Model may - return fewer predictions. Default value is 10. - """ - - confidence_threshold = proto.Field( - proto.FLOAT, - number=1, - ) - max_predictions = proto.Field( - proto.INT32, - number=2, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/types/image_object_detection.py b/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/types/image_object_detection.py deleted file mode 100644 index b320119073..0000000000 --- a/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/types/image_object_detection.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1.schema.predict.params', - manifest={ - 'ImageObjectDetectionPredictionParams', - }, -) - - -class ImageObjectDetectionPredictionParams(proto.Message): - r"""Prediction model parameters for Image Object Detection. - - Attributes: - confidence_threshold (float): - The Model only returns predictions with at - least this confidence score. Default value is - 0.0 - max_predictions (int): - The Model only returns up to that many top, - by confidence score, predictions per instance. - Note that number of returned predictions is also - limited by metadata's predictionsLimit. Default - value is 10. - """ - - confidence_threshold = proto.Field( - proto.FLOAT, - number=1, - ) - max_predictions = proto.Field( - proto.INT32, - number=2, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/types/image_segmentation.py b/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/types/image_segmentation.py deleted file mode 100644 index 504a61ec8f..0000000000 --- a/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/types/image_segmentation.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1.schema.predict.params', - manifest={ - 'ImageSegmentationPredictionParams', - }, -) - - -class ImageSegmentationPredictionParams(proto.Message): - r"""Prediction model parameters for Image Segmentation. - - Attributes: - confidence_threshold (float): - When the model predicts category of pixels of - the image, it will only provide predictions for - pixels that it is at least this much confident - about. All other pixels will be classified as - background. Default value is 0.5. - """ - - confidence_threshold = proto.Field( - proto.FLOAT, - number=1, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/types/video_action_recognition.py b/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/types/video_action_recognition.py deleted file mode 100644 index d08f604b90..0000000000 --- a/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/types/video_action_recognition.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1.schema.predict.params', - manifest={ - 'VideoActionRecognitionPredictionParams', - }, -) - - -class VideoActionRecognitionPredictionParams(proto.Message): - r"""Prediction model parameters for Video Action Recognition. - - Attributes: - confidence_threshold (float): - The Model only returns predictions with at - least this confidence score. Default value is - 0.0 - max_predictions (int): - The model only returns up to that many top, - by confidence score, predictions per frame of - the video. If this number is very high, the - Model may return fewer predictions per frame. - Default value is 50. - """ - - confidence_threshold = proto.Field( - proto.FLOAT, - number=1, - ) - max_predictions = proto.Field( - proto.INT32, - number=2, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/types/video_classification.py b/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/types/video_classification.py deleted file mode 100644 index 38dbc6eec1..0000000000 --- a/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/types/video_classification.py +++ /dev/null @@ -1,95 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1.schema.predict.params', - manifest={ - 'VideoClassificationPredictionParams', - }, -) - - -class VideoClassificationPredictionParams(proto.Message): - r"""Prediction model parameters for Video Classification. - - Attributes: - confidence_threshold (float): - The Model only returns predictions with at - least this confidence score. Default value is - 0.0 - max_predictions (int): - The Model only returns up to that many top, - by confidence score, predictions per instance. - If this number is very high, the Model may - return fewer predictions. Default value is - 10,000. - segment_classification (bool): - Set to true to request segment-level - classification. Vertex AI returns labels and - their confidence scores for the entire time - segment of the video that user specified in the - input instance. Default value is true - shot_classification (bool): - Set to true to request shot-level - classification. Vertex AI determines the - boundaries for each camera shot in the entire - time segment of the video that user specified in - the input instance. Vertex AI then returns - labels and their confidence scores for each - detected shot, along with the start and end time - of the shot. - WARNING: Model evaluation is not done for this - classification type, the quality of it depends - on the training data, but there are no metrics - provided to describe that quality. - Default value is false - one_sec_interval_classification (bool): - Set to true to request classification for a - video at one-second intervals. Vertex AI returns - labels and their confidence scores for each - second of the entire time segment of the video - that user specified in the input WARNING: Model - evaluation is not done for this classification - type, the quality of it depends on the training - data, but there are no metrics provided to - describe that quality. Default value is false - """ - - confidence_threshold = proto.Field( - proto.FLOAT, - number=1, - ) - max_predictions = proto.Field( - proto.INT32, - number=2, - ) - segment_classification = proto.Field( - proto.BOOL, - number=3, - ) - shot_classification = proto.Field( - proto.BOOL, - number=4, - ) - one_sec_interval_classification = proto.Field( - proto.BOOL, - number=5, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/types/video_object_tracking.py b/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/types/video_object_tracking.py deleted file mode 100644 index e9f1015d65..0000000000 --- a/schema/predict/params/google/cloud/aiplatform/v1/schema/predict/params_v1/types/video_object_tracking.py +++ /dev/null @@ -1,61 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1.schema.predict.params', - manifest={ - 'VideoObjectTrackingPredictionParams', - }, -) - - -class VideoObjectTrackingPredictionParams(proto.Message): - r"""Prediction model parameters for Video Object Tracking. - - Attributes: - confidence_threshold (float): - The Model only returns predictions with at - least this confidence score. Default value is - 0.0 - max_predictions (int): - The model only returns up to that many top, - by confidence score, predictions per frame of - the video. If this number is very high, the - Model may return fewer predictions per frame. - Default value is 50. - min_bounding_box_size (float): - Only bounding boxes with shortest edge at - least that long as a relative value of video - frame size are returned. Default value is 0.0. - """ - - confidence_threshold = proto.Field( - proto.FLOAT, - number=1, - ) - max_predictions = proto.Field( - proto.INT32, - number=2, - ) - min_bounding_box_size = proto.Field( - proto.FLOAT, - number=3, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params/__init__.py b/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params/__init__.py deleted file mode 100644 index 464c39f26c..0000000000 --- a/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# - - -from google.cloud.aiplatform.v1beta1.schema.predict.params_v1beta1.types.image_classification import ImageClassificationPredictionParams -from google.cloud.aiplatform.v1beta1.schema.predict.params_v1beta1.types.image_object_detection import ImageObjectDetectionPredictionParams -from google.cloud.aiplatform.v1beta1.schema.predict.params_v1beta1.types.image_segmentation import ImageSegmentationPredictionParams -from google.cloud.aiplatform.v1beta1.schema.predict.params_v1beta1.types.video_action_recognition import VideoActionRecognitionPredictionParams -from google.cloud.aiplatform.v1beta1.schema.predict.params_v1beta1.types.video_classification import VideoClassificationPredictionParams -from google.cloud.aiplatform.v1beta1.schema.predict.params_v1beta1.types.video_object_tracking import VideoObjectTrackingPredictionParams - -__all__ = ('ImageClassificationPredictionParams', - 'ImageObjectDetectionPredictionParams', - 'ImageSegmentationPredictionParams', - 'VideoActionRecognitionPredictionParams', - 'VideoClassificationPredictionParams', - 'VideoObjectTrackingPredictionParams', -) diff --git a/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params/py.typed b/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params/py.typed deleted file mode 100644 index acdcd7bc60..0000000000 --- a/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params/py.typed +++ /dev/null @@ -1,2 +0,0 @@ -# Marker file for PEP 561. -# The google-cloud-aiplatform-v1beta1-schema-predict-params package uses inline types. diff --git a/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/__init__.py b/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/__init__.py deleted file mode 100644 index 91b718b437..0000000000 --- a/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/__init__.py +++ /dev/null @@ -1,32 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# - - -from .types.image_classification import ImageClassificationPredictionParams -from .types.image_object_detection import ImageObjectDetectionPredictionParams -from .types.image_segmentation import ImageSegmentationPredictionParams -from .types.video_action_recognition import VideoActionRecognitionPredictionParams -from .types.video_classification import VideoClassificationPredictionParams -from .types.video_object_tracking import VideoObjectTrackingPredictionParams - -__all__ = ( -'ImageClassificationPredictionParams', -'ImageObjectDetectionPredictionParams', -'ImageSegmentationPredictionParams', -'VideoActionRecognitionPredictionParams', -'VideoClassificationPredictionParams', -'VideoObjectTrackingPredictionParams', -) diff --git a/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/gapic_metadata.json b/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/gapic_metadata.json deleted file mode 100644 index 6b925dd9dc..0000000000 --- a/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/gapic_metadata.json +++ /dev/null @@ -1,7 +0,0 @@ - { - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "python", - "libraryPackage": "google.cloud.aiplatform.v1beta1.schema.predict.params_v1beta1", - "protoPackage": "google.cloud.aiplatform.v1beta1.schema.predict.params", - "schema": "1.0" -} diff --git a/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/py.typed b/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/py.typed deleted file mode 100644 index acdcd7bc60..0000000000 --- a/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/py.typed +++ /dev/null @@ -1,2 +0,0 @@ -# Marker file for PEP 561. -# The google-cloud-aiplatform-v1beta1-schema-predict-params package uses inline types. diff --git a/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/services/__init__.py b/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/services/__init__.py deleted file mode 100644 index 4de65971c2..0000000000 --- a/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/services/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# diff --git a/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/types/__init__.py b/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/types/__init__.py deleted file mode 100644 index 70a92bb59c..0000000000 --- a/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/types/__init__.py +++ /dev/null @@ -1,42 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -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', - 'ImageObjectDetectionPredictionParams', - 'ImageSegmentationPredictionParams', - 'VideoActionRecognitionPredictionParams', - 'VideoClassificationPredictionParams', - 'VideoObjectTrackingPredictionParams', -) diff --git a/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/types/image_classification.py b/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/types/image_classification.py deleted file mode 100644 index 26247cda3b..0000000000 --- a/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/types/image_classification.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1beta1.schema.predict.params', - manifest={ - 'ImageClassificationPredictionParams', - }, -) - - -class ImageClassificationPredictionParams(proto.Message): - r"""Prediction model parameters for Image Classification. - - Attributes: - confidence_threshold (float): - The Model only returns predictions with at - least this confidence score. Default value is - 0.0 - max_predictions (int): - The Model only returns up to that many top, - by confidence score, predictions per instance. - If this number is very high, the Model may - return fewer predictions. Default value is 10. - """ - - confidence_threshold = proto.Field( - proto.FLOAT, - number=1, - ) - max_predictions = proto.Field( - proto.INT32, - number=2, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/types/image_object_detection.py b/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/types/image_object_detection.py deleted file mode 100644 index 307c6e743c..0000000000 --- a/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/types/image_object_detection.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1beta1.schema.predict.params', - manifest={ - 'ImageObjectDetectionPredictionParams', - }, -) - - -class ImageObjectDetectionPredictionParams(proto.Message): - r"""Prediction model parameters for Image Object Detection. - - Attributes: - confidence_threshold (float): - The Model only returns predictions with at - least this confidence score. Default value is - 0.0 - max_predictions (int): - The Model only returns up to that many top, - by confidence score, predictions per instance. - Note that number of returned predictions is also - limited by metadata's predictionsLimit. Default - value is 10. - """ - - confidence_threshold = proto.Field( - proto.FLOAT, - number=1, - ) - max_predictions = proto.Field( - proto.INT32, - number=2, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/types/image_segmentation.py b/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/types/image_segmentation.py deleted file mode 100644 index c60fd1a5a5..0000000000 --- a/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/types/image_segmentation.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1beta1.schema.predict.params', - manifest={ - 'ImageSegmentationPredictionParams', - }, -) - - -class ImageSegmentationPredictionParams(proto.Message): - r"""Prediction model parameters for Image Segmentation. - - Attributes: - confidence_threshold (float): - When the model predicts category of pixels of - the image, it will only provide predictions for - pixels that it is at least this much confident - about. All other pixels will be classified as - background. Default value is 0.5. - """ - - confidence_threshold = proto.Field( - proto.FLOAT, - number=1, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/types/video_action_recognition.py b/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/types/video_action_recognition.py deleted file mode 100644 index b5ab67fd1e..0000000000 --- a/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/types/video_action_recognition.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1beta1.schema.predict.params', - manifest={ - 'VideoActionRecognitionPredictionParams', - }, -) - - -class VideoActionRecognitionPredictionParams(proto.Message): - r"""Prediction model parameters for Video Action Recognition. - - Attributes: - confidence_threshold (float): - The Model only returns predictions with at - least this confidence score. Default value is - 0.0 - max_predictions (int): - The model only returns up to that many top, - by confidence score, predictions per frame of - the video. If this number is very high, the - Model may return fewer predictions per frame. - Default value is 50. - """ - - confidence_threshold = proto.Field( - proto.FLOAT, - number=1, - ) - max_predictions = proto.Field( - proto.INT32, - number=2, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/types/video_classification.py b/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/types/video_classification.py deleted file mode 100644 index 6f2f2d35c7..0000000000 --- a/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/types/video_classification.py +++ /dev/null @@ -1,95 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1beta1.schema.predict.params', - manifest={ - 'VideoClassificationPredictionParams', - }, -) - - -class VideoClassificationPredictionParams(proto.Message): - r"""Prediction model parameters for Video Classification. - - Attributes: - confidence_threshold (float): - The Model only returns predictions with at - least this confidence score. Default value is - 0.0 - max_predictions (int): - The Model only returns up to that many top, - by confidence score, predictions per instance. - If this number is very high, the Model may - return fewer predictions. Default value is - 10,000. - segment_classification (bool): - Set to true to request segment-level - classification. Vertex AI returns labels and - their confidence scores for the entire time - segment of the video that user specified in the - input instance. Default value is true - shot_classification (bool): - Set to true to request shot-level - classification. Vertex AI determines the - boundaries for each camera shot in the entire - time segment of the video that user specified in - the input instance. Vertex AI then returns - labels and their confidence scores for each - detected shot, along with the start and end time - of the shot. - WARNING: Model evaluation is not done for this - classification type, the quality of it depends - on the training data, but there are no metrics - provided to describe that quality. - Default value is false - one_sec_interval_classification (bool): - Set to true to request classification for a - video at one-second intervals. Vertex AI returns - labels and their confidence scores for each - second of the entire time segment of the video - that user specified in the input WARNING: Model - evaluation is not done for this classification - type, the quality of it depends on the training - data, but there are no metrics provided to - describe that quality. Default value is false - """ - - confidence_threshold = proto.Field( - proto.FLOAT, - number=1, - ) - max_predictions = proto.Field( - proto.INT32, - number=2, - ) - segment_classification = proto.Field( - proto.BOOL, - number=3, - ) - shot_classification = proto.Field( - proto.BOOL, - number=4, - ) - one_sec_interval_classification = proto.Field( - proto.BOOL, - number=5, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/types/video_object_tracking.py b/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/types/video_object_tracking.py deleted file mode 100644 index 8888dca9d3..0000000000 --- a/schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/types/video_object_tracking.py +++ /dev/null @@ -1,61 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1beta1.schema.predict.params', - manifest={ - 'VideoObjectTrackingPredictionParams', - }, -) - - -class VideoObjectTrackingPredictionParams(proto.Message): - r"""Prediction model parameters for Video Object Tracking. - - Attributes: - confidence_threshold (float): - The Model only returns predictions with at - least this confidence score. Default value is - 0.0 - max_predictions (int): - The model only returns up to that many top, - by confidence score, predictions per frame of - the video. If this number is very high, the - Model may return fewer predictions per frame. - Default value is 50. - min_bounding_box_size (float): - Only bounding boxes with shortest edge at - least that long as a relative value of video - frame size are returned. Default value is 0.0. - """ - - confidence_threshold = proto.Field( - proto.FLOAT, - number=1, - ) - max_predictions = proto.Field( - proto.INT32, - number=2, - ) - min_bounding_box_size = proto.Field( - proto.FLOAT, - number=3, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/params/mypy.ini b/schema/predict/params/mypy.ini deleted file mode 100644 index 4505b48543..0000000000 --- a/schema/predict/params/mypy.ini +++ /dev/null @@ -1,3 +0,0 @@ -[mypy] -python_version = 3.6 -namespace_packages = True diff --git a/schema/predict/params/noxfile.py b/schema/predict/params/noxfile.py deleted file mode 100644 index e886ab4759..0000000000 --- a/schema/predict/params/noxfile.py +++ /dev/null @@ -1,132 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 os -import pathlib -import shutil -import subprocess -import sys - - -import nox # type: ignore - -CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() - -LOWER_BOUND_CONSTRAINTS_FILE = CURRENT_DIRECTORY / "constraints.txt" -PACKAGE_NAME = subprocess.check_output([sys.executable, "setup.py", "--name"], encoding="utf-8") - - -nox.sessions = [ - "unit", - "cover", - "mypy", - "check_lower_bounds" - # exclude update_lower_bounds from default - "docs", -] - -@nox.session(python=['3.6', '3.7', '3.8', '3.9']) -def unit(session): - """Run the unit test suite.""" - - session.install('coverage', 'pytest', 'pytest-cov', 'asyncmock', 'pytest-asyncio') - session.install('-e', '.') - - session.run( - 'py.test', - '--quiet', - '--cov=google/cloud/aiplatform/v1/schema/predict/params_v1/', - '--cov-config=.coveragerc', - '--cov-report=term', - '--cov-report=html', - os.path.join('tests', 'unit', ''.join(session.posargs)) - ) - - -@nox.session(python='3.7') -def cover(session): - """Run the final coverage report. - This outputs the coverage report aggregating coverage from the unit - test runs (not system test runs), and then erases coverage data. - """ - session.install("coverage", "pytest-cov") - session.run("coverage", "report", "--show-missing", "--fail-under=100") - - session.run("coverage", "erase") - - -@nox.session(python=['3.6', '3.7']) -def mypy(session): - """Run the type checker.""" - session.install('mypy', 'types-pkg_resources') - session.install('.') - session.run( - 'mypy', - '--explicit-package-bases', - 'google', - ) - - -@nox.session -def update_lower_bounds(session): - """Update lower bounds in constraints.txt to match setup.py""" - session.install('google-cloud-testutils') - session.install('.') - - session.run( - 'lower-bound-checker', - 'update', - '--package-name', - PACKAGE_NAME, - '--constraints-file', - str(LOWER_BOUND_CONSTRAINTS_FILE), - ) - - -@nox.session -def check_lower_bounds(session): - """Check lower bounds in setup.py are reflected in constraints file""" - session.install('google-cloud-testutils') - session.install('.') - - session.run( - 'lower-bound-checker', - 'check', - '--package-name', - PACKAGE_NAME, - '--constraints-file', - str(LOWER_BOUND_CONSTRAINTS_FILE), - ) - -@nox.session(python='3.6') -def docs(session): - """Build the docs for this library.""" - - session.install("-e", ".") - session.install("sphinx<3.0.0", "alabaster", "recommonmark") - - shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) - session.run( - "sphinx-build", - "-W", # warnings as errors - "-T", # show full traceback on exception - "-N", # no colors - "-b", - "html", - "-d", - os.path.join("docs", "_build", "doctrees", ""), - os.path.join("docs", ""), - os.path.join("docs", "_build", "html", ""), - ) diff --git a/schema/predict/params/scripts/fixup_params_v1_keywords.py b/schema/predict/params/scripts/fixup_params_v1_keywords.py deleted file mode 100644 index 6331faf507..0000000000 --- a/schema/predict/params/scripts/fixup_params_v1_keywords.py +++ /dev/null @@ -1,175 +0,0 @@ -#! /usr/bin/env python3 -# -*- coding: utf-8 -*- -# Copyright 2020 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 argparse -import os -import libcst as cst -import pathlib -import sys -from typing import (Any, Callable, Dict, List, Sequence, Tuple) - - -def partition( - predicate: Callable[[Any], bool], - iterator: Sequence[Any] -) -> Tuple[List[Any], List[Any]]: - """A stable, out-of-place partition.""" - results = ([], []) - - for i in iterator: - results[int(predicate(i))].append(i) - - # Returns trueList, falseList - return results[1], results[0] - - -class paramsCallTransformer(cst.CSTTransformer): - CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata') - METHOD_TO_PARAMS: Dict[str, Tuple[str]] = { - } - - def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: - try: - key = original.func.attr.value - kword_params = self.METHOD_TO_PARAMS[key] - except (AttributeError, KeyError): - # Either not a method from the API or too convoluted to be sure. - return updated - - # If the existing code is valid, keyword args come after positional args. - # Therefore, all positional args must map to the first parameters. - args, kwargs = partition(lambda a: not bool(a.keyword), updated.args) - if any(k.keyword.value == "request" for k in kwargs): - # We've already fixed this file, don't fix it again. - return updated - - kwargs, ctrl_kwargs = partition( - lambda a: a.keyword.value not in self.CTRL_PARAMS, - kwargs - ) - - args, ctrl_args = args[:len(kword_params)], args[len(kword_params):] - ctrl_kwargs.extend(cst.Arg(value=a.value, keyword=cst.Name(value=ctrl)) - for a, ctrl in zip(ctrl_args, self.CTRL_PARAMS)) - - request_arg = cst.Arg( - value=cst.Dict([ - cst.DictElement( - cst.SimpleString("'{}'".format(name)), -cst.Element(value=arg.value) - ) - # Note: the args + kwargs looks silly, but keep in mind that - # the control parameters had to be stripped out, and that - # those could have been passed positionally or by keyword. - for name, arg in zip(kword_params, args + kwargs)]), - keyword=cst.Name("request") - ) - - return updated.with_changes( - args=[request_arg] + ctrl_kwargs - ) - - -def fix_files( - in_dir: pathlib.Path, - out_dir: pathlib.Path, - *, - transformer=paramsCallTransformer(), -): - """Duplicate the input dir to the output dir, fixing file method calls. - - Preconditions: - * in_dir is a real directory - * out_dir is a real, empty directory - """ - pyfile_gen = ( - pathlib.Path(os.path.join(root, f)) - for root, _, files in os.walk(in_dir) - for f in files if os.path.splitext(f)[1] == ".py" - ) - - for fpath in pyfile_gen: - with open(fpath, 'r') as f: - src = f.read() - - # Parse the code and insert method call fixes. - tree = cst.parse_module(src) - updated = tree.visit(transformer) - - # Create the path and directory structure for the new file. - updated_path = out_dir.joinpath(fpath.relative_to(in_dir)) - updated_path.parent.mkdir(parents=True, exist_ok=True) - - # Generate the updated source file at the corresponding path. - with open(updated_path, 'w') as f: - f.write(updated.code) - - -if __name__ == '__main__': - parser = argparse.ArgumentParser( - description="""Fix up source that uses the params client library. - -The existing sources are NOT overwritten but are copied to output_dir with changes made. - -Note: This tool operates at a best-effort level at converting positional - parameters in client method calls to keyword based parameters. - Cases where it WILL FAIL include - A) * or ** expansion in a method call. - B) Calls via function or method alias (includes free function calls) - C) Indirect or dispatched calls (e.g. the method is looked up dynamically) - - These all constitute false negatives. The tool will also detect false - positives when an API method shares a name with another method. -""") - parser.add_argument( - '-d', - '--input-directory', - required=True, - dest='input_dir', - help='the input directory to walk for python files to fix up', - ) - parser.add_argument( - '-o', - '--output-directory', - required=True, - dest='output_dir', - help='the directory to output files fixed via un-flattening', - ) - args = parser.parse_args() - input_dir = pathlib.Path(args.input_dir) - output_dir = pathlib.Path(args.output_dir) - if not input_dir.is_dir(): - print( - f"input directory '{input_dir}' does not exist or is not a directory", - file=sys.stderr, - ) - sys.exit(-1) - - if not output_dir.is_dir(): - print( - f"output directory '{output_dir}' does not exist or is not a directory", - file=sys.stderr, - ) - sys.exit(-1) - - if os.listdir(output_dir): - print( - f"output directory '{output_dir}' is not empty", - file=sys.stderr, - ) - sys.exit(-1) - - fix_files(input_dir, output_dir) diff --git a/schema/predict/params/scripts/fixup_params_v1beta1_keywords.py b/schema/predict/params/scripts/fixup_params_v1beta1_keywords.py deleted file mode 100644 index 6331faf507..0000000000 --- a/schema/predict/params/scripts/fixup_params_v1beta1_keywords.py +++ /dev/null @@ -1,175 +0,0 @@ -#! /usr/bin/env python3 -# -*- coding: utf-8 -*- -# Copyright 2020 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 argparse -import os -import libcst as cst -import pathlib -import sys -from typing import (Any, Callable, Dict, List, Sequence, Tuple) - - -def partition( - predicate: Callable[[Any], bool], - iterator: Sequence[Any] -) -> Tuple[List[Any], List[Any]]: - """A stable, out-of-place partition.""" - results = ([], []) - - for i in iterator: - results[int(predicate(i))].append(i) - - # Returns trueList, falseList - return results[1], results[0] - - -class paramsCallTransformer(cst.CSTTransformer): - CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata') - METHOD_TO_PARAMS: Dict[str, Tuple[str]] = { - } - - def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: - try: - key = original.func.attr.value - kword_params = self.METHOD_TO_PARAMS[key] - except (AttributeError, KeyError): - # Either not a method from the API or too convoluted to be sure. - return updated - - # If the existing code is valid, keyword args come after positional args. - # Therefore, all positional args must map to the first parameters. - args, kwargs = partition(lambda a: not bool(a.keyword), updated.args) - if any(k.keyword.value == "request" for k in kwargs): - # We've already fixed this file, don't fix it again. - return updated - - kwargs, ctrl_kwargs = partition( - lambda a: a.keyword.value not in self.CTRL_PARAMS, - kwargs - ) - - args, ctrl_args = args[:len(kword_params)], args[len(kword_params):] - ctrl_kwargs.extend(cst.Arg(value=a.value, keyword=cst.Name(value=ctrl)) - for a, ctrl in zip(ctrl_args, self.CTRL_PARAMS)) - - request_arg = cst.Arg( - value=cst.Dict([ - cst.DictElement( - cst.SimpleString("'{}'".format(name)), -cst.Element(value=arg.value) - ) - # Note: the args + kwargs looks silly, but keep in mind that - # the control parameters had to be stripped out, and that - # those could have been passed positionally or by keyword. - for name, arg in zip(kword_params, args + kwargs)]), - keyword=cst.Name("request") - ) - - return updated.with_changes( - args=[request_arg] + ctrl_kwargs - ) - - -def fix_files( - in_dir: pathlib.Path, - out_dir: pathlib.Path, - *, - transformer=paramsCallTransformer(), -): - """Duplicate the input dir to the output dir, fixing file method calls. - - Preconditions: - * in_dir is a real directory - * out_dir is a real, empty directory - """ - pyfile_gen = ( - pathlib.Path(os.path.join(root, f)) - for root, _, files in os.walk(in_dir) - for f in files if os.path.splitext(f)[1] == ".py" - ) - - for fpath in pyfile_gen: - with open(fpath, 'r') as f: - src = f.read() - - # Parse the code and insert method call fixes. - tree = cst.parse_module(src) - updated = tree.visit(transformer) - - # Create the path and directory structure for the new file. - updated_path = out_dir.joinpath(fpath.relative_to(in_dir)) - updated_path.parent.mkdir(parents=True, exist_ok=True) - - # Generate the updated source file at the corresponding path. - with open(updated_path, 'w') as f: - f.write(updated.code) - - -if __name__ == '__main__': - parser = argparse.ArgumentParser( - description="""Fix up source that uses the params client library. - -The existing sources are NOT overwritten but are copied to output_dir with changes made. - -Note: This tool operates at a best-effort level at converting positional - parameters in client method calls to keyword based parameters. - Cases where it WILL FAIL include - A) * or ** expansion in a method call. - B) Calls via function or method alias (includes free function calls) - C) Indirect or dispatched calls (e.g. the method is looked up dynamically) - - These all constitute false negatives. The tool will also detect false - positives when an API method shares a name with another method. -""") - parser.add_argument( - '-d', - '--input-directory', - required=True, - dest='input_dir', - help='the input directory to walk for python files to fix up', - ) - parser.add_argument( - '-o', - '--output-directory', - required=True, - dest='output_dir', - help='the directory to output files fixed via un-flattening', - ) - args = parser.parse_args() - input_dir = pathlib.Path(args.input_dir) - output_dir = pathlib.Path(args.output_dir) - if not input_dir.is_dir(): - print( - f"input directory '{input_dir}' does not exist or is not a directory", - file=sys.stderr, - ) - sys.exit(-1) - - if not output_dir.is_dir(): - print( - f"output directory '{output_dir}' does not exist or is not a directory", - file=sys.stderr, - ) - sys.exit(-1) - - if os.listdir(output_dir): - print( - f"output directory '{output_dir}' is not empty", - file=sys.stderr, - ) - sys.exit(-1) - - fix_files(input_dir, output_dir) diff --git a/schema/predict/params/setup.py b/schema/predict/params/setup.py deleted file mode 100644 index e382f09fe5..0000000000 --- a/schema/predict/params/setup.py +++ /dev/null @@ -1,54 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 io -import os -import setuptools # type: ignore - -version = '0.1.0' - -package_root = os.path.abspath(os.path.dirname(__file__)) - -readme_filename = os.path.join(package_root, 'README.rst') -with io.open(readme_filename, encoding='utf-8') as readme_file: - readme = readme_file.read() - -setuptools.setup( - name='google-cloud-aiplatform-v1-schema-predict-params', - version=version, - long_description=readme, - packages=setuptools.PEP420PackageFinder.find(), - namespace_packages=('google', 'google.cloud', 'google.cloud.aiplatform', 'google.cloud.aiplatform.v1', 'google.cloud.aiplatform.v1.schema', 'google.cloud.aiplatform.v1.schema.predict'), - platforms='Posix; MacOS X; Windows', - include_package_data=True, - install_requires=( - 'google-api-core[grpc] >= 1.27.0, < 3.0.0dev', - 'libcst >= 0.2.5', - 'proto-plus >= 1.15.0', - 'packaging >= 14.3', ), - python_requires='>=3.6', - classifiers=[ - 'Development Status :: 3 - Alpha', - 'Intended Audience :: Developers', - 'Operating System :: OS Independent', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Topic :: Internet', - 'Topic :: Software Development :: Libraries :: Python Modules', - ], - zip_safe=False, -) diff --git a/schema/predict/params/tests/__init__.py b/schema/predict/params/tests/__init__.py deleted file mode 100644 index b54a5fcc42..0000000000 --- a/schema/predict/params/tests/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ - -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# diff --git a/schema/predict/params/tests/unit/__init__.py b/schema/predict/params/tests/unit/__init__.py deleted file mode 100644 index b54a5fcc42..0000000000 --- a/schema/predict/params/tests/unit/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ - -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# diff --git a/schema/predict/params/tests/unit/gapic/__init__.py b/schema/predict/params/tests/unit/gapic/__init__.py deleted file mode 100644 index b54a5fcc42..0000000000 --- a/schema/predict/params/tests/unit/gapic/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ - -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# diff --git a/schema/predict/params/tests/unit/gapic/params_v1/__init__.py b/schema/predict/params/tests/unit/gapic/params_v1/__init__.py deleted file mode 100644 index b54a5fcc42..0000000000 --- a/schema/predict/params/tests/unit/gapic/params_v1/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ - -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# diff --git a/schema/predict/params/tests/unit/gapic/params_v1beta1/__init__.py b/schema/predict/params/tests/unit/gapic/params_v1beta1/__init__.py deleted file mode 100644 index b54a5fcc42..0000000000 --- a/schema/predict/params/tests/unit/gapic/params_v1beta1/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ - -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# diff --git a/schema/predict/prediction/.coveragerc b/schema/predict/prediction/.coveragerc deleted file mode 100644 index a49b3b6dd8..0000000000 --- a/schema/predict/prediction/.coveragerc +++ /dev/null @@ -1,17 +0,0 @@ -[run] -branch = True - -[report] -show_missing = True -omit = - google/cloud/aiplatform/v1/schema/predict/prediction/__init__.py -exclude_lines = - # Re-enable the standard pragma - pragma: NO COVER - # Ignore debug-only repr - def __repr__ - # Ignore pkg_resources exceptions. - # This is added at the module level as a safeguard for if someone - # generates the code and tries to run it without pip installing. This - # makes it virtually impossible to test properly. - except pkg_resources.DistributionNotFound diff --git a/schema/predict/prediction/MANIFEST.in b/schema/predict/prediction/MANIFEST.in deleted file mode 100644 index 4cca31bd6b..0000000000 --- a/schema/predict/prediction/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -recursive-include google/cloud/aiplatform/v1/schema/predict/prediction *.py -recursive-include google/cloud/aiplatform/v1/schema/predict/prediction_v1 *.py diff --git a/schema/predict/prediction/README.rst b/schema/predict/prediction/README.rst deleted file mode 100644 index acb7f67d13..0000000000 --- a/schema/predict/prediction/README.rst +++ /dev/null @@ -1,49 +0,0 @@ -Python Client for Google Cloud Aiplatform V1 Schema Predict Prediction API -================================================= - -Quick Start ------------ - -In order to use this library, you first need to go through the following steps: - -1. `Select or create a Cloud Platform project.`_ -2. `Enable billing for your project.`_ -3. Enable the Google Cloud Aiplatform V1 Schema Predict Prediction API. -4. `Setup Authentication.`_ - -.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project -.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project -.. _Setup Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html - -Installation -~~~~~~~~~~~~ - -Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to -create isolated Python environments. The basic problem it addresses is one of -dependencies and versions, and indirectly permissions. - -With `virtualenv`_, it's possible to install this library without needing system -install permissions, and without clashing with the installed system -dependencies. - -.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/ - - -Mac/Linux -^^^^^^^^^ - -.. code-block:: console - - python3 -m venv - source /bin/activate - /bin/pip install /path/to/library - - -Windows -^^^^^^^ - -.. code-block:: console - - python3 -m venv - \Scripts\activate - \Scripts\pip.exe install \path\to\library diff --git a/schema/predict/prediction/docs/conf.py b/schema/predict/prediction/docs/conf.py deleted file mode 100644 index c0f73900a9..0000000000 --- a/schema/predict/prediction/docs/conf.py +++ /dev/null @@ -1,376 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -# -# google-cloud-aiplatform-v1-schema-predict-prediction documentation build configuration file -# -# This file is execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -import sys -import os -import shlex - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -sys.path.insert(0, os.path.abspath("..")) - -__version__ = "0.1.0" - -# -- General configuration ------------------------------------------------ - -# If your documentation needs a minimal Sphinx version, state it here. -needs_sphinx = "1.6.3" - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ - "sphinx.ext.autodoc", - "sphinx.ext.autosummary", - "sphinx.ext.intersphinx", - "sphinx.ext.coverage", - "sphinx.ext.napoleon", - "sphinx.ext.todo", - "sphinx.ext.viewcode", -] - -# autodoc/autosummary flags -autoclass_content = "both" -autodoc_default_flags = ["members"] -autosummary_generate = True - - -# Add any paths that contain templates here, relative to this directory. -templates_path = ["_templates"] - -# Allow markdown includes (so releases.md can include CHANGLEOG.md) -# http://www.sphinx-doc.org/en/master/markdown.html -source_parsers = {".md": "recommonmark.parser.CommonMarkParser"} - -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -source_suffix = [".rst", ".md"] - -# The encoding of source files. -# source_encoding = 'utf-8-sig' - -# The master toctree document. -master_doc = "index" - -# General information about the project. -project = u"google-cloud-aiplatform-v1-schema-predict-prediction" -copyright = u"2020, Google, LLC" -author = u"Google APIs" # TODO: autogenerate this bit - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The full version, including alpha/beta/rc tags. -release = __version__ -# The short X.Y version. -version = ".".join(release.split(".")[0:2]) - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -language = None - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -# today = '' -# Else, today_fmt is used as the format for a strftime call. -# today_fmt = '%B %d, %Y' - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -exclude_patterns = ["_build"] - -# The reST default role (used for this markup: `text`) to use for all -# documents. -# default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -# add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -# add_module_names = True - -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -# show_authors = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = "sphinx" - -# A list of ignored prefixes for module index sorting. -# modindex_common_prefix = [] - -# If true, keep warnings as "system message" paragraphs in the built documents. -# keep_warnings = False - -# If true, `todo` and `todoList` produce output, else they produce nothing. -todo_include_todos = True - - -# -- Options for HTML output ---------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -html_theme = "alabaster" - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -html_theme_options = { - "description": "Google Cloud Aiplatform V1 Schema Predict Client Libraries for Python", - "github_user": "googleapis", - "github_repo": "google-cloud-python", - "github_banner": True, - "font_family": "'Roboto', Georgia, sans", - "head_font_family": "'Roboto', Georgia, serif", - "code_font_family": "'Roboto Mono', 'Consolas', monospace", -} - -# Add any paths that contain custom themes here, relative to this directory. -# html_theme_path = [] - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -# html_title = None - -# A shorter title for the navigation bar. Default is the same as html_title. -# html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -# html_logo = None - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -# html_favicon = None - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ["_static"] - -# Add any extra paths that contain custom files (such as robots.txt or -# .htaccess) here, relative to this directory. These files are copied -# directly to the root of the documentation. -# html_extra_path = [] - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -# html_last_updated_fmt = '%b %d, %Y' - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -# html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -# html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -# html_additional_pages = {} - -# If false, no module index is generated. -# html_domain_indices = True - -# If false, no index is generated. -# html_use_index = True - -# If true, the index is split into individual pages for each letter. -# html_split_index = False - -# If true, links to the reST sources are added to the pages. -# html_show_sourcelink = True - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -# html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -# html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -# html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -# html_file_suffix = None - -# Language to be used for generating the HTML full-text search index. -# Sphinx supports the following languages: -# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' -# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr' -# html_search_language = 'en' - -# A dictionary with options for the search language support, empty by default. -# Now only 'ja' uses this config value -# html_search_options = {'type': 'default'} - -# The name of a javascript file (relative to the configuration directory) that -# implements a search results scorer. If empty, the default will be used. -# html_search_scorer = 'scorer.js' - -# Output file base name for HTML help builder. -htmlhelp_basename = "google-cloud-aiplatform-v1-schema-predict-prediction-doc" - -# -- Options for warnings ------------------------------------------------------ - - -suppress_warnings = [ - # Temporarily suppress this to avoid "more than one target found for - # cross-reference" warning, which are intractable for us to avoid while in - # a mono-repo. - # See https://github.com/sphinx-doc/sphinx/blob - # /2a65ffeef5c107c19084fabdd706cdff3f52d93c/sphinx/domains/python.py#L843 - "ref.python" -] - -# -- Options for LaTeX output --------------------------------------------- - -latex_elements = { - # The paper size ('letterpaper' or 'a4paper'). - # 'papersize': 'letterpaper', - # The font size ('10pt', '11pt' or '12pt'). - # 'pointsize': '10pt', - # Additional stuff for the LaTeX preamble. - # 'preamble': '', - # Latex figure (float) alignment - # 'figure_align': 'htbp', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - ( - master_doc, - "google-cloud-aiplatform-v1-schema-predict-prediction.tex", - u"google-cloud-aiplatform-v1-schema-predict-prediction Documentation", - author, - "manual", - ) -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -# latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -# latex_use_parts = False - -# If true, show page references after internal links. -# latex_show_pagerefs = False - -# If true, show URL addresses after external links. -# latex_show_urls = False - -# Documents to append as an appendix to all manuals. -# latex_appendices = [] - -# If false, no module index is generated. -# latex_domain_indices = True - - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - ( - master_doc, - "google-cloud-aiplatform-v1-schema-predict-prediction", - u"Google Cloud Aiplatform V1 Schema Predict Prediction Documentation", - [author], - 1, - ) -] - -# If true, show URL addresses after external links. -# man_show_urls = False - - -# -- Options for Texinfo output ------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - ( - master_doc, - "google-cloud-aiplatform-v1-schema-predict-prediction", - u"google-cloud-aiplatform-v1-schema-predict-prediction Documentation", - author, - "google-cloud-aiplatform-v1-schema-predict-prediction", - "GAPIC library for Google Cloud Aiplatform V1 Schema Predict Prediction API", - "APIs", - ) -] - -# Documents to append as an appendix to all manuals. -# texinfo_appendices = [] - -# If false, no module index is generated. -# texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -# texinfo_show_urls = 'footnote' - -# If true, do not generate a @detailmenu in the "Top" node's menu. -# texinfo_no_detailmenu = False - - -# Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = { - "python": ("http://python.readthedocs.org/en/latest/", None), - "gax": ("https://gax-python.readthedocs.org/en/latest/", None), - "google-auth": ("https://google-auth.readthedocs.io/en/stable", None), - "google-gax": ("https://gax-python.readthedocs.io/en/latest/", None), - "google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None), - "grpc": ("https://grpc.io/grpc/python/", None), - "requests": ("http://requests.kennethreitz.org/en/stable/", None), - "proto": ("https://proto-plus-python.readthedocs.io/en/stable", None), - "protobuf": ("https://googleapis.dev/python/protobuf/latest/", None), -} - - -# Napoleon settings -napoleon_google_docstring = True -napoleon_numpy_docstring = True -napoleon_include_private_with_doc = False -napoleon_include_special_with_doc = True -napoleon_use_admonition_for_examples = False -napoleon_use_admonition_for_notes = False -napoleon_use_admonition_for_references = False -napoleon_use_ivar = False -napoleon_use_param = True -napoleon_use_rtype = True diff --git a/schema/predict/prediction/docs/index.rst b/schema/predict/prediction/docs/index.rst deleted file mode 100644 index f28df12991..0000000000 --- a/schema/predict/prediction/docs/index.rst +++ /dev/null @@ -1,7 +0,0 @@ -API Reference -------------- -.. toctree:: - :maxdepth: 2 - - prediction_v1/services - prediction_v1/types diff --git a/schema/predict/prediction/docs/prediction_v1/services.rst b/schema/predict/prediction/docs/prediction_v1/services.rst deleted file mode 100644 index ad6f034387..0000000000 --- a/schema/predict/prediction/docs/prediction_v1/services.rst +++ /dev/null @@ -1,4 +0,0 @@ -Services for Google Cloud Aiplatform V1 Schema Predict Prediction v1 API -======================================================================== -.. toctree:: - :maxdepth: 2 diff --git a/schema/predict/prediction/docs/prediction_v1/types.rst b/schema/predict/prediction/docs/prediction_v1/types.rst deleted file mode 100644 index a97faf34de..0000000000 --- a/schema/predict/prediction/docs/prediction_v1/types.rst +++ /dev/null @@ -1,7 +0,0 @@ -Types for Google Cloud Aiplatform V1 Schema Predict Prediction v1 API -===================================================================== - -.. automodule:: google.cloud.aiplatform.v1.schema.predict.prediction_v1.types - :members: - :undoc-members: - :show-inheritance: diff --git a/schema/predict/prediction/docs/prediction_v1beta1/services.rst b/schema/predict/prediction/docs/prediction_v1beta1/services.rst deleted file mode 100644 index 6de5e17520..0000000000 --- a/schema/predict/prediction/docs/prediction_v1beta1/services.rst +++ /dev/null @@ -1,4 +0,0 @@ -Services for Google Cloud Aiplatform V1beta1 Schema Predict Prediction v1beta1 API -================================================================================== -.. toctree:: - :maxdepth: 2 diff --git a/schema/predict/prediction/docs/prediction_v1beta1/types.rst b/schema/predict/prediction/docs/prediction_v1beta1/types.rst deleted file mode 100644 index b14182d6d7..0000000000 --- a/schema/predict/prediction/docs/prediction_v1beta1/types.rst +++ /dev/null @@ -1,7 +0,0 @@ -Types for Google Cloud Aiplatform V1beta1 Schema Predict Prediction v1beta1 API -=============================================================================== - -.. automodule:: google.cloud.aiplatform.v1beta1.schema.predict.prediction_v1beta1.types - :members: - :undoc-members: - :show-inheritance: diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction/__init__.py b/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction/__init__.py deleted file mode 100644 index 27d9f97862..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction/__init__.py +++ /dev/null @@ -1,39 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# - - -from google.cloud.aiplatform.v1.schema.predict.prediction_v1.types.classification import ClassificationPredictionResult -from google.cloud.aiplatform.v1.schema.predict.prediction_v1.types.image_object_detection import ImageObjectDetectionPredictionResult -from google.cloud.aiplatform.v1.schema.predict.prediction_v1.types.image_segmentation import ImageSegmentationPredictionResult -from google.cloud.aiplatform.v1.schema.predict.prediction_v1.types.tabular_classification import TabularClassificationPredictionResult -from google.cloud.aiplatform.v1.schema.predict.prediction_v1.types.tabular_regression import TabularRegressionPredictionResult -from google.cloud.aiplatform.v1.schema.predict.prediction_v1.types.text_extraction import TextExtractionPredictionResult -from google.cloud.aiplatform.v1.schema.predict.prediction_v1.types.text_sentiment import TextSentimentPredictionResult -from google.cloud.aiplatform.v1.schema.predict.prediction_v1.types.video_action_recognition import VideoActionRecognitionPredictionResult -from google.cloud.aiplatform.v1.schema.predict.prediction_v1.types.video_classification import VideoClassificationPredictionResult -from google.cloud.aiplatform.v1.schema.predict.prediction_v1.types.video_object_tracking import VideoObjectTrackingPredictionResult - -__all__ = ('ClassificationPredictionResult', - 'ImageObjectDetectionPredictionResult', - 'ImageSegmentationPredictionResult', - 'TabularClassificationPredictionResult', - 'TabularRegressionPredictionResult', - 'TextExtractionPredictionResult', - 'TextSentimentPredictionResult', - 'VideoActionRecognitionPredictionResult', - 'VideoClassificationPredictionResult', - 'VideoObjectTrackingPredictionResult', -) diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction/py.typed b/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction/py.typed deleted file mode 100644 index 472fa4d8cc..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction/py.typed +++ /dev/null @@ -1,2 +0,0 @@ -# Marker file for PEP 561. -# The google-cloud-aiplatform-v1-schema-predict-prediction package uses inline types. diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/__init__.py b/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/__init__.py deleted file mode 100644 index 3cf9304526..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/__init__.py +++ /dev/null @@ -1,40 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# - - -from .types.classification import ClassificationPredictionResult -from .types.image_object_detection import ImageObjectDetectionPredictionResult -from .types.image_segmentation import ImageSegmentationPredictionResult -from .types.tabular_classification import TabularClassificationPredictionResult -from .types.tabular_regression import TabularRegressionPredictionResult -from .types.text_extraction import TextExtractionPredictionResult -from .types.text_sentiment import TextSentimentPredictionResult -from .types.video_action_recognition import VideoActionRecognitionPredictionResult -from .types.video_classification import VideoClassificationPredictionResult -from .types.video_object_tracking import VideoObjectTrackingPredictionResult - -__all__ = ( -'ClassificationPredictionResult', -'ImageObjectDetectionPredictionResult', -'ImageSegmentationPredictionResult', -'TabularClassificationPredictionResult', -'TabularRegressionPredictionResult', -'TextExtractionPredictionResult', -'TextSentimentPredictionResult', -'VideoActionRecognitionPredictionResult', -'VideoClassificationPredictionResult', -'VideoObjectTrackingPredictionResult', -) diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/gapic_metadata.json b/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/gapic_metadata.json deleted file mode 100644 index ba1d67a00c..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/gapic_metadata.json +++ /dev/null @@ -1,7 +0,0 @@ - { - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "python", - "libraryPackage": "google.cloud.aiplatform.v1.schema.predict.prediction_v1", - "protoPackage": "google.cloud.aiplatform.v1.schema.predict.prediction", - "schema": "1.0" -} diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/py.typed b/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/py.typed deleted file mode 100644 index 472fa4d8cc..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/py.typed +++ /dev/null @@ -1,2 +0,0 @@ -# Marker file for PEP 561. -# The google-cloud-aiplatform-v1-schema-predict-prediction package uses inline types. diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/services/__init__.py b/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/services/__init__.py deleted file mode 100644 index 4de65971c2..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/services/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/__init__.py b/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/__init__.py deleted file mode 100644 index b7b7c056aa..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/__init__.py +++ /dev/null @@ -1,58 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -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', - 'ImageObjectDetectionPredictionResult', - 'ImageSegmentationPredictionResult', - 'TabularClassificationPredictionResult', - 'TabularRegressionPredictionResult', - 'TextExtractionPredictionResult', - 'TextSentimentPredictionResult', - 'VideoActionRecognitionPredictionResult', - 'VideoClassificationPredictionResult', - 'VideoObjectTrackingPredictionResult', -) diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/classification.py b/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/classification.py deleted file mode 100644 index 2b4bffa1ec..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/classification.py +++ /dev/null @@ -1,57 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1.schema.predict.prediction', - manifest={ - 'ClassificationPredictionResult', - }, -) - - -class ClassificationPredictionResult(proto.Message): - r"""Prediction output format for Image and Text Classification. - - Attributes: - ids (Sequence[int]): - The resource IDs of the AnnotationSpecs that - had been identified. - display_names (Sequence[str]): - The display names of the AnnotationSpecs that - had been identified, order matches the IDs. - confidences (Sequence[float]): - The Model's confidences in correctness of the - predicted IDs, higher value means higher - confidence. Order matches the Ids. - """ - - ids = proto.RepeatedField( - proto.INT64, - number=1, - ) - display_names = proto.RepeatedField( - proto.STRING, - number=2, - ) - confidences = proto.RepeatedField( - proto.FLOAT, - number=3, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/image_object_detection.py b/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/image_object_detection.py deleted file mode 100644 index 74029a3ad8..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/image_object_detection.py +++ /dev/null @@ -1,73 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - -from google.protobuf import struct_pb2 # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1.schema.predict.prediction', - manifest={ - 'ImageObjectDetectionPredictionResult', - }, -) - - -class ImageObjectDetectionPredictionResult(proto.Message): - r"""Prediction output format for Image Object Detection. - - Attributes: - ids (Sequence[int]): - The resource IDs of the AnnotationSpecs that - had been identified, ordered by the confidence - score descendingly. - display_names (Sequence[str]): - The display names of the AnnotationSpecs that - had been identified, order matches the IDs. - confidences (Sequence[float]): - The Model's confidences in correctness of the - predicted IDs, higher value means higher - confidence. Order matches the Ids. - bboxes (Sequence[google.protobuf.struct_pb2.ListValue]): - Bounding boxes, i.e. the rectangles over the image, that - pinpoint the found AnnotationSpecs. Given in order that - matches the IDs. Each bounding box is an array of 4 numbers - ``xMin``, ``xMax``, ``yMin``, and ``yMax``, which represent - the extremal coordinates of the box. They are relative to - the image size, and the point 0,0 is in the top left of the - image. - """ - - ids = proto.RepeatedField( - proto.INT64, - number=1, - ) - display_names = proto.RepeatedField( - proto.STRING, - number=2, - ) - confidences = proto.RepeatedField( - proto.FLOAT, - number=3, - ) - bboxes = proto.RepeatedField( - proto.MESSAGE, - number=4, - message=struct_pb2.ListValue, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/image_segmentation.py b/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/image_segmentation.py deleted file mode 100644 index 263298a870..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/image_segmentation.py +++ /dev/null @@ -1,62 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1.schema.predict.prediction', - manifest={ - 'ImageSegmentationPredictionResult', - }, -) - - -class ImageSegmentationPredictionResult(proto.Message): - r"""Prediction output format for Image Segmentation. - - Attributes: - category_mask (str): - A PNG image where each pixel in the mask - represents the category in which the pixel in - the original image was predicted to belong to. - The size of this image will be the same as the - original image. The mapping between the - AnntoationSpec and the color can be found in - model's metadata. The model will choose the most - likely category and if none of the categories - reach the confidence threshold, the pixel will - be marked as background. - confidence_mask (str): - A one channel image which is encoded as an - 8bit lossless PNG. The size of the image will be - the same as the original image. For a specific - pixel, darker color means less confidence in - correctness of the cateogry in the categoryMask - for the corresponding pixel. Black means no - confidence and white means complete confidence. - """ - - category_mask = proto.Field( - proto.STRING, - number=1, - ) - confidence_mask = proto.Field( - proto.STRING, - number=2, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/tabular_classification.py b/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/tabular_classification.py deleted file mode 100644 index 5d5fbadd49..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/tabular_classification.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1.schema.predict.prediction', - manifest={ - 'TabularClassificationPredictionResult', - }, -) - - -class TabularClassificationPredictionResult(proto.Message): - r"""Prediction output format for Tabular Classification. - - Attributes: - classes (Sequence[str]): - The name of the classes being classified, - contains all possible values of the target - column. - scores (Sequence[float]): - The model's confidence in each class being - correct, higher value means higher confidence. - The N-th score corresponds to the N-th class in - classes. - """ - - classes = proto.RepeatedField( - proto.STRING, - number=1, - ) - scores = proto.RepeatedField( - proto.FLOAT, - number=2, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/tabular_regression.py b/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/tabular_regression.py deleted file mode 100644 index ad1b02facd..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/tabular_regression.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1.schema.predict.prediction', - manifest={ - 'TabularRegressionPredictionResult', - }, -) - - -class TabularRegressionPredictionResult(proto.Message): - r"""Prediction output format for Tabular Regression. - - 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, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/text_extraction.py b/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/text_extraction.py deleted file mode 100644 index d546006a08..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/text_extraction.py +++ /dev/null @@ -1,78 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1.schema.predict.prediction', - manifest={ - 'TextExtractionPredictionResult', - }, -) - - -class TextExtractionPredictionResult(proto.Message): - r"""Prediction output format for Text Extraction. - - Attributes: - ids (Sequence[int]): - The resource IDs of the AnnotationSpecs that - had been identified, ordered by the confidence - score descendingly. - display_names (Sequence[str]): - The display names of the AnnotationSpecs that - had been identified, order matches the IDs. - text_segment_start_offsets (Sequence[int]): - The start offsets, inclusive, of the text - segment in which the AnnotationSpec has been - identified. Expressed as a zero-based number of - characters as measured from the start of the - text snippet. - text_segment_end_offsets (Sequence[int]): - The end offsets, inclusive, of the text - segment in which the AnnotationSpec has been - identified. Expressed as a zero-based number of - characters as measured from the start of the - text snippet. - confidences (Sequence[float]): - The Model's confidences in correctness of the - predicted IDs, higher value means higher - confidence. Order matches the Ids. - """ - - ids = proto.RepeatedField( - proto.INT64, - number=1, - ) - display_names = proto.RepeatedField( - proto.STRING, - number=2, - ) - text_segment_start_offsets = proto.RepeatedField( - proto.INT64, - number=3, - ) - text_segment_end_offsets = proto.RepeatedField( - proto.INT64, - number=4, - ) - confidences = proto.RepeatedField( - proto.FLOAT, - number=5, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/text_sentiment.py b/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/text_sentiment.py deleted file mode 100644 index a1c615f6de..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/text_sentiment.py +++ /dev/null @@ -1,48 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1.schema.predict.prediction', - manifest={ - 'TextSentimentPredictionResult', - }, -) - - -class TextSentimentPredictionResult(proto.Message): - r"""Prediction output format for Text Sentiment - - Attributes: - sentiment (int): - The integer sentiment labels between 0 - (inclusive) and sentimentMax label (inclusive), - while 0 maps to the least positive sentiment and - sentimentMax maps to the most positive one. The - higher the score is, the more positive the - sentiment in the text snippet is. Note: - sentimentMax is an integer value between 1 - (inclusive) and 10 (inclusive). - """ - - sentiment = proto.Field( - proto.INT32, - number=1, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/video_action_recognition.py b/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/video_action_recognition.py deleted file mode 100644 index 035fc792ad..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/video_action_recognition.py +++ /dev/null @@ -1,85 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - -from google.protobuf import duration_pb2 # type: ignore -from google.protobuf import wrappers_pb2 # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1.schema.predict.prediction', - manifest={ - 'VideoActionRecognitionPredictionResult', - }, -) - - -class VideoActionRecognitionPredictionResult(proto.Message): - r"""Prediction output format for Video Action Recognition. - - Attributes: - id (str): - The resource ID of the AnnotationSpec that - had been identified. - display_name (str): - The display name of the AnnotationSpec that - had been identified. - time_segment_start (google.protobuf.duration_pb2.Duration): - The beginning, inclusive, of the video's time - segment in which the AnnotationSpec has been - identified. Expressed as a number of seconds as - measured from the start of the video, with - fractions up to a microsecond precision, and - with "s" appended at the end. - time_segment_end (google.protobuf.duration_pb2.Duration): - The end, exclusive, of the video's time - segment in which the AnnotationSpec has been - identified. Expressed as a number of seconds as - measured from the start of the video, with - fractions up to a microsecond precision, and - with "s" appended at the end. - confidence (google.protobuf.wrappers_pb2.FloatValue): - The Model's confidence in correction of this - prediction, higher value means higher - confidence. - """ - - id = proto.Field( - proto.STRING, - number=1, - ) - display_name = proto.Field( - proto.STRING, - number=2, - ) - time_segment_start = proto.Field( - proto.MESSAGE, - number=4, - message=duration_pb2.Duration, - ) - time_segment_end = proto.Field( - proto.MESSAGE, - number=5, - message=duration_pb2.Duration, - ) - confidence = proto.Field( - proto.MESSAGE, - number=6, - message=wrappers_pb2.FloatValue, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/video_classification.py b/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/video_classification.py deleted file mode 100644 index ade084fc57..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/video_classification.py +++ /dev/null @@ -1,103 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - -from google.protobuf import duration_pb2 # type: ignore -from google.protobuf import wrappers_pb2 # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1.schema.predict.prediction', - manifest={ - 'VideoClassificationPredictionResult', - }, -) - - -class VideoClassificationPredictionResult(proto.Message): - r"""Prediction output format for Video Classification. - - Attributes: - id (str): - The resource ID of the AnnotationSpec that - had been identified. - display_name (str): - The display name of the AnnotationSpec that - had been identified. - type_ (str): - The type of the prediction. The requested - types can be configured via parameters. This - will be one of - segment-classification - - shot-classification - - one-sec-interval-classification - time_segment_start (google.protobuf.duration_pb2.Duration): - The beginning, inclusive, of the video's time - segment in which the AnnotationSpec has been - identified. Expressed as a number of seconds as - measured from the start of the video, with - fractions up to a microsecond precision, and - with "s" appended at the end. Note that for - 'segment-classification' prediction type, this - equals the original 'timeSegmentStart' from the - input instance, for other types it is the start - of a shot or a 1 second interval respectively. - time_segment_end (google.protobuf.duration_pb2.Duration): - The end, exclusive, of the video's time - segment in which the AnnotationSpec has been - identified. Expressed as a number of seconds as - measured from the start of the video, with - fractions up to a microsecond precision, and - with "s" appended at the end. Note that for - 'segment-classification' prediction type, this - equals the original 'timeSegmentEnd' from the - input instance, for other types it is the end of - a shot or a 1 second interval respectively. - confidence (google.protobuf.wrappers_pb2.FloatValue): - The Model's confidence in correction of this - prediction, higher value means higher - confidence. - """ - - id = proto.Field( - proto.STRING, - number=1, - ) - display_name = proto.Field( - proto.STRING, - number=2, - ) - type_ = proto.Field( - proto.STRING, - number=3, - ) - time_segment_start = proto.Field( - proto.MESSAGE, - number=4, - message=duration_pb2.Duration, - ) - time_segment_end = proto.Field( - proto.MESSAGE, - number=5, - message=duration_pb2.Duration, - ) - confidence = proto.Field( - proto.MESSAGE, - number=6, - message=wrappers_pb2.FloatValue, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/video_object_tracking.py b/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/video_object_tracking.py deleted file mode 100644 index 7c88f718e8..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/video_object_tracking.py +++ /dev/null @@ -1,145 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - -from google.protobuf import duration_pb2 # type: ignore -from google.protobuf import wrappers_pb2 # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1.schema.predict.prediction', - manifest={ - 'VideoObjectTrackingPredictionResult', - }, -) - - -class VideoObjectTrackingPredictionResult(proto.Message): - r"""Prediction output format for Video Object Tracking. - - Attributes: - id (str): - The resource ID of the AnnotationSpec that - had been identified. - display_name (str): - The display name of the AnnotationSpec that - had been identified. - time_segment_start (google.protobuf.duration_pb2.Duration): - The beginning, inclusive, of the video's time - segment in which the object instance has been - detected. Expressed as a number of seconds as - measured from the start of the video, with - fractions up to a microsecond precision, and - with "s" appended at the end. - time_segment_end (google.protobuf.duration_pb2.Duration): - The end, inclusive, of the video's time - segment in which the object instance has been - detected. Expressed as a number of seconds as - measured from the start of the video, with - fractions up to a microsecond precision, and - with "s" appended at the end. - confidence (google.protobuf.wrappers_pb2.FloatValue): - The Model's confidence in correction of this - prediction, higher value means higher - confidence. - frames (Sequence[google.cloud.aiplatform.v1.schema.predict.prediction_v1.types.VideoObjectTrackingPredictionResult.Frame]): - All of the frames of the video in which a - single object instance has been detected. The - bounding boxes in the frames identify the same - object. - """ - - class Frame(proto.Message): - r"""The fields ``xMin``, ``xMax``, ``yMin``, and ``yMax`` refer to a - bounding box, i.e. the rectangle over the video frame pinpointing - the found AnnotationSpec. The coordinates are relative to the frame - size, and the point 0,0 is in the top left of the frame. - - Attributes: - time_offset (google.protobuf.duration_pb2.Duration): - A time (frame) of a video in which the object - has been detected. Expressed as a number of - seconds as measured from the start of the video, - with fractions up to a microsecond precision, - and with "s" appended at the end. - x_min (google.protobuf.wrappers_pb2.FloatValue): - The leftmost coordinate of the bounding box. - x_max (google.protobuf.wrappers_pb2.FloatValue): - The rightmost coordinate of the bounding box. - y_min (google.protobuf.wrappers_pb2.FloatValue): - The topmost coordinate of the bounding box. - y_max (google.protobuf.wrappers_pb2.FloatValue): - The bottommost coordinate of the bounding - box. - """ - - time_offset = proto.Field( - proto.MESSAGE, - number=1, - message=duration_pb2.Duration, - ) - x_min = proto.Field( - proto.MESSAGE, - number=2, - message=wrappers_pb2.FloatValue, - ) - x_max = proto.Field( - proto.MESSAGE, - number=3, - message=wrappers_pb2.FloatValue, - ) - y_min = proto.Field( - proto.MESSAGE, - number=4, - message=wrappers_pb2.FloatValue, - ) - y_max = proto.Field( - proto.MESSAGE, - number=5, - message=wrappers_pb2.FloatValue, - ) - - id = proto.Field( - proto.STRING, - number=1, - ) - display_name = proto.Field( - proto.STRING, - number=2, - ) - time_segment_start = proto.Field( - proto.MESSAGE, - number=3, - message=duration_pb2.Duration, - ) - time_segment_end = proto.Field( - proto.MESSAGE, - number=4, - message=duration_pb2.Duration, - ) - confidence = proto.Field( - proto.MESSAGE, - number=5, - message=wrappers_pb2.FloatValue, - ) - frames = proto.RepeatedField( - proto.MESSAGE, - number=6, - message=Frame, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction/__init__.py b/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction/__init__.py deleted file mode 100644 index 0b54451ca0..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction/__init__.py +++ /dev/null @@ -1,41 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# - - -from google.cloud.aiplatform.v1beta1.schema.predict.prediction_v1beta1.types.classification import ClassificationPredictionResult -from google.cloud.aiplatform.v1beta1.schema.predict.prediction_v1beta1.types.image_object_detection import ImageObjectDetectionPredictionResult -from google.cloud.aiplatform.v1beta1.schema.predict.prediction_v1beta1.types.image_segmentation import ImageSegmentationPredictionResult -from google.cloud.aiplatform.v1beta1.schema.predict.prediction_v1beta1.types.tabular_classification import TabularClassificationPredictionResult -from google.cloud.aiplatform.v1beta1.schema.predict.prediction_v1beta1.types.tabular_regression import TabularRegressionPredictionResult -from google.cloud.aiplatform.v1beta1.schema.predict.prediction_v1beta1.types.text_extraction import TextExtractionPredictionResult -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 -from google.cloud.aiplatform.v1beta1.schema.predict.prediction_v1beta1.types.video_classification import VideoClassificationPredictionResult -from google.cloud.aiplatform.v1beta1.schema.predict.prediction_v1beta1.types.video_object_tracking import VideoObjectTrackingPredictionResult - -__all__ = ('ClassificationPredictionResult', - 'ImageObjectDetectionPredictionResult', - 'ImageSegmentationPredictionResult', - 'TabularClassificationPredictionResult', - 'TabularRegressionPredictionResult', - 'TextExtractionPredictionResult', - 'TextSentimentPredictionResult', - 'TimeSeriesForecastingPredictionResult', - 'VideoActionRecognitionPredictionResult', - 'VideoClassificationPredictionResult', - 'VideoObjectTrackingPredictionResult', -) diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction/py.typed b/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction/py.typed deleted file mode 100644 index 8cf97d7107..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction/py.typed +++ /dev/null @@ -1,2 +0,0 @@ -# Marker file for PEP 561. -# The google-cloud-aiplatform-v1beta1-schema-predict-prediction package uses inline types. diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/__init__.py b/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/__init__.py deleted file mode 100644 index 495759c24b..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/__init__.py +++ /dev/null @@ -1,42 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# - - -from .types.classification import ClassificationPredictionResult -from .types.image_object_detection import ImageObjectDetectionPredictionResult -from .types.image_segmentation import ImageSegmentationPredictionResult -from .types.tabular_classification import TabularClassificationPredictionResult -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 - -__all__ = ( -'ClassificationPredictionResult', -'ImageObjectDetectionPredictionResult', -'ImageSegmentationPredictionResult', -'TabularClassificationPredictionResult', -'TabularRegressionPredictionResult', -'TextExtractionPredictionResult', -'TextSentimentPredictionResult', -'TimeSeriesForecastingPredictionResult', -'VideoActionRecognitionPredictionResult', -'VideoClassificationPredictionResult', -'VideoObjectTrackingPredictionResult', -) diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/gapic_metadata.json b/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/gapic_metadata.json deleted file mode 100644 index 99d3dc6402..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/gapic_metadata.json +++ /dev/null @@ -1,7 +0,0 @@ - { - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "python", - "libraryPackage": "google.cloud.aiplatform.v1beta1.schema.predict.prediction_v1beta1", - "protoPackage": "google.cloud.aiplatform.v1beta1.schema.predict.prediction", - "schema": "1.0" -} diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/py.typed b/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/py.typed deleted file mode 100644 index 8cf97d7107..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/py.typed +++ /dev/null @@ -1,2 +0,0 @@ -# Marker file for PEP 561. -# The google-cloud-aiplatform-v1beta1-schema-predict-prediction package uses inline types. diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/services/__init__.py b/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/services/__init__.py deleted file mode 100644 index 4de65971c2..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/services/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/__init__.py b/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/__init__.py deleted file mode 100644 index f3b70f66dd..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/__init__.py +++ /dev/null @@ -1,62 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# -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', - 'ImageObjectDetectionPredictionResult', - 'ImageSegmentationPredictionResult', - 'TabularClassificationPredictionResult', - 'TabularRegressionPredictionResult', - 'TextExtractionPredictionResult', - 'TextSentimentPredictionResult', - 'TimeSeriesForecastingPredictionResult', - 'VideoActionRecognitionPredictionResult', - 'VideoClassificationPredictionResult', - 'VideoObjectTrackingPredictionResult', -) diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/classification.py b/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/classification.py deleted file mode 100644 index 80c12d2a0a..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/classification.py +++ /dev/null @@ -1,57 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1beta1.schema.predict.prediction', - manifest={ - 'ClassificationPredictionResult', - }, -) - - -class ClassificationPredictionResult(proto.Message): - r"""Prediction output format for Image and Text Classification. - - Attributes: - ids (Sequence[int]): - The resource IDs of the AnnotationSpecs that - had been identified. - display_names (Sequence[str]): - The display names of the AnnotationSpecs that - had been identified, order matches the IDs. - confidences (Sequence[float]): - The Model's confidences in correctness of the - predicted IDs, higher value means higher - confidence. Order matches the Ids. - """ - - ids = proto.RepeatedField( - proto.INT64, - number=1, - ) - display_names = proto.RepeatedField( - proto.STRING, - number=2, - ) - confidences = proto.RepeatedField( - proto.FLOAT, - number=3, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/image_object_detection.py b/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/image_object_detection.py deleted file mode 100644 index d8207792e8..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/image_object_detection.py +++ /dev/null @@ -1,73 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - -from google.protobuf import struct_pb2 # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1beta1.schema.predict.prediction', - manifest={ - 'ImageObjectDetectionPredictionResult', - }, -) - - -class ImageObjectDetectionPredictionResult(proto.Message): - r"""Prediction output format for Image Object Detection. - - Attributes: - ids (Sequence[int]): - The resource IDs of the AnnotationSpecs that - had been identified, ordered by the confidence - score descendingly. - display_names (Sequence[str]): - The display names of the AnnotationSpecs that - had been identified, order matches the IDs. - confidences (Sequence[float]): - The Model's confidences in correctness of the - predicted IDs, higher value means higher - confidence. Order matches the Ids. - bboxes (Sequence[google.protobuf.struct_pb2.ListValue]): - Bounding boxes, i.e. the rectangles over the image, that - pinpoint the found AnnotationSpecs. Given in order that - matches the IDs. Each bounding box is an array of 4 numbers - ``xMin``, ``xMax``, ``yMin``, and ``yMax``, which represent - the extremal coordinates of the box. They are relative to - the image size, and the point 0,0 is in the top left of the - image. - """ - - ids = proto.RepeatedField( - proto.INT64, - number=1, - ) - display_names = proto.RepeatedField( - proto.STRING, - number=2, - ) - confidences = proto.RepeatedField( - proto.FLOAT, - number=3, - ) - bboxes = proto.RepeatedField( - proto.MESSAGE, - number=4, - message=struct_pb2.ListValue, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/image_segmentation.py b/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/image_segmentation.py deleted file mode 100644 index df4e2907f9..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/image_segmentation.py +++ /dev/null @@ -1,62 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1beta1.schema.predict.prediction', - manifest={ - 'ImageSegmentationPredictionResult', - }, -) - - -class ImageSegmentationPredictionResult(proto.Message): - r"""Prediction output format for Image Segmentation. - - Attributes: - category_mask (str): - A PNG image where each pixel in the mask - represents the category in which the pixel in - the original image was predicted to belong to. - The size of this image will be the same as the - original image. The mapping between the - AnntoationSpec and the color can be found in - model's metadata. The model will choose the most - likely category and if none of the categories - reach the confidence threshold, the pixel will - be marked as background. - confidence_mask (str): - A one channel image which is encoded as an - 8bit lossless PNG. The size of the image will be - the same as the original image. For a specific - pixel, darker color means less confidence in - correctness of the cateogry in the categoryMask - for the corresponding pixel. Black means no - confidence and white means complete confidence. - """ - - category_mask = proto.Field( - proto.STRING, - number=1, - ) - confidence_mask = proto.Field( - proto.STRING, - number=2, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/tabular_classification.py b/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/tabular_classification.py deleted file mode 100644 index df55dda685..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/tabular_classification.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1beta1.schema.predict.prediction', - manifest={ - 'TabularClassificationPredictionResult', - }, -) - - -class TabularClassificationPredictionResult(proto.Message): - r"""Prediction output format for Tabular Classification. - - Attributes: - classes (Sequence[str]): - The name of the classes being classified, - contains all possible values of the target - column. - scores (Sequence[float]): - The model's confidence in each class being - correct, higher value means higher confidence. - The N-th score corresponds to the N-th class in - classes. - """ - - classes = proto.RepeatedField( - proto.STRING, - number=1, - ) - scores = proto.RepeatedField( - proto.FLOAT, - number=2, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/tabular_regression.py b/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/tabular_regression.py deleted file mode 100644 index fac8e1e6d5..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/tabular_regression.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1beta1.schema.predict.prediction', - manifest={ - 'TabularRegressionPredictionResult', - }, -) - - -class TabularRegressionPredictionResult(proto.Message): - r"""Prediction output format for Tabular Regression. - - 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, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/text_extraction.py b/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/text_extraction.py deleted file mode 100644 index b2a28d4c84..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/text_extraction.py +++ /dev/null @@ -1,78 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1beta1.schema.predict.prediction', - manifest={ - 'TextExtractionPredictionResult', - }, -) - - -class TextExtractionPredictionResult(proto.Message): - r"""Prediction output format for Text Extraction. - - Attributes: - ids (Sequence[int]): - The resource IDs of the AnnotationSpecs that - had been identified, ordered by the confidence - score descendingly. - display_names (Sequence[str]): - The display names of the AnnotationSpecs that - had been identified, order matches the IDs. - text_segment_start_offsets (Sequence[int]): - The start offsets, inclusive, of the text - segment in which the AnnotationSpec has been - identified. Expressed as a zero-based number of - characters as measured from the start of the - text snippet. - text_segment_end_offsets (Sequence[int]): - The end offsets, inclusive, of the text - segment in which the AnnotationSpec has been - identified. Expressed as a zero-based number of - characters as measured from the start of the - text snippet. - confidences (Sequence[float]): - The Model's confidences in correctness of the - predicted IDs, higher value means higher - confidence. Order matches the Ids. - """ - - ids = proto.RepeatedField( - proto.INT64, - number=1, - ) - display_names = proto.RepeatedField( - proto.STRING, - number=2, - ) - text_segment_start_offsets = proto.RepeatedField( - proto.INT64, - number=3, - ) - text_segment_end_offsets = proto.RepeatedField( - proto.INT64, - number=4, - ) - confidences = proto.RepeatedField( - proto.FLOAT, - number=5, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/text_sentiment.py b/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/text_sentiment.py deleted file mode 100644 index c041c2581c..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/text_sentiment.py +++ /dev/null @@ -1,48 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1beta1.schema.predict.prediction', - manifest={ - 'TextSentimentPredictionResult', - }, -) - - -class TextSentimentPredictionResult(proto.Message): - r"""Prediction output format for Text Sentiment - - Attributes: - sentiment (int): - The integer sentiment labels between 0 - (inclusive) and sentimentMax label (inclusive), - while 0 maps to the least positive sentiment and - sentimentMax maps to the most positive one. The - higher the score is, the more positive the - sentiment in the text snippet is. Note: - sentimentMax is an integer value between 1 - (inclusive) and 10 (inclusive). - """ - - sentiment = proto.Field( - proto.INT32, - number=1, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/time_series_forecasting.py b/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/time_series_forecasting.py deleted file mode 100644 index 37c9354c69..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/time_series_forecasting.py +++ /dev/null @@ -1,41 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1beta1.schema.predict.prediction', - manifest={ - 'TimeSeriesForecastingPredictionResult', - }, -) - - -class TimeSeriesForecastingPredictionResult(proto.Message): - r"""Prediction output format for Time Series Forecasting. - - Attributes: - value (float): - The regression value. - """ - - value = proto.Field( - proto.FLOAT, - number=1, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/video_action_recognition.py b/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/video_action_recognition.py deleted file mode 100644 index 4682a1a58e..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/video_action_recognition.py +++ /dev/null @@ -1,85 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - -from google.protobuf import duration_pb2 # type: ignore -from google.protobuf import wrappers_pb2 # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1beta1.schema.predict.prediction', - manifest={ - 'VideoActionRecognitionPredictionResult', - }, -) - - -class VideoActionRecognitionPredictionResult(proto.Message): - r"""Prediction output format for Video Action Recognition. - - Attributes: - id (str): - The resource ID of the AnnotationSpec that - had been identified. - display_name (str): - The display name of the AnnotationSpec that - had been identified. - time_segment_start (google.protobuf.duration_pb2.Duration): - The beginning, inclusive, of the video's time - segment in which the AnnotationSpec has been - identified. Expressed as a number of seconds as - measured from the start of the video, with - fractions up to a microsecond precision, and - with "s" appended at the end. - time_segment_end (google.protobuf.duration_pb2.Duration): - The end, exclusive, of the video's time - segment in which the AnnotationSpec has been - identified. Expressed as a number of seconds as - measured from the start of the video, with - fractions up to a microsecond precision, and - with "s" appended at the end. - confidence (google.protobuf.wrappers_pb2.FloatValue): - The Model's confidence in correction of this - prediction, higher value means higher - confidence. - """ - - id = proto.Field( - proto.STRING, - number=1, - ) - display_name = proto.Field( - proto.STRING, - number=2, - ) - time_segment_start = proto.Field( - proto.MESSAGE, - number=4, - message=duration_pb2.Duration, - ) - time_segment_end = proto.Field( - proto.MESSAGE, - number=5, - message=duration_pb2.Duration, - ) - confidence = proto.Field( - proto.MESSAGE, - number=6, - message=wrappers_pb2.FloatValue, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/video_classification.py b/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/video_classification.py deleted file mode 100644 index 2767545e55..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/video_classification.py +++ /dev/null @@ -1,103 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - -from google.protobuf import duration_pb2 # type: ignore -from google.protobuf import wrappers_pb2 # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1beta1.schema.predict.prediction', - manifest={ - 'VideoClassificationPredictionResult', - }, -) - - -class VideoClassificationPredictionResult(proto.Message): - r"""Prediction output format for Video Classification. - - Attributes: - id (str): - The resource ID of the AnnotationSpec that - had been identified. - display_name (str): - The display name of the AnnotationSpec that - had been identified. - type_ (str): - The type of the prediction. The requested - types can be configured via parameters. This - will be one of - segment-classification - - shot-classification - - one-sec-interval-classification - time_segment_start (google.protobuf.duration_pb2.Duration): - The beginning, inclusive, of the video's time - segment in which the AnnotationSpec has been - identified. Expressed as a number of seconds as - measured from the start of the video, with - fractions up to a microsecond precision, and - with "s" appended at the end. Note that for - 'segment-classification' prediction type, this - equals the original 'timeSegmentStart' from the - input instance, for other types it is the start - of a shot or a 1 second interval respectively. - time_segment_end (google.protobuf.duration_pb2.Duration): - The end, exclusive, of the video's time - segment in which the AnnotationSpec has been - identified. Expressed as a number of seconds as - measured from the start of the video, with - fractions up to a microsecond precision, and - with "s" appended at the end. Note that for - 'segment-classification' prediction type, this - equals the original 'timeSegmentEnd' from the - input instance, for other types it is the end of - a shot or a 1 second interval respectively. - confidence (google.protobuf.wrappers_pb2.FloatValue): - The Model's confidence in correction of this - prediction, higher value means higher - confidence. - """ - - id = proto.Field( - proto.STRING, - number=1, - ) - display_name = proto.Field( - proto.STRING, - number=2, - ) - type_ = proto.Field( - proto.STRING, - number=3, - ) - time_segment_start = proto.Field( - proto.MESSAGE, - number=4, - message=duration_pb2.Duration, - ) - time_segment_end = proto.Field( - proto.MESSAGE, - number=5, - message=duration_pb2.Duration, - ) - confidence = proto.Field( - proto.MESSAGE, - number=6, - message=wrappers_pb2.FloatValue, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/video_object_tracking.py b/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/video_object_tracking.py deleted file mode 100644 index cbbaece502..0000000000 --- a/schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/video_object_tracking.py +++ /dev/null @@ -1,145 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 proto # type: ignore - -from google.protobuf import duration_pb2 # type: ignore -from google.protobuf import wrappers_pb2 # type: ignore - - -__protobuf__ = proto.module( - package='google.cloud.aiplatform.v1beta1.schema.predict.prediction', - manifest={ - 'VideoObjectTrackingPredictionResult', - }, -) - - -class VideoObjectTrackingPredictionResult(proto.Message): - r"""Prediction output format for Video Object Tracking. - - Attributes: - id (str): - The resource ID of the AnnotationSpec that - had been identified. - display_name (str): - The display name of the AnnotationSpec that - had been identified. - time_segment_start (google.protobuf.duration_pb2.Duration): - The beginning, inclusive, of the video's time - segment in which the object instance has been - detected. Expressed as a number of seconds as - measured from the start of the video, with - fractions up to a microsecond precision, and - with "s" appended at the end. - time_segment_end (google.protobuf.duration_pb2.Duration): - The end, inclusive, of the video's time - segment in which the object instance has been - detected. Expressed as a number of seconds as - measured from the start of the video, with - fractions up to a microsecond precision, and - with "s" appended at the end. - confidence (google.protobuf.wrappers_pb2.FloatValue): - The Model's confidence in correction of this - prediction, higher value means higher - confidence. - frames (Sequence[google.cloud.aiplatform.v1beta1.schema.predict.prediction_v1beta1.types.VideoObjectTrackingPredictionResult.Frame]): - All of the frames of the video in which a - single object instance has been detected. The - bounding boxes in the frames identify the same - object. - """ - - class Frame(proto.Message): - r"""The fields ``xMin``, ``xMax``, ``yMin``, and ``yMax`` refer to a - bounding box, i.e. the rectangle over the video frame pinpointing - the found AnnotationSpec. The coordinates are relative to the frame - size, and the point 0,0 is in the top left of the frame. - - Attributes: - time_offset (google.protobuf.duration_pb2.Duration): - A time (frame) of a video in which the object - has been detected. Expressed as a number of - seconds as measured from the start of the video, - with fractions up to a microsecond precision, - and with "s" appended at the end. - x_min (google.protobuf.wrappers_pb2.FloatValue): - The leftmost coordinate of the bounding box. - x_max (google.protobuf.wrappers_pb2.FloatValue): - The rightmost coordinate of the bounding box. - y_min (google.protobuf.wrappers_pb2.FloatValue): - The topmost coordinate of the bounding box. - y_max (google.protobuf.wrappers_pb2.FloatValue): - The bottommost coordinate of the bounding - box. - """ - - time_offset = proto.Field( - proto.MESSAGE, - number=1, - message=duration_pb2.Duration, - ) - x_min = proto.Field( - proto.MESSAGE, - number=2, - message=wrappers_pb2.FloatValue, - ) - x_max = proto.Field( - proto.MESSAGE, - number=3, - message=wrappers_pb2.FloatValue, - ) - y_min = proto.Field( - proto.MESSAGE, - number=4, - message=wrappers_pb2.FloatValue, - ) - y_max = proto.Field( - proto.MESSAGE, - number=5, - message=wrappers_pb2.FloatValue, - ) - - id = proto.Field( - proto.STRING, - number=1, - ) - display_name = proto.Field( - proto.STRING, - number=2, - ) - time_segment_start = proto.Field( - proto.MESSAGE, - number=3, - message=duration_pb2.Duration, - ) - time_segment_end = proto.Field( - proto.MESSAGE, - number=4, - message=duration_pb2.Duration, - ) - confidence = proto.Field( - proto.MESSAGE, - number=5, - message=wrappers_pb2.FloatValue, - ) - frames = proto.RepeatedField( - proto.MESSAGE, - number=6, - message=Frame, - ) - - -__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/schema/predict/prediction/mypy.ini b/schema/predict/prediction/mypy.ini deleted file mode 100644 index 4505b48543..0000000000 --- a/schema/predict/prediction/mypy.ini +++ /dev/null @@ -1,3 +0,0 @@ -[mypy] -python_version = 3.6 -namespace_packages = True diff --git a/schema/predict/prediction/noxfile.py b/schema/predict/prediction/noxfile.py deleted file mode 100644 index 8ea8ef006a..0000000000 --- a/schema/predict/prediction/noxfile.py +++ /dev/null @@ -1,132 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 os -import pathlib -import shutil -import subprocess -import sys - - -import nox # type: ignore - -CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() - -LOWER_BOUND_CONSTRAINTS_FILE = CURRENT_DIRECTORY / "constraints.txt" -PACKAGE_NAME = subprocess.check_output([sys.executable, "setup.py", "--name"], encoding="utf-8") - - -nox.sessions = [ - "unit", - "cover", - "mypy", - "check_lower_bounds" - # exclude update_lower_bounds from default - "docs", -] - -@nox.session(python=['3.6', '3.7', '3.8', '3.9']) -def unit(session): - """Run the unit test suite.""" - - session.install('coverage', 'pytest', 'pytest-cov', 'asyncmock', 'pytest-asyncio') - session.install('-e', '.') - - session.run( - 'py.test', - '--quiet', - '--cov=google/cloud/aiplatform/v1/schema/predict/prediction_v1/', - '--cov-config=.coveragerc', - '--cov-report=term', - '--cov-report=html', - os.path.join('tests', 'unit', ''.join(session.posargs)) - ) - - -@nox.session(python='3.7') -def cover(session): - """Run the final coverage report. - This outputs the coverage report aggregating coverage from the unit - test runs (not system test runs), and then erases coverage data. - """ - session.install("coverage", "pytest-cov") - session.run("coverage", "report", "--show-missing", "--fail-under=100") - - session.run("coverage", "erase") - - -@nox.session(python=['3.6', '3.7']) -def mypy(session): - """Run the type checker.""" - session.install('mypy', 'types-pkg_resources') - session.install('.') - session.run( - 'mypy', - '--explicit-package-bases', - 'google', - ) - - -@nox.session -def update_lower_bounds(session): - """Update lower bounds in constraints.txt to match setup.py""" - session.install('google-cloud-testutils') - session.install('.') - - session.run( - 'lower-bound-checker', - 'update', - '--package-name', - PACKAGE_NAME, - '--constraints-file', - str(LOWER_BOUND_CONSTRAINTS_FILE), - ) - - -@nox.session -def check_lower_bounds(session): - """Check lower bounds in setup.py are reflected in constraints file""" - session.install('google-cloud-testutils') - session.install('.') - - session.run( - 'lower-bound-checker', - 'check', - '--package-name', - PACKAGE_NAME, - '--constraints-file', - str(LOWER_BOUND_CONSTRAINTS_FILE), - ) - -@nox.session(python='3.6') -def docs(session): - """Build the docs for this library.""" - - session.install("-e", ".") - session.install("sphinx<3.0.0", "alabaster", "recommonmark") - - shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) - session.run( - "sphinx-build", - "-W", # warnings as errors - "-T", # show full traceback on exception - "-N", # no colors - "-b", - "html", - "-d", - os.path.join("docs", "_build", "doctrees", ""), - os.path.join("docs", ""), - os.path.join("docs", "_build", "html", ""), - ) diff --git a/schema/predict/prediction/scripts/fixup_prediction_v1_keywords.py b/schema/predict/prediction/scripts/fixup_prediction_v1_keywords.py deleted file mode 100644 index df2a884371..0000000000 --- a/schema/predict/prediction/scripts/fixup_prediction_v1_keywords.py +++ /dev/null @@ -1,175 +0,0 @@ -#! /usr/bin/env python3 -# -*- coding: utf-8 -*- -# Copyright 2020 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 argparse -import os -import libcst as cst -import pathlib -import sys -from typing import (Any, Callable, Dict, List, Sequence, Tuple) - - -def partition( - predicate: Callable[[Any], bool], - iterator: Sequence[Any] -) -> Tuple[List[Any], List[Any]]: - """A stable, out-of-place partition.""" - results = ([], []) - - for i in iterator: - results[int(predicate(i))].append(i) - - # Returns trueList, falseList - return results[1], results[0] - - -class predictionCallTransformer(cst.CSTTransformer): - CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata') - METHOD_TO_PARAMS: Dict[str, Tuple[str]] = { - } - - def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: - try: - key = original.func.attr.value - kword_params = self.METHOD_TO_PARAMS[key] - except (AttributeError, KeyError): - # Either not a method from the API or too convoluted to be sure. - return updated - - # If the existing code is valid, keyword args come after positional args. - # Therefore, all positional args must map to the first parameters. - args, kwargs = partition(lambda a: not bool(a.keyword), updated.args) - if any(k.keyword.value == "request" for k in kwargs): - # We've already fixed this file, don't fix it again. - return updated - - kwargs, ctrl_kwargs = partition( - lambda a: a.keyword.value not in self.CTRL_PARAMS, - kwargs - ) - - args, ctrl_args = args[:len(kword_params)], args[len(kword_params):] - ctrl_kwargs.extend(cst.Arg(value=a.value, keyword=cst.Name(value=ctrl)) - for a, ctrl in zip(ctrl_args, self.CTRL_PARAMS)) - - request_arg = cst.Arg( - value=cst.Dict([ - cst.DictElement( - cst.SimpleString("'{}'".format(name)), -cst.Element(value=arg.value) - ) - # Note: the args + kwargs looks silly, but keep in mind that - # the control parameters had to be stripped out, and that - # those could have been passed positionally or by keyword. - for name, arg in zip(kword_params, args + kwargs)]), - keyword=cst.Name("request") - ) - - return updated.with_changes( - args=[request_arg] + ctrl_kwargs - ) - - -def fix_files( - in_dir: pathlib.Path, - out_dir: pathlib.Path, - *, - transformer=predictionCallTransformer(), -): - """Duplicate the input dir to the output dir, fixing file method calls. - - Preconditions: - * in_dir is a real directory - * out_dir is a real, empty directory - """ - pyfile_gen = ( - pathlib.Path(os.path.join(root, f)) - for root, _, files in os.walk(in_dir) - for f in files if os.path.splitext(f)[1] == ".py" - ) - - for fpath in pyfile_gen: - with open(fpath, 'r') as f: - src = f.read() - - # Parse the code and insert method call fixes. - tree = cst.parse_module(src) - updated = tree.visit(transformer) - - # Create the path and directory structure for the new file. - updated_path = out_dir.joinpath(fpath.relative_to(in_dir)) - updated_path.parent.mkdir(parents=True, exist_ok=True) - - # Generate the updated source file at the corresponding path. - with open(updated_path, 'w') as f: - f.write(updated.code) - - -if __name__ == '__main__': - parser = argparse.ArgumentParser( - description="""Fix up source that uses the prediction client library. - -The existing sources are NOT overwritten but are copied to output_dir with changes made. - -Note: This tool operates at a best-effort level at converting positional - parameters in client method calls to keyword based parameters. - Cases where it WILL FAIL include - A) * or ** expansion in a method call. - B) Calls via function or method alias (includes free function calls) - C) Indirect or dispatched calls (e.g. the method is looked up dynamically) - - These all constitute false negatives. The tool will also detect false - positives when an API method shares a name with another method. -""") - parser.add_argument( - '-d', - '--input-directory', - required=True, - dest='input_dir', - help='the input directory to walk for python files to fix up', - ) - parser.add_argument( - '-o', - '--output-directory', - required=True, - dest='output_dir', - help='the directory to output files fixed via un-flattening', - ) - args = parser.parse_args() - input_dir = pathlib.Path(args.input_dir) - output_dir = pathlib.Path(args.output_dir) - if not input_dir.is_dir(): - print( - f"input directory '{input_dir}' does not exist or is not a directory", - file=sys.stderr, - ) - sys.exit(-1) - - if not output_dir.is_dir(): - print( - f"output directory '{output_dir}' does not exist or is not a directory", - file=sys.stderr, - ) - sys.exit(-1) - - if os.listdir(output_dir): - print( - f"output directory '{output_dir}' is not empty", - file=sys.stderr, - ) - sys.exit(-1) - - fix_files(input_dir, output_dir) diff --git a/schema/predict/prediction/scripts/fixup_prediction_v1beta1_keywords.py b/schema/predict/prediction/scripts/fixup_prediction_v1beta1_keywords.py deleted file mode 100644 index df2a884371..0000000000 --- a/schema/predict/prediction/scripts/fixup_prediction_v1beta1_keywords.py +++ /dev/null @@ -1,175 +0,0 @@ -#! /usr/bin/env python3 -# -*- coding: utf-8 -*- -# Copyright 2020 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 argparse -import os -import libcst as cst -import pathlib -import sys -from typing import (Any, Callable, Dict, List, Sequence, Tuple) - - -def partition( - predicate: Callable[[Any], bool], - iterator: Sequence[Any] -) -> Tuple[List[Any], List[Any]]: - """A stable, out-of-place partition.""" - results = ([], []) - - for i in iterator: - results[int(predicate(i))].append(i) - - # Returns trueList, falseList - return results[1], results[0] - - -class predictionCallTransformer(cst.CSTTransformer): - CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata') - METHOD_TO_PARAMS: Dict[str, Tuple[str]] = { - } - - def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: - try: - key = original.func.attr.value - kword_params = self.METHOD_TO_PARAMS[key] - except (AttributeError, KeyError): - # Either not a method from the API or too convoluted to be sure. - return updated - - # If the existing code is valid, keyword args come after positional args. - # Therefore, all positional args must map to the first parameters. - args, kwargs = partition(lambda a: not bool(a.keyword), updated.args) - if any(k.keyword.value == "request" for k in kwargs): - # We've already fixed this file, don't fix it again. - return updated - - kwargs, ctrl_kwargs = partition( - lambda a: a.keyword.value not in self.CTRL_PARAMS, - kwargs - ) - - args, ctrl_args = args[:len(kword_params)], args[len(kword_params):] - ctrl_kwargs.extend(cst.Arg(value=a.value, keyword=cst.Name(value=ctrl)) - for a, ctrl in zip(ctrl_args, self.CTRL_PARAMS)) - - request_arg = cst.Arg( - value=cst.Dict([ - cst.DictElement( - cst.SimpleString("'{}'".format(name)), -cst.Element(value=arg.value) - ) - # Note: the args + kwargs looks silly, but keep in mind that - # the control parameters had to be stripped out, and that - # those could have been passed positionally or by keyword. - for name, arg in zip(kword_params, args + kwargs)]), - keyword=cst.Name("request") - ) - - return updated.with_changes( - args=[request_arg] + ctrl_kwargs - ) - - -def fix_files( - in_dir: pathlib.Path, - out_dir: pathlib.Path, - *, - transformer=predictionCallTransformer(), -): - """Duplicate the input dir to the output dir, fixing file method calls. - - Preconditions: - * in_dir is a real directory - * out_dir is a real, empty directory - """ - pyfile_gen = ( - pathlib.Path(os.path.join(root, f)) - for root, _, files in os.walk(in_dir) - for f in files if os.path.splitext(f)[1] == ".py" - ) - - for fpath in pyfile_gen: - with open(fpath, 'r') as f: - src = f.read() - - # Parse the code and insert method call fixes. - tree = cst.parse_module(src) - updated = tree.visit(transformer) - - # Create the path and directory structure for the new file. - updated_path = out_dir.joinpath(fpath.relative_to(in_dir)) - updated_path.parent.mkdir(parents=True, exist_ok=True) - - # Generate the updated source file at the corresponding path. - with open(updated_path, 'w') as f: - f.write(updated.code) - - -if __name__ == '__main__': - parser = argparse.ArgumentParser( - description="""Fix up source that uses the prediction client library. - -The existing sources are NOT overwritten but are copied to output_dir with changes made. - -Note: This tool operates at a best-effort level at converting positional - parameters in client method calls to keyword based parameters. - Cases where it WILL FAIL include - A) * or ** expansion in a method call. - B) Calls via function or method alias (includes free function calls) - C) Indirect or dispatched calls (e.g. the method is looked up dynamically) - - These all constitute false negatives. The tool will also detect false - positives when an API method shares a name with another method. -""") - parser.add_argument( - '-d', - '--input-directory', - required=True, - dest='input_dir', - help='the input directory to walk for python files to fix up', - ) - parser.add_argument( - '-o', - '--output-directory', - required=True, - dest='output_dir', - help='the directory to output files fixed via un-flattening', - ) - args = parser.parse_args() - input_dir = pathlib.Path(args.input_dir) - output_dir = pathlib.Path(args.output_dir) - if not input_dir.is_dir(): - print( - f"input directory '{input_dir}' does not exist or is not a directory", - file=sys.stderr, - ) - sys.exit(-1) - - if not output_dir.is_dir(): - print( - f"output directory '{output_dir}' does not exist or is not a directory", - file=sys.stderr, - ) - sys.exit(-1) - - if os.listdir(output_dir): - print( - f"output directory '{output_dir}' is not empty", - file=sys.stderr, - ) - sys.exit(-1) - - fix_files(input_dir, output_dir) diff --git a/schema/predict/prediction/setup.py b/schema/predict/prediction/setup.py deleted file mode 100644 index f4ab906809..0000000000 --- a/schema/predict/prediction/setup.py +++ /dev/null @@ -1,54 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2020 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 io -import os -import setuptools # type: ignore - -version = '0.1.0' - -package_root = os.path.abspath(os.path.dirname(__file__)) - -readme_filename = os.path.join(package_root, 'README.rst') -with io.open(readme_filename, encoding='utf-8') as readme_file: - readme = readme_file.read() - -setuptools.setup( - name='google-cloud-aiplatform-v1-schema-predict-prediction', - version=version, - long_description=readme, - packages=setuptools.PEP420PackageFinder.find(), - namespace_packages=('google', 'google.cloud', 'google.cloud.aiplatform', 'google.cloud.aiplatform.v1', 'google.cloud.aiplatform.v1.schema', 'google.cloud.aiplatform.v1.schema.predict'), - platforms='Posix; MacOS X; Windows', - include_package_data=True, - install_requires=( - 'google-api-core[grpc] >= 1.27.0, < 3.0.0dev', - 'libcst >= 0.2.5', - 'proto-plus >= 1.15.0', - 'packaging >= 14.3', ), - python_requires='>=3.6', - classifiers=[ - 'Development Status :: 3 - Alpha', - 'Intended Audience :: Developers', - 'Operating System :: OS Independent', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Topic :: Internet', - 'Topic :: Software Development :: Libraries :: Python Modules', - ], - zip_safe=False, -) diff --git a/schema/predict/prediction/tests/__init__.py b/schema/predict/prediction/tests/__init__.py deleted file mode 100644 index b54a5fcc42..0000000000 --- a/schema/predict/prediction/tests/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ - -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# diff --git a/schema/predict/prediction/tests/unit/__init__.py b/schema/predict/prediction/tests/unit/__init__.py deleted file mode 100644 index b54a5fcc42..0000000000 --- a/schema/predict/prediction/tests/unit/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ - -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# diff --git a/schema/predict/prediction/tests/unit/gapic/__init__.py b/schema/predict/prediction/tests/unit/gapic/__init__.py deleted file mode 100644 index b54a5fcc42..0000000000 --- a/schema/predict/prediction/tests/unit/gapic/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ - -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# diff --git a/schema/predict/prediction/tests/unit/gapic/prediction_v1/__init__.py b/schema/predict/prediction/tests/unit/gapic/prediction_v1/__init__.py deleted file mode 100644 index b54a5fcc42..0000000000 --- a/schema/predict/prediction/tests/unit/gapic/prediction_v1/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ - -# -*- coding: utf-8 -*- -# Copyright 2020 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. -# diff --git a/schema/predict/prediction/tests/unit/gapic/prediction_v1beta1/__init__.py b/schema/predict/prediction/tests/unit/gapic/prediction_v1beta1/__init__.py deleted file mode 100644 index b54a5fcc42..0000000000 --- a/schema/predict/prediction/tests/unit/gapic/prediction_v1beta1/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ - -# -*- coding: utf-8 -*- -# Copyright 2020 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. -#