From 907cf0dd69aec92c4c0532c22dc533ab31b7f630 Mon Sep 17 00:00:00 2001 From: "Sanjay Kumar.C" <55217181+jay90099@users.noreply.github.com> Date: Wed, 20 Oct 2021 16:29:34 -0700 Subject: [PATCH] TFX 1.3.1 Release (#4392) Co-authored-by: tfx-team --- README.md | 1 + RELEASE.md | 47 ++----------------- .../prediction_clients.py | 18 +++++-- .../pusher/executor.py | 1 + .../pusher/executor_test.py | 6 ++- tfx/version.py | 2 +- 6 files changed, 25 insertions(+), 50 deletions(-) diff --git a/README.md b/README.md index 35ee257051..b3d61a3076 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,7 @@ but other *untested* combinations may also work. tfx | apache-beam[gcp] | ml-metadata | pyarrow | tensorflow | tensorflow-data-validation | tensorflow-metadata | tensorflow-model-analysis | tensorflow-serving-api | tensorflow-transform | tfx-bsl ------------------------------------------------------------------------- | ---------------- | ----------- | ------- | ----------------- | -------------------------- | ------------------- | ------------------------- | ---------------------- | -------------------- | ------- [GitHub master](https://github.com/tensorflow/tfx/blob/master/RELEASE.md) | 2.32.0 | 1.3.0 | 2.0.0 | nightly (1.x/2.x) | 1.3.0 | 1.2.0 | 0.34.1 | 2.6.0 | 1.3.0 | 1.3.0 +1.3.1 | 2.32.0 | 1.3.0 | 2.0.0 | 1.15.0 / 2.6.0 | 1.3.0 | 1.2.0 | 0.34.1 | 2.6.0 | 1.3.0 | 1.3.0 1.3.0 | 2.32.0 | 1.3.0 | 2.0.0 | 1.15.0 / 2.6.0 | 1.3.0 | 1.2.0 | 0.34.1 | 2.6.0 | 1.3.0 | 1.3.0 1.2.0 | 2.31.0 | 1.2.0 | 2.0.0 | 1.15.0 / 2.5.0 | 1.2.0 | 1.2.0 | 0.33.0 | 2.5.1 | 1.2.0 | 1.2.0 1.0.0 | 2.29.0 | 1.0.0 | 2.0.0 | 1.15.0 / 2.5.0 | 1.0.0 | 1.0.0 | 0.31.0 | 2.5.1 | 1.0.0 | 1.0.0 diff --git a/RELEASE.md b/RELEASE.md index f6b3c5fb43..e63402406a 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,20 +1,8 @@ -# Version 1.3.0 +# Version 1.3.1 ## Major Features and Improvements -* TFX CLI now supports runtime parameter on Kubeflow, Vertex, and Airflow. - Use it with '--runtime_parameter==' flag. - In the case of multiple runtime parameters, format is as follows: - '--runtime_parameter== --runtime_parameter - ==' -* Added Manual node in the experimental orchestrator. -* Placeholders support index access and JSON serialization for list type execution properties. -* Added `ImportSchemaGen` which is a dedicated component to import a - pre-defined schema file. ImportSchemaGen will replace `Importer` with - simpler syntax and less constraints. You have to pass the file path to the - schema file instead of the parent directory unlike `Importer`. - -## Breaking Changes +* N/A ### For Pipeline Authors @@ -26,38 +14,11 @@ ## Deprecations -* The import name of KerasTuner has been changed from `kerastuner` - to `keras_tuner`. The import name of `kerastuner` is still supported. - A warning will occur when import from `kerastuner`, but does not affect - the usage. +* N/A ## Bug Fixes and Other Changes -* The default job name for Google Cloud AI Training jobs was changed from - 'tfx_YYYYmmddHHMMSS' to 'tfx_YYYYmmddHHMMSS_xxxxxxxx', where 'xxxxxxxx' is - a random 8 digit hexadecimal string. -* Fix component to raise error if its input required channel (specified from - ComponentSpec) has no artifacts in it. -* Fixed an issue where ClientOptions with regional endpoint was - incorrectly left out in Vertex AI pusher. -* CLI now hides passed flags from user python files in "--pipeline-path". This - will prevent errors when user python file tries reading and parsing flags. -* Fixed missing type information marker file 'py.typed'. -* Depends on `apache-beam[gcp]>=2.32,<3`. -* Depends on `google-cloud-bigquery>=1.28.0,<3`. -* Depends on `google-cloud-aiplatform>=0.5.0,<2`. -* Depends on `jinja2>=2.7.3,<4`, i.e. now supports Jinja 3.x. -* Depends on `keras-tuner>=1.0.4,<2`. -* Depends on `kfp>=1.6.1,!=1.7.2,<1.8.2` in \[kfp\] extra. -* Depends on `kfp-pipeline-spec>=>=0.1.10,<0.2`. -* Depends on `ml-metadata>=1.3.0,<1.4.0`. -* Depends on `struct2tensor>=0.34.0,<0.35.0`. -* Depends on `tensorflow>=1.15.2,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,<3`. -* Depends on `tensorflow-data-validation>=1.3.0,<1.4.0`. -* Depends on `tensorflow-model-analysis>=0.34.1,<0.35.0`. -* Depends on `tensorflow-serving-api>=1.15,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,<3`. -* Depends on `tensorflow-transform>=1.3.0,<1.4.0`. -* Depends on `tfx-bsl>=1.3.0,<1.4.0`. +* Fixed Vertex Pusher by passing enable_vertex flag for deploying model. ## Documentation Updates diff --git a/tfx/extensions/google_cloud_ai_platform/prediction_clients.py b/tfx/extensions/google_cloud_ai_platform/prediction_clients.py index 332d6d9e47..b2a5dd803d 100644 --- a/tfx/extensions/google_cloud_ai_platform/prediction_clients.py +++ b/tfx/extensions/google_cloud_ai_platform/prediction_clients.py @@ -427,11 +427,21 @@ def deploy_model(self, if sys.version_info[:2] != (3, 7): logging.warn('Current python version is not the same as default of 3.7.') - project_id = ai_platform_serving_args['project_id'] + if ai_platform_serving_args.get('project_id'): + assert 'project' not in ai_platform_serving_args, ('`project` and ' + '`project_id` should ' + 'not be set at the ' + 'same time in serving ' + 'args') + logging.warn('Replacing `project_id` with `project` in serving args.') + ai_platform_serving_args['project'] = ai_platform_serving_args[ + 'project_id'] + ai_platform_serving_args.pop('project_id') + project = ai_platform_serving_args['project'] # Initialize the AI Platform client # location defaults to 'us-central-1' if not specified - aiplatform.init(project=project_id, location=endpoint_region) + aiplatform.init(project=project, location=endpoint_region) endpoint_name = ai_platform_serving_args['endpoint_name'] if not skip_model_endpoint_creation: @@ -440,13 +450,13 @@ def deploy_model(self, endpoint = self._get_endpoint(ai_platform_serving_args) deploy_body = dict(ai_platform_serving_args) - for unneeded_key in ['endpoint_name', 'project_id', 'regions', 'labels']: + for unneeded_key in ['endpoint_name', 'project', 'regions', 'labels']: deploy_body.pop(unneeded_key, None) deploy_body['traffic_percentage'] = deploy_body.get( 'traffic_percentage', 100 if set_default else 0) logging.info( 'Creating model_name %s in project %s at endpoint %s, request body: %s', - model_version_name, project_id, endpoint_name, deploy_body) + model_version_name, project, endpoint_name, deploy_body) model = aiplatform.Model.upload( display_name=model_version_name, diff --git a/tfx/extensions/google_cloud_ai_platform/pusher/executor.py b/tfx/extensions/google_cloud_ai_platform/pusher/executor.py index c7235e07ef..ad2beae622 100644 --- a/tfx/extensions/google_cloud_ai_platform/pusher/executor.py +++ b/tfx/extensions/google_cloud_ai_platform/pusher/executor.py @@ -139,6 +139,7 @@ def Do(self, input_dict: Dict[str, List[types.Artifact]], endpoint_region=endpoint_region, labels=job_labels, serving_path=model_path, + enable_vertex=True, ) self._MarkPushed( diff --git a/tfx/extensions/google_cloud_ai_platform/pusher/executor_test.py b/tfx/extensions/google_cloud_ai_platform/pusher/executor_test.py index 5e582f4733..c9d58a26bf 100644 --- a/tfx/extensions/google_cloud_ai_platform/pusher/executor_test.py +++ b/tfx/extensions/google_cloud_ai_platform/pusher/executor_test.py @@ -237,7 +237,8 @@ def testDoBlessed_Vertex(self, mock_runner): ai_platform_serving_args=mock.ANY, labels=job_labels, serving_path=self._model_push.uri, - endpoint_region='us-central1' + endpoint_region='us-central1', + enable_vertex=True, ) self.assertPushed() self.assertEqual( @@ -286,7 +287,8 @@ def testDoBlessedOnRegionalEndpoint_Vertex(self, mock_runner): ai_platform_serving_args=mock.ANY, labels=job_labels, serving_container_image_uri=self._container_image_uri_vertex, - endpoint_region='us-west1' + endpoint_region='us-west1', + enable_vertex=True, ) self.assertPushed() self.assertEqual( diff --git a/tfx/version.py b/tfx/version.py index c557907dce..331404cfdc 100644 --- a/tfx/version.py +++ b/tfx/version.py @@ -14,4 +14,4 @@ """Contains the version string of TFX.""" # Note that setup.py uses this version. -__version__ = '1.3.0' +__version__ = '1.3.1'