Page MenuHomeElementl

[op] Get rid of MultiOut, get rid of name on Out, change to accepting bare dict, clean up tuple typing implementation.
ClosedPublic

Authored by cdecarolis on Jun 30 2021, 6:18 PM.
Tags
None
Referenced Files
F2292391: D8623.diff
Fri, Jul 1, 10:14 AM
F2291099: D8623.id40571.diff
Thu, Jun 30, 11:59 PM
Unknown Object (File)
Thu, Jun 30, 2:19 AM
Unknown Object (File)
Thu, Jun 30, 1:44 AM
Unknown Object (File)
Tue, Jun 28, 11:38 PM
Unknown Object (File)
Tue, Jun 28, 10:14 PM
Unknown Object (File)
Mon, Jun 27, 8:29 PM
Unknown Object (File)
Mon, Jun 27, 2:08 PM
Subscribers
None

Diff Detail

Repository
R1 dagster
Branch
op_replace_multiout
Lint
Lint Passed
Unit
No Test Coverage

Event Timeline

assuming this is on trajectory for realness instead of just quick prototype - I think we need a battery of test on the multi out stuff

  • tuple size mismatched with out dict (in both directions)
  • wrong type hint (not tuple) on multi out
  • more crazy stuff you can think of
python_modules/dagster/dagster/core/definitions/decorators/op.py
106

maybe worth taking a first pass on this doc block to start iterating on how we are going to communicate the behavior we are building here

python_modules/dagster/dagster_tests/core_tests/definitions_tests/decorators_tests/test_op.py
148–150

add a test for

@op(out={"a": Out(), "b": Out()})
def my_op() -> Tuple[int, str]:
    return 1, "q"

I assume thats the minimal way to change it from single output of type tuple to mult-out if inner tuple params

This revision now requires changes to proceed.Jun 30 2021, 8:14 PM

Add test battery for multiout stuff

Use get_origin to resolve type

im cool with this - last pass from @sandyryza for api sign off

python_modules/dagster/dagster/core/definitions/decorators/op.py
106

bump: documenting here or in follow up

python_modules/dagster/dagster/core/definitions/output.py
293–299

nit: typing.NamedTuple

This revision is now accepted and ready to land.Jul 6 2021, 8:26 PM

typing.NamedTuple / Ensure I didn't break anything