Browse Source

save config to out

new-sep-loss
Michael Pilosov, PhD 10 months ago
parent
commit
6d40d39097
  1. 5
      newsearch.py

5
newsearch.py

@ -40,7 +40,7 @@ optimizers = [
] ]
# Generate all possible combinations of hyperparameters # Generate all possible combinations of hyperparameters
all_params = [ all_params = [
(alpha, lr, bs, me, s, w) (alpha, lr, bs, me, s, w, opt)
for alpha in alpha_values for alpha in alpha_values
for lr in learning_rate_values for lr in learning_rate_values
for bs in batch_size_values for bs in batch_size_values
@ -82,12 +82,13 @@ python newmain.py fit \
--lr_scheduler.init_args.cooldown 10 \ --lr_scheduler.init_args.cooldown 10 \
--lr_scheduler.init_args.verbose true --lr_scheduler.init_args.verbose true
""" """
test_cmd = cmd + f" --print_config > out/config_v{idx:04d}.txt"
# 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:
# Run the command and wait for it to complete # 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: except KeyboardInterrupt:
print("Interrupted by user") print("Interrupted by user")

Loading…
Cancel
Save