File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -60,16 +60,19 @@ def main(args):
6060 print (
6161 f"Totally { len (graph_hash2graph_net_model_path )} unique samples under { args .graph_net_samples_path } ."
6262 )
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 } " )
68- assert (
69- not find_redundant
70- ), f"Redundant models detected under { args .graph_net_samples_path } ."
7163
72- if args .model_path :
64+ if not args .model_path :
65+ # Check whether there are redundant samples under samples directory.
66+ for graph_hash , graph_paths in graph_hash2graph_net_model_path .items ():
67+ if len (graph_paths ) > 1 :
68+ print (f"Redundant models detected for grap_hash { graph_hash } :" )
69+ for model_path in graph_paths :
70+ print (f" { model_path } " )
71+ assert (
72+ not find_redundant
73+ ), f"Redundant models detected under { args .graph_net_samples_path } ."
74+ else :
75+ # Check whether the specified model is redundant.
7376 assert os .path .isdir (
7477 args .model_path
7578 ), f"args.model_path { args .model_path } is not a directory!"
You can’t perform that action at this time.
0 commit comments