Anoop Sharma05/04/2022, 1:18 PM
decorator, it is only creating the repository for the last iteration of the loop. Not sure why that is happening. Probably have something to do with the decorated function namespace. Wondering if there is a better way to achieve this e.g. creating a repository using
or something. Following is a glimpse of what I am trying to do:
Currently, it is only showing the repository for
# pipelines = ["preprocessing","training","inference"] for pipeline in pipelines: .... # creating ops and dependencies for that pipeline dynamically here .... job = GraphDefinition(name=pipeline, node_defs=ops, dependencies=deps).to_job() @repository(name=pipeline) def my_repository(): return [job] my_repository.__name__ = pipeline
pipeline in the
ui. Is it even possible to load multiple repositories from a single python file?
Zach05/04/2022, 2:32 PM
every loop, so you only ever have one repository. I don't know exactly how to do it, but it does seem like you might need to use
to do this dynamically, as the
decorator is going to assign to an object with the name of the function it's wrapping, and function names / signatures can't be changed dynamically.
Anoop Sharma05/04/2022, 2:36 PM
of pipeline as a parameter of
decorator and also changing the
function object, the namespace and overwriting issues would be taken care of. But I guess not.