Closed
Description
Hey, I noticed that JSONType
does not convert parameters to objects on argo. Instead the params remain strings.
- With
python testflow.py run --param '["test"]'
,self.param
is of type list - With
python testflow.py argo-workflows trigger --param '["test"]'
the param is of type str
This issue might've been introduced with 2.12.23:
- 2.14.0: param is str
- 2.12.23: param is str
- 2.12.22: param is list
Test flow:
from metaflow import JSONType, Parameter, kubernetes, project, step, FlowSpec
@project(name="test")
class TestFlow(FlowSpec):
param = Parameter("param", type=JSONType)
@kubernetes()
@step
def start(self):
print(self.param)
# <class 'str'> on argo, <class 'list'> via run
print(type(self.param))
self.next(self.end)
@kubernetes()
@step
def end(self):
pass
if __name__ == "__main__":
TestFlow()
Metadata
Metadata
Assignees
Labels
No labels