File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -396,7 +396,7 @@ def main(args):
396396
397397 failed_decomposition = []
398398 final_used_splits_map = {}
399- while need_decompose :
399+ if need_decompose :
400400 decomposed_samples_dir = os .path .join (
401401 pass_work_dir , "samples" if args .framework == "torch" else "paddle_samples"
402402 )
@@ -405,6 +405,7 @@ def main(args):
405405 for model_name , task_info in tasks_map .items ():
406406 original_path = task_info ["original_path" ]
407407 split_positions = sorted (list (task_info ["split_positions" ]))
408+
408409 final_used_splits_map [model_name ] = split_positions
409410
410411 rectied_model_path = get_rectfied_model_path (original_path )
@@ -429,14 +430,6 @@ def main(args):
429430 if failed_decomposition :
430431 print (f"[WARN] { len (failed_decomposition )} models failed to decompose." )
431432
432- if not failed_decomposition and num_decomposed_samples == len (tasks_map ):
433- need_decompose = True
434- shutil .rmtree (decomposed_samples_dir )
435- os .makedirs (decomposed_samples_dir , exist_ok = True )
436- current_max_size = max (1 , current_max_size // 2 )
437- else :
438- need_decompose = False
439-
440433 # --- Step 4: Testing ---
441434 if task_controller .task_scheduler ["run_evaluation" ]:
442435 print ("\n --- Phase 2: Batch Testing ---" )
You can’t perform that action at this time.
0 commit comments