Do ops allow dynamic input types? When I try to define an input as a Union of 2 types, I get "DagsterInvalidDefinitionError: Problem using type 'typing.Union[typing.List[typing.Dict], pandas.core.frame.DataFrame]' from type annotation for argument 'examples', correct the issue or explicitly set the dagster_type via In()"
The error message does not specify the issue that I'm supposed to be correcting, so I'm not sure how to proceed?
03/21/2023, 1:53 PM
hey @Eric Loreaux can you share a code sample?
03/21/2023, 3:27 PM
Hi Jamie, I redesigned the pipeline to move away from relying on a Union of types, which resolved the issue. Based on your response, I'm assuming that dagster should support unions as op arg types or return types?
03/21/2023, 4:18 PM
You might need to define a custom dagster type, but it’s hard to know if you need to do that or if there’s another syntax issue without looking at the code
03/21/2023, 5:28 PM
Got it, thanks. It does seem like the error message I encountered could be made to be slightly more informative. I will revive this thread if I encounter the issue again