From 1ddfc9d2465f48d91c4b2045f278ba27cea7cc29 Mon Sep 17 00:00:00 2001 From: Sooyoung Cheong <64125280+c-sooyoung@users.noreply.github.com> Date: Fri, 14 Aug 2026 19:26:14 +0900 Subject: [PATCH] new config schema --- TODO.md | 16 +++++++++++----- config.yaml | 49 +++++++++++++++++++++++++++---------------------- 2 files changed, 38 insertions(+), 27 deletions(-) diff --git a/TODO.md b/TODO.md index 164cbf3..c129d7b 100644 --- a/TODO.md +++ b/TODO.md @@ -1,8 +1,10 @@ # TODO: -- fold_slice: load diffractions / hdf5 files; change only param per job +- fold_slice: + - load diffractions / hdf5 files; change only param per job - restructure `FoldSlicePtychoEngine.__init__()` to load data but not params - write new `prepare_data.m` + - start fold_slice from config.yaml instead of setup.txt - unify `BOEngine.__init__()` - BO train_x/y transfer between engines for single job - multi-GPU dispatcher @@ -15,10 +17,14 @@ - separate `config` into `bo_config` and `ptycho_config`; let `BOEngine` have no knowledge of ptychography and vice versa. - add GPU version of ExamplePtychoEngine - change `PtychoEngine.metric()` to accept list of names and return dict -- custom sequence for BO - - design yaml first - +- separation of available GPUs and parallel BO batches +- prepare next batch for efficient GPU use +- rename `BOEngine` to `Sampler` +- organize results/ + - possibly: `[dataset name]/[salient config]-[date]/` # TODAY: -- `UniformBOEngine` +- `GridSampler` + - `.__init__()` should create a grid + - `.ask()` should remove those items from the grid diff --git a/config.yaml b/config.yaml index 87b540b..f4c4faa 100644 --- a/config.yaml +++ b/config.yaml @@ -1,27 +1,19 @@ -job: - type: "random+sobo" - random_iters: 8 - sobo_iters: 128 - io: input_data_path: '/home/swim/shared/Si_project/data/Si2V1_2.mat' - result_dir: '/home/swim/bo-ptycho/results/260812-Si/Si2V1_2' + result_dir: '/home/swim/bo-ptycho/results/Si2V1_2/260814-2' verbosity: 1 ptycho: engine: 'fold_slice' - path: '/home/swim/fold_slice-stable' + path: '/home/swim/fold_slice-park' params: voltage: 200 alpha_max: 30 - defocus: -200 + defocus: -250 rot_ang: 0.3 Nlayers: 20 thickness: 250 rbf: 37 - Nprobe: 1 - N_scan_x: 64 - N_scan_y: 64 tilt_x: 2 tilt_y: 0 scan_step_size: 0.36 @@ -31,32 +23,45 @@ ptycho: CBED_size: 192 ADU: 1 - extra_print_info: '' + Nprobe: 1 + N_scan_x: 64 + N_scan_y: 64 + extra_print_info: 'FIB' scan_number: 1 gpu_id: 1 roi_label: '0_Ndp64' diff_pattern_blur: 1 probe_change_start: 1 object_change_start: 1 - grouping: 512 + grouping: 64 probe_position_search: 1 regularize_layers: 0.2 - variable_probe: 'false' + variable_probe: false -bo: - batch: 4 - acquisition: 'ucb' - beta: 0.1 # for ucb only - metric: 'log_fourier' +search: + metric: log_fourier params: - alpha_max: defocus: radius: 100 - rot_ang: Nlayers: radius: 5 type: int thickness: - radius: 100 + radius: 150 train_x: train_y: + +sequence: + # - sampler: fixed + + # - sampler: grid + # points: + + - sampler: random + samples: 32 + + - sampler: sobo + iterations: 512 + batch: 4 + acquisition: 'ucb' + beta: 0.1