Vinnie12/14/2022, 9:15 AM
return type from an
that doesn’t cause Dagster to raise a
? I have an
that should return one of two custom types depending on some of the config passed, but specifying it in the return type signature or
raises this error. The workaround I found was to define another output type (below) but it feels unnecessary for this type of use case.
type1_or_type2 = DagsterType( name="type1_or_type2", type_check_fn=lambda _, x: isinstance(x, type1) or isinstance(x, type2), )