Can the class dgl.DGLGraph also support a name for each graph?
My code looks something like this. For my implementation it would be convenient if I could have a name for each graph. Is there a way to store the graph name on the dgl.DGLGraph object itself? I guess the best shot is to have a parallel list sharing the same index as the list graphs.
def __init__( self, mode='train' ):
self.graphPaths = []
self.graphs = []
for designPath in Path( Path.cwd() ).iterdir():
if designPath.is_dir():
self.graphPaths.append( designPath )
self.mode = mode
super().__init__(name='mydata_from_yosys_'+mode)
def process( self ):
for path in self.graphPaths:
graph = self._process_single( path )
self.graphs.append( graph )