@@ -296,16 +296,16 @@ def formatv(v):
296296 and not args .overwrite_output_dir
297297 ):
298298 last_checkpoint = get_last_checkpoint (args .output_dir )
299- if last_checkpoint is None and len (os .listdir (args .output_dir )) > 0 :
300- raise ValueError (
301- f"Output directory ({ args .output_dir } ) already exists and is not empty. "
302- "Use --overwrite_output_dir to overcome."
303- )
304- elif last_checkpoint is not None and args .resume_from_checkpoint is None :
305- logger .info (
306- f"Checkpoint detected, resuming training at { last_checkpoint } . To avoid this behavior, change "
307- "the `--output_dir` or add `--overwrite_output_dir` to train from scratch."
308- )
299+ # if last_checkpoint is None and len(os.listdir(args.output_dir)) > 0:
300+ # raise ValueError(
301+ # f"Output directory ({args.output_dir}) already exists and is not empty. "
302+ # "Use --overwrite_output_dir to overcome."
303+ # )
304+ # elif last_checkpoint is not None and args.resume_from_checkpoint is None:
305+ # logger.info(
306+ # f"Checkpoint detected, resuming training at {last_checkpoint}. To avoid this behavior, change "
307+ # "the `--output_dir` or add `--overwrite_output_dir` to train from scratch."
308+ # )
309309
310310 def compute_metrics (p ):
311311 preds = p .predictions [0 ] if isinstance (p .predictions , tuple ) else p .predictions
@@ -439,6 +439,7 @@ def sname_to_tname(pp_model):
439439 cfg .token_balance_seqlen = args .max_seq_length * args .per_device_train_batch_size
440440 cfg .fp16_opt_level = args .fp16_opt_level
441441 cfg .moe_group = args .moe_group
442+ cfg .moe_group_name = args .moe_group
442443 cfg .dtype = dtype
443444 cfg .use_fp8 = args .use_fp8
444445 cfg .enable_mtp_magic_send = args .enable_mtp_magic_send
@@ -502,7 +503,7 @@ def sname_to_tname(pp_model):
502503 logger .info (f"using model type:{ type (model )} " )
503504 paddle .set_default_dtype ("float32" )
504505
505- logger .info (f"using model={ type (model )} , cfg={ cfg } " )
506+ # logger.info(f"using model={type(model)}, cfg={cfg}")
506507
507508 train_dataset , eval_dataset , test_dataset , data_collator = (
508509 create_pretrained_dataset (args )
0 commit comments