From d87244e7ebb1d4df73410ba1b97369e32f690852 Mon Sep 17 00:00:00 2001 From: Nick Randolph Date: Mon, 12 Jun 2023 21:09:11 -0400 Subject: [PATCH 1/2] Added seed argument to base yaml --- config/inference/base.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/inference/base.yaml b/config/inference/base.yaml index 1c8cae1..f3b450b 100644 --- a/config/inference/base.yaml +++ b/config/inference/base.yaml @@ -17,7 +17,11 @@ inference: align_motif: True symmetric_self_cond: True final_step: 1 + + # If deterministic == False, seed is ignored. deterministic: False + seed: 0 + trb_save_ckpt_path: null schedule_directory_path: null model_directory_path: null From dacae25a214b78257609d61adf9a982a62735dc5 Mon Sep 17 00:00:00 2001 From: Nick Randolph Date: Mon, 12 Jun 2023 21:12:16 -0400 Subject: [PATCH 2/2] Seed argument now affects make_deterministic --- scripts/run_inference.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/run_inference.py b/scripts/run_inference.py index 2a3bf36..60795c0 100755 --- a/scripts/run_inference.py +++ b/scripts/run_inference.py @@ -39,7 +39,7 @@ def make_deterministic(seed=0): def main(conf: HydraConfig) -> None: log = logging.getLogger(__name__) if conf.inference.deterministic: - make_deterministic() + make_deterministic(conf.inference.seed) # Check for available GPU and print result of check if torch.cuda.is_available(): @@ -70,7 +70,7 @@ def main(conf: HydraConfig) -> None: for i_des in range(design_startnum, design_startnum + sampler.inf_conf.num_designs): if conf.inference.deterministic: - make_deterministic(i_des) + make_deterministic(conf.inference.seed + i_des) start_time = time.time() out_prefix = f"{sampler.inf_conf.output_prefix}_{i_des}"