This is a huge oversight in our API. Support for passing dictionaries in betweens solids. Also need to do sets.
- Group Reviewers
Would it be possible to rename the existing config field Dict to something else, so that we can name this Dict instead of PythonDict? I could see users expecting the following to work:
from dagster import Dict OutputDefinition(Dict)
since the following work:
from dagster import Int, Bool, String, Float OutputDefinition(Int) OutputDefinition(Bool) OutputDefinition(String) OutputDefinition(Float)
and because Int, Bool, String, and Float aren't called PythonInt, etc.
Yeah I agree that is where this should end up, but it will be tricksy. (See the issue https://github.com/dagster-io/dagster/issues/1710 where this awkwardness is noted) Notably the semantics of Dict are going to be different in the config and runtime cases. In addition Dict in the config context takes required fields at this point.
Right now the signature of Dict is:
And is only valid in the config system.
So we would probably, initially, want to support:
Then we can figure out what to do in the runtime case later.