DevWild commited on
Commit
46ec2c1
·
verified ·
1 Parent(s): 3d3f804

Update script.py

Browse files
Files changed (1) hide show
  1. script.py +3 -2
script.py CHANGED
@@ -71,8 +71,9 @@ def run_training(hf_dataset_path: str):
71
  dataset_dir = process_dataset(dataset_dir)
72
 
73
  # run training
74
- commands = "git clone https://github.com/ostris/ai-toolkit.git ai-toolkit && cd ai-toolkit && git submodule update --init --recursive"
75
- subprocess.run(commands, shell=True)
 
76
 
77
  commands = f"python run.py {os.path.join(dataset_dir, 'config.yaml')}"
78
  process = subprocess.Popen(commands, shell=True, cwd="ai-toolkit", env=os.environ)
 
71
  dataset_dir = process_dataset(dataset_dir)
72
 
73
  # run training
74
+ if not os.path.exists("ai-toolkit"):
75
+ commands = "git clone https://github.com/ostris/ai-toolkit.git ai-toolkit && cd ai-toolkit && git submodule update --init --recursive"
76
+ subprocess.run(commands, shell=True)
77
 
78
  commands = f"python run.py {os.path.join(dataset_dir, 'config.yaml')}"
79
  process = subprocess.Popen(commands, shell=True, cwd="ai-toolkit", env=os.environ)