From fff2b88fa1ca159fccc4b3e52dc374ebb96bcab5 Mon Sep 17 00:00:00 2001 From: "Michael Pilosov, PhD" Date: Sat, 27 Jan 2024 10:14:52 +0000 Subject: [PATCH] job updates --- newsearch.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/newsearch.py b/newsearch.py index da90993..f9ccf03 100644 --- a/newsearch.py +++ b/newsearch.py @@ -5,7 +5,7 @@ from random import sample import numpy as np # noqa: F401 from lightning_sdk import Machine, Studio # noqa: F401 -NUM_JOBS = 100 +NUM_JOBS = 500 # reference to the current studio # if you run outside of Lightning, you can pass the Studio name @@ -23,6 +23,7 @@ NUM_JOBS = 100 learning_rate_values = [1e-2] alpha_values = [0] widths = [2**k for k in range(4, 15)] +depths = [1, 2, 4, 8, 16] # learning_rate_values = [5e-4] batch_size_values = [256] max_epochs_values = [100] @@ -35,18 +36,18 @@ optimizers = [ "LBFGS", "RAdam", "RMSprop", - "SparseAdam", "Adadelta", ] # Generate all possible combinations of hyperparameters all_params = [ - (alpha, lr, bs, me, s, w, opt) + (alpha, lr, bs, me, s, w, d, opt) for alpha in alpha_values for lr in learning_rate_values for bs in batch_size_values for me in max_epochs_values for s in seeds for w in widths + for d in depths for opt in optimizers ] @@ -55,7 +56,7 @@ all_params = [ 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 + a, lr, bs, me, s, w, d, opt = params # 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 \ @@ -65,7 +66,7 @@ python newmain.py fit \ --data.val_size 100000 \ --model.alpha {a} \ --model.width {w} \ ---model.depth 1 \ +--model.depth {d} \ --trainer.min_epochs 10 \ --trainer.max_epochs {me} \ --trainer.log_every_n_steps 3 \ @@ -96,3 +97,5 @@ python newmain.py fit \ except KeyboardInterrupt: print("Interrupted by user") sys.exit(1) + # except subprocess.CalledProcessError: + # pass