You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Received a type error that str object (version) does not support assignment
Traceback (most recent call last):
File "/usr/local/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/local/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/ml/kfp_component/launcher/__main__.py", line 34, in <module>
main()
File "/ml/kfp_component/launcher/__main__.py", line 31, in main
launch(args.file_or_module, args.args)
File "kfp_component/launcher/launcher.py", line 45, in launch
return fire.Fire(module, command=args, name=module.__name__)
File "/usr/local/lib/python2.7/site-packages/fire/core.py", line 127, in Fire
component_trace = _Fire(component, args, context, name)
File "/usr/local/lib/python2.7/site-packages/fire/core.py", line 366, in _Fire
component, remaining_args)
File "/usr/local/lib/python2.7/site-packages/fire/core.py", line 542, in _CallCallable
result = fn(*varargs, **kwargs)
File "kfp_component/google/ml_engine/_deploy.py", line 68, in deploy
wait_interval)
File "kfp_component/google/ml_engine/_create_version.py", line 55, in create_version
version['deploymentUri'] = deployemnt_uri
TypeError: 'str' object does not support item assignment
What steps did you take:
I tried to specify the
version
param to the gcp ml_engine deploy component via:What happened:
Received a type error that str object (version) does not support assignment
What did you expect to happen:
I expected to be able to pass additional version parameters as a dictionary as described in https://cloud.google.com/ml-engine/reference/rest/v1/projects.models.versions and https://github.com/kubeflow/pipelines/blob/master/components/gcp/ml_engine/deploy/component.yaml#L64:L69
However, this type is being declared as a str when it should be a dict: https://github.com/kubeflow/pipelines/blob/master/components/gcp/container/component_sdk/python/kfp_component/google/ml_engine/_create_version.py#L47
This is ultimately based on the assumption that fire is using the docstring to do type hinting.
Environment:
How did you deploy Kubeflow Pipelines (KFP)?
Deployed via AI-Platform Pipelines
KFP version:
KFP SDK version:
/kind bug
/area sdk
The text was updated successfully, but these errors were encountered: