It'd be great if we had support for enum parameters.
Here is how we would define a Parameter today:
action = Parameter(
"action",
help="The action you want to perform. Supported values are 'traffic' and 'labeling'.",
default="traffic"
)
Notice how we need to rely on documentation to let the user know which values are supported. We also need to validate as part of the flow that the supplied value is supported.
Instead, it would be great to do something like this:
action = Parameter(
"action",
help="The action you want to perform.",
type="enum",
values=["traffic", "labeling"],
default="traffic"
)
Metaflow could automatically validate the value of the parameter and we won't have to do that as part of the flow.
It'd be great if we had support for enum parameters.
Here is how we would define a Parameter today:
Notice how we need to rely on documentation to let the user know which values are supported. We also need to validate as part of the flow that the supplied value is supported.
Instead, it would be great to do something like this:
Metaflow could automatically validate the value of the parameter and we won't have to do that as part of the flow.