mirror of
https://github.com/c-sooyoung/bo-ptycho.git
synced 2026-09-17 18:29:07 +09:00
fixes to results dir
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
io:
|
||||
input_data_path: '/home/swim/Si_project/data/Si2V1_1.mat'
|
||||
result_dir: '/home/swim/Si_project/wrapper/results260721'
|
||||
result_dir: '/home/swim/Si_project/wrapper/results/260721'
|
||||
verbosity: 1
|
||||
|
||||
ptycho:
|
||||
|
||||
@@ -1,15 +1,21 @@
|
||||
import os
|
||||
import sys
|
||||
import yaml
|
||||
import shutil
|
||||
import numpy as np
|
||||
|
||||
import bo
|
||||
import ptycho
|
||||
|
||||
def main(config):
|
||||
def main(config_yaml):
|
||||
|
||||
with open(config_yaml, 'r') as f:
|
||||
config = yaml.safe_load(f)
|
||||
|
||||
result_dir = config['io']['result_dir']
|
||||
os.makedirs(result_dir, exist_ok=True)
|
||||
shutil.copy(config_yaml, os.path.join(result_dir, os.path.basename(config_yaml)))
|
||||
|
||||
|
||||
randombo = bo.RandomBOEngine(config)
|
||||
|
||||
@@ -49,7 +55,5 @@ if __name__ == "__main__":
|
||||
sys.exit(1)
|
||||
|
||||
config_yaml = sys.argv[1]
|
||||
with open(config_yaml, 'r') as f:
|
||||
config = yaml.safe_load(f)
|
||||
|
||||
main(config)
|
||||
main(config_yaml)
|
||||
|
||||
Reference in New Issue
Block a user