Simon
02/23/2023, 10:21 PMclaire
02/24/2023, 12:22 AMSimon
02/24/2023, 4:15 PMclaire
02/24/2023, 8:28 PMdep_node_handles_by_asset_key = context.job_def.asset_layer._dependency_node_handles_by_asset_key
dep_asset_keys = {k for k, v in dep_node_handles_by_asset_key.items() if context.op_handle in v}
_dependency_node_handles_by_asset_key
maps all input asset keys to the ops within the graph that rely on it (not just direct downstream dependencies, but all dependencies within the graph).
Then you can filter out which input asset keys the current node relies on by checking if the current op is in the downstream deps for a given asset key.Simon
02/24/2023, 9:11 PM