Hi all! I was wondering what the correct way is to...
# ask-community
s
Hi all! I was wondering what the correct way is to provide config to graph backed assets where the config options of the Ops are defined using the new/experimental Pythonic configuration? The examples only show creating a Run from the code https://docs.dagster.io/guides/dagster/pythonic-config#specifying-runtime-configuration-in-code whereas for this we want to create a graph backed asset with the relevant config baked into it. Is there something out of the box that works for this? Currently we're converting the instantiated Config objects to a dict, creating a ConfigMapping out of that and passing that to
GraphDefinition
but it seems like it should be possible to directly use the instantiated Config objects.
Does anyone have any suggestions/pointers for this? Or is the only way to do provide config values for Ops in a graph backed asset to use a dict?
j
cc @ben
❤️ 1
s
Not sure if maybe the question it too vague? Maybe a more implementation specific question would be how to convert an instance of a
Config
(or
BaseModel
) subclass to a
ConfigMapping
so that we can pass it as the
config
argument to the
GraphDefinition
constructor (https://docs.dagster.io/_apidocs/graphs#dagster.GraphDefinition) or if it would be possible for the `GraphDefinition`'s
config
argument to take a dict of
Config
objects?