Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSONType parameter not converted to object on argo (Metaflow >=2.12.23) #2273

Open
chrschorn opened this issue Feb 14, 2025 · 0 comments
Open
Assignees

Comments

@chrschorn
Copy link

chrschorn commented Feb 14, 2025

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()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants