metaflow icon indicating copy to clipboard operation
metaflow copied to clipboard

Support dictionaries as decorator arguments

Open oavdeev opened this issue 4 years ago • 0 comments

(previously #744)

There seems to be several places where we convert arguments to strings, I'm not 100% sure how they are all used. Need this for K8S as some parameters there can be somewhat more complex than just strings.

Without this, if you add a new decorator with an argument that takes a dictionary or list-of-dictionaries, Metaflow will trigger the subprocess like this:

python ./helloworld1.py ...  --myarg {'key': 'key1',  'value': 'value1'} ...

After this change, the argument will be passed as JSON instead, so it can be parsed by the subprocess easily:

python ./helloworld1.py ...  --myarg {"key": "key1",  "value": "value1"} ...

oavdeev avatar Oct 15 '21 23:10 oavdeev