Hi, does anyone know if its possible to use non_ar...
# ask-community
t
Hi, does anyone know if its possible to use non_argument_deps with @graph_asset too? Or at least to achieve the same behavior?
t
Looks to be impossible right now. The
@graph_asset
lacks the argument and the implementation is:
Copy code
def __call__(self, fn: Callable) -> AssetsDefinition:
        asset_name = self.name or fn.__name__
        asset_ins = build_asset_ins(fn, self.ins or {}, set())
        out_asset_key = AssetKey(list(filter(None, [*(self.key_prefix or []), asset_name])))
where _Asset passes `non_argument_deps`to
build_asset_ins
,
_GraphBackedAsset
does not.
t
Would it be sufficient to pass it along to
build_asset_ins
in
_GraphBackendAsset
?
s
t
We are using the inner op within different graphs and different input deps. The workaround would clutter the parameter list as we would need to consume all input deps somehow. I've played around with
@graph
and
AssetsDefintion.from_graph
to set
keys_by_input_name
manually. So far, without success.
s
ultimately, dagster represents the dependencies within a run as a graph of ops - so to have op A execute after op B, the dependency between them needs to be piped through any graphs that contain those ops