Hugo Pedroso de Lima

01/19/2022, 3:16 PM
Hi all, I am in the process of upgrading our code base from the old dagster api to use jobs. I can see that the JobDefinition class takes ModeDefinition and PresetDefinition’s as inputs. It would make it a lot easier for transitioning our current pipelines with modes and presets into jobs using the JobDefinition class with graph, mode and preset inputs. My question is, will the ModeDefinition and PresetDefinition classes be deprecated in the future, or will they remain but just as internal apis (as they are not referred to in the documentation anymore)?


01/19/2022, 3:51 PM
Hi @Hugo Pedroso de Lima. We ultimately plan to deprecate ModeDefinition and PresetDefinition. Not necessarily soon, but eventually. If it makes it easier to transition incrementally, you could do something like the following:
my_job = my_graph.to_job(resource_defs=my_mode.resource_defs, config=my_preset.run_config)

Hugo Pedroso de Lima

01/19/2022, 5:01 PM
thanks Sandy, this is really helpful