Jack Zeitoun
03/08/2023, 8:21 PMchris
03/08/2023, 10:17 PMJack Zeitoun
03/08/2023, 10:50 PMchris
03/09/2023, 12:10 AMdefs = Definitions(jobs=...)
available_ops = set()
for job in defs.get_all_job_defs():
available_ops.extend(node_def.name for node_def in job.graph.node_defs)
Jack Zeitoun
03/09/2023, 12:13 AMop.to_dict()
or something similar. Does anything like that exist?chris
03/09/2023, 12:17 AMget_op_metadata
which, given an OpDefinition
, outputs the dictionary of information you seek (can help you retrieve whatever that information might be hopefully)
• Have a module where you export all ops to. A la in some __init__.py
file:
from somewhere import some_op
from somewhere_else import other_op
then you can iterate over everything exported from that module, if it’s an OpDefinition
, run get_op_metadata
Jack Zeitoun
03/09/2023, 12:19 AMJack Zeitoun
03/09/2023, 12:19 AMget_op_metadat
does not exist yet does it?chris
03/09/2023, 12:20 AMJack Zeitoun
03/09/2023, 12:20 AMchris
03/09/2023, 12:23 AMsolid
rather than op
for backcompat purposes, but you could imagine building something similar with just dictionariesJack Zeitoun
03/09/2023, 12:23 AM