metaflow
metaflow copied to clipboard
Support dictionaries as decorator arguments
(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"} ...