mirror of
https://github.com/c-sooyoung/bo-ptycho.git
synced 2026-09-17 18:29:07 +09:00
some conveniences
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user