From 49e62603464421c2e04f8ac5c0b7e71e6d1b8d8a Mon Sep 17 00:00:00 2001 From: "Michael Pilosov, PhD" Date: Sat, 27 Jan 2024 09:50:20 +0000 Subject: [PATCH] experiment loggin setup --- makefile | 2 +- newsearch.py | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/makefile b/makefile index c866ece..e35e39a 100644 --- a/makefile +++ b/makefile @@ -50,6 +50,6 @@ animate: clean: rm -rf lightning_logs - rm -f out/*.png + rm -f out/*.png out/*.txt rm -rf __pycache__/ cp hsv.png out/ diff --git a/newsearch.py b/newsearch.py index 4d2a1fd..da90993 100644 --- a/newsearch.py +++ b/newsearch.py @@ -56,7 +56,7 @@ search_params = sample(all_params, min(NUM_JOBS, len(all_params))) for idx, params in enumerate(search_params): a, lr, bs, me, s, w, opt = params - cmd = f"cd ~/colors && python main.py --alpha {a} --lr {lr} --bs {bs} --max_epochs {me} --seed {s} --width {w}" + # cmd = f"cd ~/colors && python main.py --alpha {a} --lr {lr} --bs {bs} --max_epochs {me} --seed {s} --width {w}" cmd = f""" python newmain.py fit \ --seed_everything {s} \ @@ -65,6 +65,7 @@ python newmain.py fit \ --data.val_size 100000 \ --model.alpha {a} \ --model.width {w} \ +--model.depth 1 \ --trainer.min_epochs 10 \ --trainer.max_epochs {me} \ --trainer.log_every_n_steps 3 \ @@ -82,13 +83,15 @@ python newmain.py fit \ --lr_scheduler.init_args.cooldown 10 \ --lr_scheduler.init_args.verbose true """ - test_cmd = cmd + f" --print_config > out/config_v{idx:04d}.txt" + test_cmd = f"{cmd.strip()} --print_config > out/config_v{idx:04d}.txt" + # job_name = f"color2_{bs}_{a}_{lr:2.2e}" # job_plugin.run(cmd, machine=Machine.T4, name=job_name) print(f"Running {params}: {cmd}") + cmd = f"{test_cmd.strip()} && {cmd}" try: # Run the command and wait for it to complete - subprocess.run(test_cmd, shell=True, check=True) + # subprocess.run(test_cmd, shell=True, check=True) subprocess.run(cmd, shell=True, check=True) except KeyboardInterrupt: print("Interrupted by user")