File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 11import os
22import torch
33import json
4+ import sys
45from graph_net .torch .decompose_util import convert_to_submodules_graph
56from graph_net .torch .extractor import GraphExtractor as BuiltinGraphExtractor
67import graph_net .imp_util as imp_util
@@ -193,6 +194,12 @@ def _make_config(
193194 def __call__ (self , rel_model_path ):
194195 model_path = os .path .join (self .config ["model_path_prefix" ], rel_model_path )
195196 split_results = load_json (self .config ["split_results_path" ])
197+ if (
198+ split_results [rel_model_path ]["split_positions" ] is None
199+ or len (split_results [rel_model_path ]["split_positions" ]) == 0
200+ ):
201+ sys .stderr .write (f"Error: { rel_model_path } has no split positions.\n " )
202+ os ._exit (1 )
196203 split_positions = split_results [rel_model_path ]["split_positions" ]
197204 config = {
198205 "split_positions" : split_positions ,
You can’t perform that action at this time.
0 commit comments