File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -53,15 +53,18 @@ def main(args):
5353 if os .path .isfile (graph_hash_path ):
5454 graph_hash = open (graph_hash_path ).read ()
5555 if graph_hash not in graph_hash2graph_net_model_path .keys ():
56- graph_hash2graph_net_model_path [graph_hash ] = graph_hash_path
56+ graph_hash2graph_net_model_path [graph_hash ] = [ graph_hash_path ]
5757 else :
5858 find_redundant = True
59- print (
60- f"Redundant models detected: { graph_hash2graph_net_model_path [graph_hash ]} vs { graph_hash_path } "
61- )
59+ graph_hash2graph_net_model_path [graph_hash ].append (graph_hash_path )
6260 print (
6361 f"Totally { len (graph_hash2graph_net_model_path )} unique samples under { args .graph_net_samples_path } ."
6462 )
63+ for graph_hash , graph_paths in graph_hash2graph_net_model_path .items ():
64+ if len (graph_paths ) > 1 :
65+ print (f"Redundant models detected for grap_hash { graph_hash } :" )
66+ for model_path in graph_paths :
67+ print (f" { model_path } " )
6568 assert (
6669 not find_redundant
6770 ), f"Redundant models detected under { args .graph_net_samples_path } ."
You can’t perform that action at this time.
0 commit comments