Browse Source

search

new-sep-loss
Michael Pilosov 10 months ago
parent
commit
9845bb0d64
  1. 4
      search.py

4
search.py

@ -19,7 +19,7 @@ job_plugin = studio.installed_plugins["jobs"]
# Define the ranges or sets of values for each hyperparameter # Define the ranges or sets of values for each hyperparameter
alpha_values = list(np.round(np.linspace(0, 4, 41), 4)) alpha_values = list(np.round(np.linspace(0, 4, 41), 4))
learning_rate_values = np.log(np.linspace(-5, -3, 11)) learning_rate_values = list(np.round(np.logspace(-5, -3, 41), 5))
batch_size_values = [64, 128] batch_size_values = [64, 128]
max_epochs_values = [500] max_epochs_values = [500]
@ -39,7 +39,7 @@ search_params = sample(all_params, min(NUM_JOBS, len(all_params)))
for idx, params in enumerate(search_params): for idx, params in enumerate(search_params):
a, lr, bs, me = params a, lr, bs, me = params
cmd = f"cd ~/colors && python main.py --alpha {a} --lr {lr} --bs {bs} --max_epochs {me}" cmd = f"cd ~/colors && python main.py --alpha {a} --lr {lr} --bs {bs} --max_epochs {me}"
job_name = f"color2_{bs}_{a}_{lr:2.2e}" # job_name = f"color2_{bs}_{a}_{lr:2.2e}"
# job_plugin.run(cmd, machine=Machine.T4, name=job_name) # job_plugin.run(cmd, machine=Machine.T4, name=job_name)
print(f"Running {params}: {cmd}") print(f"Running {params}: {cmd}")
try: try:

Loading…
Cancel
Save