Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[io-managers-deps] Properly handle deps mapping in multi_asset decorator #26466

Open
wants to merge 1 commit into
base: dpeng817/allow_deps_and_ins_to_coexist
Choose a base branch
from

Conversation

dpeng817
Copy link
Contributor

@dpeng817 dpeng817 commented Dec 13, 2024

Summary & Motivation

Properly handle deps in the multi_asset decorator. Previously, the behavior when various combinations of multi_asset deps-related args were smashed together was not really under test.

Now that build_and_validate_named_ins can handle overlaps in deps and ins, we can simplify the logic in this part of the decorator significantly. Still leaving a hefty comment about why we disallow unmapped inputs _outside_of build_and_validate_named_ins.

How I Tested These Changes

I added a bunch of new test cases for all the possible interactions.

Copy link
Contributor Author

dpeng817 commented Dec 13, 2024

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@dpeng817 dpeng817 marked this pull request as ready for review December 13, 2024 00:51
@dpeng817 dpeng817 changed the title Properly handle deps mapping in multi_asset decorator [io-managers-deps] Properly handle deps mapping in multi_asset decorator Dec 13, 2024
@dpeng817 dpeng817 force-pushed the dpeng817/allow_deps_and_ins_to_coexist branch from b87b89d to bc2d254 Compare December 13, 2024 16:18
@dpeng817 dpeng817 force-pushed the dpeng817/properly_handle_deps_mapping_multi_asset branch from 2c70e99 to a528136 Compare December 13, 2024 16:19
for key in asset_in_keys - set(upstream_deps.keys())
]
raise DagsterInvalidDefinitionError(
f"Asset inputs {input_names_not_in_deps} specified as asset inputs, but are not specified as dependencies on any constituent asset specs."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as https://github.com/dagster-io/dagster/pull/26465/files#r1884541448 - i think hitting this exception could be pretty confusing (especially for a new user dealing w these concepts for the first time). Giving the specific class names would be a big improvement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants