From e9afd8ae198e7a994e41b925e6177e200370730c Mon Sep 17 00:00:00 2001 From: "Michael Pilosov, PhD" Date: Sun, 3 Mar 2024 20:53:24 +0000 Subject: [PATCH] really prepare for jobs --- newsearch.py | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/newsearch.py b/newsearch.py index df80986..e9d0106 100644 --- a/newsearch.py +++ b/newsearch.py @@ -10,15 +10,6 @@ seed(19920921) NUM_JOBS = 5 -# reference to the current studio -# if you run outside of Lightning, you can pass the Studio name -# studio = Studio() - -# use the jobs plugin -# studio.install_plugin("jobs") -# job_plugin = studio.installed_plugins["jobs"] - -# do a sweep over learning rates # Define the ranges or sets of values for each hyperparameter # alpha_values = list(np.round(np.linspace(2, 4, 21), 4)) @@ -81,7 +72,7 @@ cd ~/colors && python newmain.py fit \ --model.bias true \ --model.loop true \ --model.transform tanh \ ---model.dropout 0 \ +--model.dropout 0.5 \ --trainer.min_epochs 10 \ --trainer.max_epochs {me} \ --trainer.log_every_n_steps 3 \ @@ -100,13 +91,16 @@ cd ~/colors && python newmain.py fit \ # --lr_scheduler.init_args.cooldown 10 \ # --lr_scheduler.init_args.verbose true """ - # job_name = f"color2_{bs}_{a}_{lr:2.2e}" - # job_plugin.run(cmd, machine=Machine.T4, name=job_name) print(f"Running {params}: {cmd}") try: + studio = Studio("colors-animate-jobs") + studio.install_plugin("jobs") + job_plugin = studio.installed_plugins["jobs"] + job_name = f"color-animate-{idx}-{s}" + job_plugin.run(cmd, machine=Machine.T4, name=job_name) + # Run the command and wait for it to complete - # subprocess.run(test_cmd, shell=True, check=True) - subprocess.run(cmd, shell=True, check=True) + # subprocess.run(cmd, shell=True, check=True) except KeyboardInterrupt: print("Interrupted by user") sys.exit(1)