melodic-magician-71351
02/08/2023, 12:44 PM@dataclass_json
@dataclass
class MyStruct
foo: str
bar: str = 'baz'
def workflow(s: MyStruct):
pass
qux = LaunchPlan(workflow, default_inputs=dict(s=MyStruct(foo='baz', bar='qux')))
If i go to launch workflow
with the qux
launch plan it instead takes the default values from the struct definition. So foo
will be unset and bar
will be set by default as baz
Not sure where the error is here, though. Has anyone else seen this?freezing-airport-6809
melodic-magician-71351
02/08/2023, 2:59 PMfreezing-airport-6809
freezing-airport-6809
freezing-airport-6809
broad-monitor-993
02/08/2023, 3:18 PMuser
02/08/2023, 3:18 PMmelodic-magician-71351
02/08/2023, 3:34 PMmelodic-magician-71351
02/08/2023, 3:36 PMfreezing-airport-6809
freezing-airport-6809
freezing-airport-6809
melodic-magician-71351
02/08/2023, 3:41 PMclass MyEnum(enum.Enum):
ONE = 'one'
TWO = 'two'
class MyStruct:
option: MyEnum
It will nicely generate a dropdown bar in the UI when I go to launch.
But then if I actually run the workflow that recieves MyStruct I'll get:
ONE is not a valid MyEnum, please select one of ['one', 'two']
melodic-magician-71351
02/08/2023, 3:42 PMenum.name
rather than enum.value
forward to the task. This may be a dataclasses_json bug though? I haven't tried this not in the UI, though it works just fine locally.melodic-magician-71351
02/08/2023, 3:46 PMmelodic-magician-71351
02/08/2023, 3:52 PMbroad-monitor-993
02/08/2023, 5:50 PM