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

Subset multi_graph_asset with checks #20115

Merged
merged 4 commits into from
Mar 1, 2024

Conversation

johannkm
Copy link
Contributor

@johannkm johannkm commented Feb 28, 2024

Closes #19915

Remove the block against subsetting @graph_multi_assets with checks, and include check outputs in the op_selection calculation. The result is that subsetting with checks behaves like subsetting with just assets- we filter the graph down to the required nodes.

Test plan: unit tests, manually testing in toys

@johannkm
Copy link
Contributor Author

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

@johannkm johannkm force-pushed the johann/02-26-Subset_multi_graph_asset_with_checks branch from f1940b6 to 8710079 Compare February 28, 2024 00:35
@johannkm johannkm force-pushed the johann/02-26-Subset_multi_graph_asset_with_checks branch from 8710079 to 5d76c63 Compare February 28, 2024 00:44
@johannkm johannkm marked this pull request as ready for review February 28, 2024 00:44
@johannkm johannkm force-pushed the johann/02-26-Subset_multi_graph_asset_with_checks branch from 5d76c63 to 368e062 Compare February 28, 2024 00:44
@johannkm
Copy link
Contributor Author

test failures are unrelated

Copy link
Contributor

@clairelin135 clairelin135 left a comment

Choose a reason for hiding this comment

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

Some comments for your consideration, but otherwise this is looking good to me

] = [] # first element in list is node that outputs asset

dep_node_outputs_by_asset_key[asset_key] = []
dep_node_outputs_by_asset_or_check_key[asset_or_check_key] = []
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like none of the callsites actually require dep_node_outputs_by_asset_or_check_key to contain check information, can we instead exclusively change dep_nodes_by_asset_or_check_key?

(I think we only need to add check information to dep_node_outputs_by_asset_or_check_key if we needed to support calling context.selected_output_names from within a check op)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Without it we hit Could not find output mapping asset_one_check1 when resolving the job

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it, ok



def test_graph_asset_subset_no_checks():
result = materialize(
Copy link
Contributor

Choose a reason for hiding this comment

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

My understanding is that it's currently not possible to execute checks alone without executing the corresponding asset, is that correct?

If not, this would be a good case to test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://github.com/dagster-io/dagster/pull/20115/files#diff-66c934e188c377f74363d3f1764d1a8de0a96001b69edd54e54821d53549ffe2R1542 prevents just checks from being launched from host processes. Ideally we'd unblock this but I think it can wait, I'll file a tracking issue

@johannkm johannkm force-pushed the johann/02-26-Subset_multi_graph_asset_with_checks branch from 368e062 to cacdb30 Compare February 29, 2024 15:33
Copy link

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-josrrqlkl-elementl.vercel.app
https://johann-02-26-Subset-multi-graph-asset-with-checks.core-storybook.dagster-docs.io

Built with commit cacdb30.
This pull request is being automatically deployed with vercel-action

Copy link

Deploy preview for dagster-docs ready!

Preview available at https://dagster-docs-efuhefpyn-elementl.vercel.app
https://johann-02-26-Subset-multi-graph-asset-with-checks.dagster.dagster-docs.io

Direct link to changed pages:

@johannkm johannkm force-pushed the johann/02-26-Subset_multi_graph_asset_with_checks branch from 8e68099 to 7045db6 Compare February 29, 2024 19:27
Copy link
Contributor

@clairelin135 clairelin135 left a comment

Choose a reason for hiding this comment

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

LGTM

@johannkm johannkm merged commit 441f8ba into master Mar 1, 2024
1 check failed
@johannkm johannkm deleted the johann/02-26-Subset_multi_graph_asset_with_checks branch March 1, 2024 14:20
johannkm added a commit that referenced this pull request Mar 1, 2024
Closes #19915

Remove the block against subsetting `@graph_multi_asset`s with checks,
and include check outputs in the `op_selection` calculation. The result
is that subsetting with checks behaves like subsetting with just assets-
we filter the graph down to the required nodes.

Test plan: unit tests, manually testing in toys
PedramNavid pushed a commit that referenced this pull request Mar 28, 2024
Closes #19915

Remove the block against subsetting `@graph_multi_asset`s with checks,
and include check outputs in the `op_selection` calculation. The result
is that subsetting with checks behaves like subsetting with just assets-
we filter the graph down to the required nodes.

Test plan: unit tests, manually testing in toys
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.

Subsetting asset checks in graph_multi_assets
2 participants