Codex commited on
Commit
3998bda
·
1 Parent(s): da7ff52

Fix v2ProPlus preprocess output dirs

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -434,6 +434,11 @@ def reset_preprocess_outputs(ctx: VersionContext):
434
  shutil.rmtree(directory)
435
 
436
 
 
 
 
 
 
437
  def reset_gpt_training_outputs(ctx: VersionContext):
438
  if ctx.gpt_log_dir.exists():
439
  shutil.rmtree(ctx.gpt_log_dir)
@@ -560,6 +565,7 @@ def prepare_data_steps(logs, version):
560
  yield from download_dataset_steps(logs, version)
561
  reset_preprocess_outputs(ctx)
562
  sample_count, audio_count, unlisted = build_manifest(ctx)
 
563
  yield push(
564
  logs,
565
  f"训练清单已生成:metadata 可用样本 {sample_count} 条,音频总数 {audio_count} 个,未标注音频 {len(unlisted)} 个。",
 
434
  shutil.rmtree(directory)
435
 
436
 
437
+ def ensure_preprocess_dirs(ctx: VersionContext):
438
+ for directory in [ctx.exp_dir / "3-bert", ctx.exp_dir / "4-cnhubert", ctx.exp_dir / "5-wav32k"]:
439
+ directory.mkdir(parents=True, exist_ok=True)
440
+
441
+
442
  def reset_gpt_training_outputs(ctx: VersionContext):
443
  if ctx.gpt_log_dir.exists():
444
  shutil.rmtree(ctx.gpt_log_dir)
 
565
  yield from download_dataset_steps(logs, version)
566
  reset_preprocess_outputs(ctx)
567
  sample_count, audio_count, unlisted = build_manifest(ctx)
568
+ ensure_preprocess_dirs(ctx)
569
  yield push(
570
  logs,
571
  f"训练清单已生成:metadata 可用样本 {sample_count} 条,音频总数 {audio_count} 个,未标注音频 {len(unlisted)} 个。",