Page MenuHomeElementl

feat: add support for dict of ins and outs
ClosedPublic

Authored by cdecarolis on Jun 18 2021, 6:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 19, 11:16 AM
Unknown Object (File)
Fri, May 19, 12:51 AM
Unknown Object (File)
Mon, May 15, 11:28 AM
Unknown Object (File)
Sun, May 14, 9:17 PM
Unknown Object (File)
Sat, May 13, 11:59 PM
Unknown Object (File)
Sat, May 13, 11:37 AM
Unknown Object (File)
Sat, May 13, 9:22 AM
Unknown Object (File)
Thu, May 11, 8:23 AM
Subscribers
None

Details

Summary

This diff adds support for supplying ins and outs as dictionary arguments

Test Plan

unit

Diff Detail

Repository
R1 dagster
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

unclear if inheritance is the way to go with In and Out once there is this behavior difference. Might be best to have a simple value object and interpret it in to the underlying def, maybe with a scheme like [1]

Getting the type inference to work on MultiOut might inform which path is preferable

python_modules/dagster/dagster/core/definitions/output.py
190–216

[1]

316

copy pasta

python_modules/dagster/dagster_tests/core_tests/definitions_tests/decorators_tests/test_op.py
45–156

would still like to see the types that the inputs & outputs have resolved with here in these tests

python_modules/dagster/dagster_tests/core_tests/definitions_tests/decorators_tests/test_op.py
45–156

input and output types are Any, unfortunately

Super messy and awful rn but here's the idea

Cleaned up implementation a bit

Do Ins/Outs need to have names if we're going with the dict approach?

Do Ins/Outs need to have names if we're going with the dict approach?

If we're going with the pure dict approach then no - but if we're not sure if we want to support dicts or lists, I think it makes sense to keep it for now.

This revision was not accepted when it landed; it landed in state Needs Review.Jun 23 2021, 4:02 PM
This revision was automatically updated to reflect the committed changes.