Hi! I have an asset, constructed with `AssetsDefin...
# ask-community
d
Hi! I have an asset, constructed with
AssetsDefinition.from_graph()
. One of Op inside the graph using custome IO manager. I want to add some tags to all this setup and only graph and Op posses this functionality. The question is - Is there any option how to get graph's tags inside IOManagers
handle_output
method?
🤖 1
j
Hey @Dmytro Lukash I think you should be able to get the tags via
context.op_def.tags
as long as the tags are added as part of the op definition ie
Copy code
@op(
   tags={"foo": "bar"}
)
def my_op():
   ...
d
Well yeah. I am able to get op's tags. But my goal is to get tags from graph
Copy code
@op(
    tags={"op_tag":"op_tag_value"}
)
def op:
    ...
    
@graph(
    tags={"graph_tag":"graph_tag_value"}
)
def graph:
    ...
j
ah i see. I poked around the context a bit and i dont think this is currently possible. the context in the handle_output method is scoped for the output of the op, so info about the surrounding graph isn’t available
d
Ok! Thank for clarification! I'm really appreciate.