Lyle Kaplan-Reinig

05/18/2023, 4:07 AM
I'm trying to build two similar Graph Assets and would like to reuse one or more of the same Op definitions in both but would like to set different Config on the Op at design time. Is this possible? I can't seem to pass a Config instance to the Op inside of the Graph Asset definition.
:dagster-bot-resolve: 1


05/18/2023, 1:52 PM
maybe an op factory might help?

Lyle Kaplan-Reinig

05/18/2023, 9:14 PM
Thanks @Zach I'll give that a shot! I've used op factories before, but the docs seem to recommend this mostly if you need to change the arguments themselves. I had interpreted that as changing the list of arguments and not the values passed to them (Config objects don't seem "passable" though, I guess -- I may end up handling this using a standard function argument with different defaults instead of by type hinting different Config objects in the factory).