You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
2.2 KiB

11 months ago
lint:
black .
10 months ago
isort --profile=black *.py
flake8 --ignore E501,W503,E203 *.py
11 months ago
test:
# python main.py --alpha 1 --lr 1e-2 --max_epochs 200 --bs 256 --seed 856 --width 2048
python newmain.py fit \
--seed_everything 21 \
--data.batch_size 256 \
--data.train_size 0 \
--data.val_size 100000 \
--model.alpha 0 \
--model.width 2048 \
--trainer.fast_dev_run 1 \
--trainer.min_epochs 1 \
--trainer.max_epochs 10 \
10 months ago
--trainer.log_every_n_steps 5 \
--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 0.01 \
--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 \
10 months ago
--lr_scheduler.init_args.monitor hp_metric \
--lr_scheduler.init_args.verbose true \
--print_config
help:
# python newmain.py fit --help --trainer.callbacks.help
# python newmain.py fit --lr_scheduler.help lightning.pytorch.cli.ReduceLROnPlateau
python newmain.py fit --help
11 months ago
search: lint
python newsearch.py
10 months ago
10 months ago
hsv:
python hsv.py
# TODO: replace this with what we used in day-in-the-life
10 months ago
animate:
ffmpeg -i lightning_logs/version_258/e%04d.png \
-c:v libx264 \
-vf "fps=12,format=yuv420p,pad=ceil(iw/2)*2:ceil(ih/2)*2" \
10 months ago
~/animated.mp4
umap:
for seed in `seq 0 100`; do \
10 months ago
python scripts/sortcolor.py -s umap --dpi 300 --seed $$seed ; \
done
10 months ago
sort_umap:
python baseline.py -s umap --dpi 300 --seed 21
10 months ago
parallel_umap:
parallel -j 4 python baseline.py -s umap --dpi 300 --seed ::: $$(seq 1 100)
10 months ago
9 months ago
parallel_check:
parallel -j 3 python check.py \
--studio colors-refactor-unsupervised colors-refactor-supervised colors-refactor-unsupervised-anchors \
-v ::: $$(seq 0 99)
9 months ago
sort_lex:
python scripts/sortcolor.py -s lex --dpi 300
sort_hsv:
python scripts/sortcolor.py -s hsv --dpi 300
poster: sort_lex sort_hsv
python scripts/color_poster.py -k hsv lex --rows 119
10 months ago
clean:
10 months ago
rm -rf lightning_logs
rm -rf .lr_find_*.ckpt
rm -f out/*.png out/*.txt
10 months ago
rm -rf __pycache__/
cp hsv.png out/