From 61d0c81acd7f45220226f52e0e796f548388d3ad Mon Sep 17 00:00:00 2001 From: mm Date: Sun, 31 Dec 2023 07:02:13 +0000 Subject: [PATCH] local search --- search.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/search.py b/search.py index a9e5f26..bd956f4 100644 --- a/search.py +++ b/search.py @@ -15,10 +15,10 @@ job_plugin = studio.installed_plugins["jobs"] # do a sweep over learning rates # Define the ranges or sets of values for each hyperparameter -alpha_values = [0.1, 0.3, 0.5, 0.7, 0.9] -learning_rate_values = [1e-6, 1e-5, 1e-4, 1e-3, 1e-2] -batch_size_values = [32, 64, 128] -max_epochs_values = [1000] +alpha_values = [0.1, 0.25, 0.5, 0.7, 0.9] +learning_rate_values = [1e-3, 1e-4, 1e-5] +batch_size_values = [128] +max_epochs_values = [5000] # Generate all possible combinations of hyperparameters all_params = [ @@ -36,5 +36,7 @@ search_params = sample(all_params, NUM_JOBS) for idx, params in enumerate(search_params): a, lr, bs, me = params cmd = f"cd ~/colors && python main.py --alpha {a} --lr {lr} --bs {bs} --max_epochs {me}" - job_name = f"color_{bs}_{a}_{lr:2.2e}" - job_plugin.run(cmd, machine=Machine.T4, name=job_name) + job_name = f"color2_{bs}_{a}_{lr:2.2e}" + # job_plugin.run(cmd, machine=Machine.T4, name=job_name) + print(f"Running {params}: {cmd}") + os.system(cmd)