From 88511711bc7cecaf22cd1277be9a2ebeaf32584e Mon Sep 17 00:00:00 2001 From: Justin Hines Date: Wed, 5 Aug 2020 09:34:29 -0400 Subject: [PATCH] fix(sdk/component): ml_engine deploy version is incorrect type. Fixes #4291 (#4292) --- .../python/kfp_component/google/ml_engine/_create_version.py | 4 ++-- components/gcp/ml_engine/deploy/README.md | 2 +- components/gcp/ml_engine/deploy/sample.ipynb | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/gcp/container/component_sdk/python/kfp_component/google/ml_engine/_create_version.py b/components/gcp/container/component_sdk/python/kfp_component/google/ml_engine/_create_version.py index 700385fd7e60..b9e66735b63e 100644 --- a/components/gcp/container/component_sdk/python/kfp_component/google/ml_engine/_create_version.py +++ b/components/gcp/container/component_sdk/python/kfp_component/google/ml_engine/_create_version.py @@ -47,7 +47,7 @@ def create_version(model_name, deployemnt_uri=None, version_id=None, If not set, the default version is '2.7'. Python '3.5' is available when runtimeVersion is set to '1.4' and above. Python '2.7' works with all supported runtime versions. - version (str): optional, the payload of the new version. + version (dict): optional, the payload of the new version. replace_existing (boolean): boolean flag indicates whether to replace existing version in case of conflict. wait_interval (int): the interval to wait for a long running operation. @@ -210,4 +210,4 @@ def _is_dup_version(self, existing_version): ['description', 'deploymentUri', 'runtimeVersion', 'machineType', 'labels', 'framework', 'pythonVersion', 'autoScaling', - 'manualScaling']) \ No newline at end of file + 'manualScaling']) diff --git a/components/gcp/ml_engine/deploy/README.md b/components/gcp/ml_engine/deploy/README.md index b8b72c554204..b9cdeff8c140 100644 --- a/components/gcp/ml_engine/deploy/README.md +++ b/components/gcp/ml_engine/deploy/README.md @@ -142,7 +142,7 @@ def pipeline( version_id = '', runtime_version = '1.10', python_version = '', - version = '', + version = {}, replace_existing_version = 'False', set_default = 'True', wait_interval = '30'): diff --git a/components/gcp/ml_engine/deploy/sample.ipynb b/components/gcp/ml_engine/deploy/sample.ipynb index c1532b416214..20a89f96a32d 100644 --- a/components/gcp/ml_engine/deploy/sample.ipynb +++ b/components/gcp/ml_engine/deploy/sample.ipynb @@ -181,7 +181,7 @@ " version_id = '',\n", " runtime_version = '1.10',\n", " python_version = '',\n", - " version = '',\n", + " version = {},\n", " replace_existing_version = 'False',\n", " set_default = 'True',\n", " wait_interval = '30'):\n", @@ -280,4 +280,4 @@ }, "nbformat": 4, "nbformat_minor": 2 -} \ No newline at end of file +}