how do i use an IO manager with a graph backed ass...
# ask-community
k
how do i use an IO manager with a graph backed asset? i don’t see anything in the source code or in the docs…
should the graph backed asset not be reliant on an IO manager? what about inter-op io management?
@daniel looks like a bug: https://github.com/dagster-io/dagster/blob/e425f14f7177fe0147bd626bf245819bdf2fc1a[…]dagster/dagster/_core/definitions/decorators/asset_decorator.py
resource_defs
isn’t being forwarded anywhere which means you can’t define your own resources for a graph backed asset.
maybe there is a reason why
resource_defs
isn’t included as part of this decorator that i’m not aware of?
https://docs.dagster.io/_apidocs/assets#dagster.AssetsDefinition.from_graph
AssetsDefinition.from_graph
supports the
resource_defs
argument so i’d imagine its just an oversight
i’d expect something like this:
Copy code
@graph_asset(group_name="MyGroup", resource_defs={"io_manager": my_io_manager})
to work
n
would you turn a graph into a job, and apply the io manager to the job? That's what i'm doing at the moment
(or create a job from the graph, I guess)
k
i’d like to use the asset APIs, but if not possible then yeah that’s what i’ll do
s
it looks like
@graph_asset
doesn't currently have a
resource_defs
argument. if you file a github issue for this, we can try to get to adding one. we'd also be happy to review a PR if you're interested in contributing.
👍 1
how do i use an IO manager with a graph backed asset? i don’t see anything in the source code or in the docs…
the main way to do this is to set an io_manager_key on the op inside the graph here's an issue where we're tracking making it possible to set an io_manager_key when defining the graph asset: https://github.com/dagster-io/dagster/issues/9357
k
thanks sandy! really appreciate the response. i’ll look to shoot a PR over for that resource_defs update sometime this week!
s
awesome - thanks for filing
k
@sandy bumping this thread, any updates here? happy to do any extra leg work necessary as this update is blocking a release for my team at work
s
I somehow missed this - thanks for the reminder. I just kicked off a built to run our test.
k
just pushed
make black
🙂
hmm i see buildkite is still failing - is there anything else i need to do?
@sandy any idea when this update will get released? i don’t see my merge commit as part of the
1.3.1
release tag
s
This will land in tomorrows release
❤️ 1