Eli Bixby
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?Ketan (kumare3)
Eli Bixby
02/08/2023, 2:59 PMKetan (kumare3)
Niels Bantilan
02/08/2023, 3:18 PMSlackbot
02/08/2023, 3:18 PMEli Bixby
02/08/2023, 3:34 PMKetan (kumare3)
Eli Bixby
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']
enum.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.Niels Bantilan
02/08/2023, 5:50 PM