metaflow icon indicating copy to clipboard operation
metaflow copied to clipboard

Using `tags` as a Parameter name breaks flow.

Open saikonen opened this issue 1 year ago • 1 comments

original discussion here: https://outerbounds-community.slack.com/archives/C02116BBNTU/p1707942631741849

cause is due to the calls to obj.flow._set_constants(obj.graph, kwargs) in cli.py, as tags is an argument for the function, so it is not a part of the trailing kwargs that is passed to _set_constants.

List of affected (restricted) parameter names that are not covered, and are affected by the same bug:

    # Not Covered
    tags = Parameter("tags")
    decospecs = Parameter("decospecs")
    run_id_file = Parameter("run_id_file")
    maxworkers = Parameter("max_workers")
    maxnumsplits = Parameter("max_num_splits")
    maxlogsize = Parameter("max_log_size")
    user_namespace = Parameter("user_namespace")
    obj = Parameter("obj")

saikonen avatar Feb 15 '24 11:02 saikonen

There are two remedies for the issue as I see it. Either we prefix the arguments to the cli functions with _ so we can support common names for parameters such as tags.

The more straightforward way is to simply update the reserved params list, which would seem like an acceptable compromise.

saikonen avatar Feb 15 '24 11:02 saikonen