https://dagster.io/ logo
#ask-community
Title
# ask-community
k

Kyle Montag

04/05/2023, 7:18 PM
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

NateV

04/05/2023, 8:35 PM
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

Kyle Montag

04/06/2023, 4:27 PM
i’d like to use the asset APIs, but if not possible then yeah that’s what i’ll do
s

sandy

04/06/2023, 5:00 PM
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

Kyle Montag

04/06/2023, 5:18 PM
thanks sandy! really appreciate the response. i’ll look to shoot a PR over for that resource_defs update sometime this week!
s

sandy

04/06/2023, 6:31 PM
awesome - thanks for filing
k

Kyle Montag

04/14/2023, 1:52 PM
@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

sandy

04/14/2023, 5:27 PM
I somehow missed this - thanks for the reminder. I just kicked off a built to run our test.
k

Kyle Montag

04/18/2023, 3:43 PM
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

sandy

04/25/2023, 6:30 PM
This will land in tomorrows release
❤️ 1
35 Views