So I need myresource in every op. How do I do this without having to specify it in every op, but in the job definition instead? I think this is possible, but I cannot find a specification in the documentation for exactly what the job config looks like. Thanks!
@op()
def op1(context):
# This throws an error
res = context.resources.myresource
return
@op()
def op2(context):
res = context.resources.myresource
return
@op()
def op3(context):
res = context.resources.myresource
return
@op()
def op4(context):
res = context.resources.myresource
return
@job(
resource_defs = {"myresource" : myresource.configured({"arg" : "whatever"})}
)
def myjob():
op1()
op2()
op3()
op4()