diff --git a/makefile b/makefile index 36bb623..c866ece 100644 --- a/makefile +++ b/makefile @@ -15,6 +15,7 @@ test: --trainer.fast_dev_run 1 \ --trainer.min_epochs 1 \ --trainer.max_epochs 10 \ + --trainer.log_every_n_steps 5 \ --trainer.check_val_every_n_epoch 1 \ --trainer.callbacks callbacks.SaveImageCallback \ --trainer.callbacks.init_args.final_dir out \ @@ -25,6 +26,7 @@ test: --lr_scheduler.init_args.patience 5 \ --lr_scheduler.init_args.cooldown 10 \ --lr_scheduler.init_args.factor 0.05 \ + --lr_scheduler.init_args.monitor hp_metric \ --lr_scheduler.init_args.verbose true \ --print_config diff --git a/newsearch.py b/newsearch.py index 53269be..c21a35e 100644 --- a/newsearch.py +++ b/newsearch.py @@ -47,29 +47,30 @@ for idx, params in enumerate(search_params): a, lr, bs, me, s, w = 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 \ - --seed_everything {s} \ - --data.batch_size {bs} \ - --data.train_size 0 \ - --data.val_size 100000 \ - --model.alpha {a} \ - --model.width {w} \ - --trainer.fast_dev_run 1 \ - --trainer.min_epochs 10 \ - --trainer.max_epochs {me} \ - --trainer.check_val_every_n_epoch 1 \ - --trainer.callbacks callbacks.SaveImageCallback \ - --trainer.callbacks.init_args.final_dir out \ - --trainer.callbacks.init_args.save_interval 0 \ - --optimizer torch.optim.Adam \ - --optimizer.init_args.lr {lr} \ - --lr_scheduler lightning.pytorch.cli.ReduceLROnPlateau \ - --lr_scheduler.init_args.patience 5 \ - --lr_scheduler.init_args.cooldown 10 \ - --lr_scheduler.init_args.factor 0.05 \ - --lr_scheduler.init_args.verbose true \ - --print_config - """ +python newmain.py fit \ +--seed_everything {s} \ +--data.batch_size {bs} \ +--data.train_size 0 \ +--data.val_size 100000 \ +--model.alpha {a} \ +--model.width {w} \ +--trainer.min_epochs 10 \ +--trainer.max_epochs {me} \ +--trainer.log_every_n_steps 3 \ +--trainer.check_val_every_n_epoch 10 \ +--trainer.limit_val_batches 50 \ +--trainer.callbacks callbacks.SaveImageCallback \ +--trainer.callbacks.init_args.final_dir out \ +--trainer.callbacks.init_args.save_interval 0 \ +--optimizer torch.optim.Adam \ +--optimizer.init_args.lr {lr} \ +--lr_scheduler lightning.pytorch.cli.ReduceLROnPlateau \ +--lr_scheduler.init_args.monitor hp_metric \ +--lr_scheduler.init_args.factor 0.05 \ +--lr_scheduler.init_args.patience 5 \ +--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)