Skip to content

Commit

Permalink
Merge branch 'main' into model-monitoring
Browse files Browse the repository at this point in the history
  • Loading branch information
rosiezou authored Jun 16, 2022
2 parents 99987d3 + 7fc4a22 commit 7e373c9
Show file tree
Hide file tree
Showing 333 changed files with 114,875 additions and 2,806 deletions.
29 changes: 5 additions & 24 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,10 @@
#
# For syntax help see:
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax
# Note: This file is autogenerated. To make changes to the codeowner team, please update .repo-metadata.json.

# @googleapis/cdpe-cloudai and yoshi-python are the default owners
* @googleapis/cdpe-cloudai @googleapis/yoshi-python
# @googleapis/yoshi-python is the default owner for changes in this repo
* @googleapis/yoshi-python

# The AI Platform GAPIC libraries are owned by Cloud AI DPE
/google/cloud/aiplatform_*/** @googleapis/cdpe-cloudai

# The Vertex SDK is owned by Vertex SDK Dev team
/google/cloud/aiplatform/** @googleapis/cloud-aiplatform-model-builder-sdk
/tests/system/aiplatform/** @googleapis/cloud-aiplatform-model-builder-sdk
/tests/unit/aiplatform/** @googleapis/cloud-aiplatform-model-builder-sdk

# The Cloud AI DPE team is the default owner for samples
/samples/**/*.py @googleapis/cdpe-cloudai @googleapis/python-samples-reviewers
/.sample_configs/** @googleapis/cdpe-cloudai

# The enhanced client library tests are owned by Cloud AI DPE
/tests/unit/enhanced_library/*.py @googleapis/cdpe-cloudai

# Core library files owned by Cloud AI DPE and Vertex SDK Dev teams
CHANGELOG.md @googleapis/cloud-aiplatform-model-builder-sdk @googleapis/cdpe-cloudai
README.rst @googleapis/cloud-aiplatform-model-builder-sdk @googleapis/cdpe-cloudai
setup.py @googleapis/cloud-aiplatform-model-builder-sdk @googleapis/cdpe-cloudai

# Vertex AI product team-specific ownership
/google/cloud/aiplatform/constants/prediction.py @googleapis/vertex-prediction-team
# @googleapis/python-samples-reviewers is the default owner for samples changes
/samples/ @googleapis/python-samples-reviewers
2 changes: 1 addition & 1 deletion .kokoro/continuous/unit.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Run all unit test sessions, in Python 3.6 to 3.9
# Run all unit test sessions, in Python 3.7 to 3.9
env_vars: {
key: "NOX_SESSION"
value: "unit"
Expand Down
40 changes: 0 additions & 40 deletions .kokoro/samples/python3.6/common.cfg

This file was deleted.

7 changes: 0 additions & 7 deletions .kokoro/samples/python3.6/continuous.cfg

This file was deleted.

11 changes: 0 additions & 11 deletions .kokoro/samples/python3.6/periodic-head.cfg

This file was deleted.

6 changes: 0 additions & 6 deletions .kokoro/samples/python3.6/periodic.cfg

This file was deleted.

6 changes: 0 additions & 6 deletions .kokoro/samples/python3.6/presubmit.cfg

This file was deleted.

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

env_vars: {
key: "INSTALL_LIBRARY_FROM_SOURCE"
value: "False"
value: "True"
}
2 changes: 1 addition & 1 deletion .kokoro/samples/python3.8/periodic.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

env_vars: {
key: "INSTALL_LIBRARY_FROM_SOURCE"
value: "False"
value: "True"
}
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# Changelog

## [1.14.0](https://github.com/googleapis/python-aiplatform/compare/v1.13.1...v1.14.0) (2022-06-08)


### Features

* add a way to easily clone a PipelineJob ([#1239](https://github.com/googleapis/python-aiplatform/issues/1239)) ([efaf6ed](https://github.com/googleapis/python-aiplatform/commit/efaf6edc36262b095aa13d0b40348c20e39b3fc6))
* add display_name and metadata to ModelEvaluation in aiplatform model_evaluation.proto ([b6bf6dc](https://github.com/googleapis/python-aiplatform/commit/b6bf6dc643274220e6eeca6479b5f9df61b11d16))
* add Examples to Explanation related messages in aiplatform v1beta1 explanation.proto ([b6bf6dc](https://github.com/googleapis/python-aiplatform/commit/b6bf6dc643274220e6eeca6479b5f9df61b11d16))
* Add hierarchy and window configs to Vertex Forecasting training job ([#1255](https://github.com/googleapis/python-aiplatform/issues/1255)) ([8560fa8](https://github.com/googleapis/python-aiplatform/commit/8560fa88c8e0fe51f2ae56f68be575e85db3696a))
* add holiday regions for vertex forecasting ([#1253](https://github.com/googleapis/python-aiplatform/issues/1253)) ([0036ab0](https://github.com/googleapis/python-aiplatform/commit/0036ab07004e0c9ae7806c4c2c25f22d5af4a978))
* add IAM policy to aiplatform_v1beta1.yaml ([b6bf6dc](https://github.com/googleapis/python-aiplatform/commit/b6bf6dc643274220e6eeca6479b5f9df61b11d16))
* add latent_space_source to ExplanationMetadata in aiplatform v1 explanation_metadata.proto ([b6bf6dc](https://github.com/googleapis/python-aiplatform/commit/b6bf6dc643274220e6eeca6479b5f9df61b11d16))
* add latent_space_source to ExplanationMetadata in aiplatform v1beta1 explanation_metadata.proto ([b6bf6dc](https://github.com/googleapis/python-aiplatform/commit/b6bf6dc643274220e6eeca6479b5f9df61b11d16))
* add preset configuration for example-based explanations in aiplatform v1beta1 explanation.proto ([b6bf6dc](https://github.com/googleapis/python-aiplatform/commit/b6bf6dc643274220e6eeca6479b5f9df61b11d16))
* add scaling to OnlineServingConfig in aiplatform v1 featurestore.proto ([b6bf6dc](https://github.com/googleapis/python-aiplatform/commit/b6bf6dc643274220e6eeca6479b5f9df61b11d16))
* add seq2seq forecasting training job ([#1196](https://github.com/googleapis/python-aiplatform/issues/1196)) ([643d335](https://github.com/googleapis/python-aiplatform/commit/643d335693ec57848949ee173401867a1188678b))
* add successful_forecast_point_count to CompletionStats in completion_stats.proto ([b6bf6dc](https://github.com/googleapis/python-aiplatform/commit/b6bf6dc643274220e6eeca6479b5f9df61b11d16))
* add template_metadata to PipelineJob in aiplatform v1 pipeline_job.proto ([b6bf6dc](https://github.com/googleapis/python-aiplatform/commit/b6bf6dc643274220e6eeca6479b5f9df61b11d16))
* Add Vertex Forecasting E2E test. ([#1248](https://github.com/googleapis/python-aiplatform/issues/1248)) ([e82c179](https://github.com/googleapis/python-aiplatform/commit/e82c1792293396045a1032df015a3700fc38609b))
* Added forecasting snippets and fixed bugs with existing snippets ([#1210](https://github.com/googleapis/python-aiplatform/issues/1210)) ([4e4bff5](https://github.com/googleapis/python-aiplatform/commit/4e4bff5cac3a99e7f55145ab2aee83b20af67060))


### Bug Fixes

* change endpoint update method to return resource ([#1409](https://github.com/googleapis/python-aiplatform/issues/1409)) ([44e279b](https://github.com/googleapis/python-aiplatform/commit/44e279b15a1b03bf234111333517153ffdbaf696))
* Changed system test to use list_models() correctly ([#1397](https://github.com/googleapis/python-aiplatform/issues/1397)) ([a3da19a](https://github.com/googleapis/python-aiplatform/commit/a3da19aac6bdd3fa8d218408582205f7241a4b04))
* Pinned protobuf to prevent issues with pb files. ([#1398](https://github.com/googleapis/python-aiplatform/issues/1398)) ([7a54637](https://github.com/googleapis/python-aiplatform/commit/7a54637d9b0e7a52ec4648505a6902610c4cc5b7))


### Documentation

* fix changelog header to consistent size ([#1404](https://github.com/googleapis/python-aiplatform/issues/1404)) ([f6a7e6f](https://github.com/googleapis/python-aiplatform/commit/f6a7e6f35188d6032fc8b34a3c205b0632029e02))

## [1.13.1](https://github.com/googleapis/python-aiplatform/compare/v1.13.0...v1.13.1) (2022-05-26)


Expand Down
6 changes: 2 additions & 4 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ In order to add a feature:
documentation.

- The feature must work fully on the following CPython versions:
3.6, 3.7, 3.8 and 3.9 on both UNIX and Windows.
3.7, 3.8 and 3.9 on both UNIX and Windows.

- The feature must not add unnecessary dependencies (where
"unnecessary" is of course subjective, but new dependencies should
Expand Down Expand Up @@ -221,12 +221,10 @@ Supported Python Versions

We support:

- `Python 3.6`_
- `Python 3.7`_
- `Python 3.8`_
- `Python 3.9`_

.. _Python 3.6: https://docs.python.org/3.6/
.. _Python 3.7: https://docs.python.org/3.7/
.. _Python 3.8: https://docs.python.org/3.8/
.. _Python 3.9: https://docs.python.org/3.9/
Expand All @@ -237,7 +235,7 @@ Supported versions can be found in our ``noxfile.py`` `config`_.
.. _config: https://github.com/googleapis/python-aiplatform/blob/main/noxfile.py


We also explicitly decided to support Python 3 beginning with version 3.6.
We also explicitly decided to support Python 3 beginning with version 3.7.
Reasons for this include:

- Encouraging use of newest versions of Python 3
Expand Down
10 changes: 10 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ Windows
<your-env>\Scripts\pip.exe install google-cloud-aiplatform
Supported Python Versions
^^^^^^^^^^^^^^^^^^^^^^^^^
Python >= 3.7

Deprecated Python Versions
^^^^^^^^^^^^^^^^^^^^^^^^^^
Python == 3.6.

The last version of this library compatible with Python 3.6 is google-cloud-aiplatform==1.12.1.

Overview
~~~~~~~~
This section provides a brief overview of the Vertex AI SDK for Python. You can also reference the notebooks in `vertex-ai-samples`_ for examples.
Expand Down
32 changes: 26 additions & 6 deletions google/cloud/aiplatform/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
MatchingEngineIndex,
MatchingEngineIndexEndpoint,
)
from google.cloud.aiplatform.metadata import metadata
from google.cloud.aiplatform import metadata
from google.cloud.aiplatform.models import Endpoint
from google.cloud.aiplatform.models import Model
from google.cloud.aiplatform.model_evaluation import ModelEvaluation
Expand All @@ -57,6 +57,7 @@
Tensorboard,
TensorboardExperiment,
TensorboardRun,
TensorboardTimeSeries,
)
from google.cloud.aiplatform.training_jobs import (
CustomTrainingJob,
Expand All @@ -79,24 +80,39 @@
"""
init = initializer.global_config.init

log_params = metadata.metadata_service.log_params
log_metrics = metadata.metadata_service.log_metrics
get_experiment_df = metadata.metadata_service.get_experiment_df
get_pipeline_df = metadata.metadata_service.get_pipeline_df
start_run = metadata.metadata_service.start_run
get_pipeline_df = metadata.metadata._LegacyExperimentService.get_pipeline_df

log_params = metadata.metadata._experiment_tracker.log_params
log_metrics = metadata.metadata._experiment_tracker.log_metrics
get_experiment_df = metadata.metadata._experiment_tracker.get_experiment_df
start_run = metadata.metadata._experiment_tracker.start_run
start_execution = metadata.metadata._experiment_tracker.start_execution
log = metadata.metadata._experiment_tracker.log
log_time_series_metrics = metadata.metadata._experiment_tracker.log_time_series_metrics
end_run = metadata.metadata._experiment_tracker.end_run

Experiment = metadata.experiment_resources.Experiment
ExperimentRun = metadata.experiment_run_resource.ExperimentRun
Artifact = metadata.artifact.Artifact
Execution = metadata.execution.Execution


__all__ = (
"end_run",
"explain",
"gapic",
"init",
"helpers",
"hyperparameter_tuning",
"log",
"log_params",
"log_metrics",
"log_time_series_metrics",
"get_experiment_df",
"get_pipeline_df",
"start_run",
"start_execution",
"Artifact",
"AutoMLImageTrainingJob",
"AutoMLTabularTrainingJob",
"AutoMLForecastingTrainingJob",
Expand All @@ -109,6 +125,9 @@
"CustomPythonPackageTrainingJob",
"Endpoint",
"EntityType",
"Execution",
"Experiment",
"ExperimentRun",
"Feature",
"Featurestore",
"MatchingEngineIndex",
Expand All @@ -124,6 +143,7 @@
"Tensorboard",
"TensorboardExperiment",
"TensorboardRun",
"TensorboardTimeSeries",
"TextDataset",
"TimeSeriesDataset",
"VideoDataset",
Expand Down
19 changes: 19 additions & 0 deletions google/cloud/aiplatform/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,25 @@ def name(self) -> str:
self._assert_gca_resource_is_available()
return self._gca_resource.name.split("/")[-1]

@property
def _project_tuple(self) -> Tuple[Optional[str], Optional[str]]:
"""Returns the tuple of project id and project inferred from the local instance.
Another option is to use resource_manager_utils but requires the caller have resource manager
get role.
"""
# we may not have the project if project inferred from the resource name
maybe_project_id = self.project
if self._gca_resource is not None and self._gca_resource.name:
project_no = self._parse_resource_name(self._gca_resource.name)["project"]
else:
project_no = None

if maybe_project_id == project_no:
return (None, project_no)
else:
return (maybe_project_id, project_no)

@property
def resource_name(self) -> str:
"""Full qualified resource name."""
Expand Down
4 changes: 4 additions & 0 deletions google/cloud/aiplatform/compat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
types.io = types.io_v1beta1
types.job_service = types.job_service_v1beta1
types.job_state = types.job_state_v1beta1
types.lineage_subgraph = types.lineage_subgraph_v1beta1
types.machine_resources = types.machine_resources_v1beta1
types.manual_batch_tuning_parameters = types.manual_batch_tuning_parameters_v1beta1
types.matching_engine_deployed_index_ref = (
Expand All @@ -88,6 +89,7 @@
types.matching_engine_index = types.index_v1beta1
types.matching_engine_index_endpoint = types.index_endpoint_v1beta1
types.metadata_service = types.metadata_service_v1beta1
types.metadata_schema = types.metadata_schema_v1beta1
types.metadata_store = types.metadata_store_v1beta1
types.model = types.model_v1beta1
types.model_evaluation = types.model_evaluation_v1beta1
Expand Down Expand Up @@ -166,6 +168,7 @@
types.io = types.io_v1
types.job_service = types.job_service_v1
types.job_state = types.job_state_v1
types.lineage_subgraph = types.lineage_subgraph_v1
types.machine_resources = types.machine_resources_v1
types.manual_batch_tuning_parameters = types.manual_batch_tuning_parameters_v1
types.matching_engine_deployed_index_ref = (
Expand All @@ -174,6 +177,7 @@
types.matching_engine_index = types.index_v1
types.matching_engine_index_endpoint = types.index_endpoint_v1
types.metadata_service = types.metadata_service_v1
types.metadata_schema = types.metadata_schema_v1
types.metadata_store = types.metadata_store_v1
types.model = types.model_v1
types.model_evaluation = types.model_evaluation_v1
Expand Down
Loading

0 comments on commit 7e373c9

Please sign in to comment.