You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Dagster's internal typing does not support generics.
At least, it's not possible to automatically resolve DagsterType objects from type hints with generics.
I am working on integrating pandera validation library with dagster-polars. Pandera provides generic type annotations for DataFrames, but Dagster can't accept them without manually constructed DagsterType objects, which makes our life harder.
Currently, this core produces the following error:
E dagster._core.errors.DagsterInvalidDefinitionError: Problem using type 'pandera.typing.polars.LazyFrame[dagster_polars_tests.test_upath_io_managers.MySchema]' from type annotation for argument 'upstream', correct the issue or explicitly set the dagster_type via In().
Ideas of implementation
Apart from simple changes to automatic DagsterType creation, we need to figure out if generics should be a first-class citizen (e.g. be aware of the generic type parameter, represent it in the UI, etc) or rather rely on some work-around and build on top of one of existing types (like Any). I'm not sure how exactly this can be done.
Additional information
No response
Message from the maintainers
Impacted by this issue? Give it a 👍! We factor engagement into prioritization.
The text was updated successfully, but these errors were encountered:
What's the use case?
Currently, Dagster's internal typing does not support generics.
At least, it's not possible to automatically resolve
DagsterType
objects from type hints with generics.I am working on integrating pandera validation library with
dagster-polars
. Pandera provides generic type annotations for DataFrames, but Dagster can't accept them without manually constructedDagsterType
objects, which makes our life harder.Example of what I want to be able to write:
Currently, this core produces the following error:
Ideas of implementation
Apart from simple changes to automatic
DagsterType
creation, we need to figure out if generics should be a first-class citizen (e.g. be aware of the generic type parameter, represent it in the UI, etc) or rather rely on some work-around and build on top of one of existing types (like Any). I'm not sure how exactly this can be done.Additional information
No response
Message from the maintainers
Impacted by this issue? Give it a 👍! We factor engagement into prioritization.
The text was updated successfully, but these errors were encountered: