some conveniences

This commit is contained in:
2026-08-14 19:29:34 +09:00
parent 785760d23d
commit 79be9e3ed3
2 changed files with 12 additions and 4 deletions
+7
View File
@@ -1,6 +1,7 @@
import os
import sys
import yaml
import shutil
import pipelines
@@ -8,6 +9,12 @@ def main(config_yaml):
with open(config_yaml, 'r') as f:
config = yaml.safe_load(f)
result_dir = config["io"]["result_dir"]
if os.path.exists(result_dir):
shutil.rmtree(result_dir)
os.makedirs(result_dir, exist_ok=True)
shutil.copy(config_yaml, os.path.join(result_dir, os.path.basename(config_yaml)))
pipelines.job_types[config['job']['type']](config)