Dev (#98)
* remove conda_env_cpu * remove setup.py * optimize tab completion by nesting imports * add .env * fix rich printing bug * general improvements * update readme
This commit is contained in:
1 parent
5f1c85e9bf
commit
d571a4e2c2
22 files changed
+253
-221
No files matched your search
+5
-5
@@ -17,29 +17,29 @@ export PYTHONWARNINGS="ignore"
|
||||
|
||||
echo "TEST 1"
|
||||
echo "Train on GPU (2 epochs)"
|
||||
python train.py trainer.gpus=-1 trainer.max_epochs=2 \
|
||||
python run.py trainer.gpus=-1 trainer.max_epochs=2 \
|
||||
print_config=false
|
||||
|
||||
echo "TEST 2"
|
||||
echo "Train with 4 workers and cuda pinned memory (2 epochs)"
|
||||
python train.py trainer.gpus=-1 trainer.max_epochs=2 \
|
||||
python run.py trainer.gpus=-1 trainer.max_epochs=2 \
|
||||
datamodule.num_workers=4 datamodule.pin_memory=True \
|
||||
print_config=false
|
||||
|
||||
echo "TEST 3"
|
||||
echo "Train with 16-bit precision (1 epoch)"
|
||||
python train.py trainer.gpus=-1 trainer.max_epochs=2 \
|
||||
python run.py trainer.gpus=-1 trainer.max_epochs=2 \
|
||||
+trainer.precision=16 \
|
||||
print_config=false
|
||||
|
||||
echo "TEST 4"
|
||||
echo "Train with mixed precision (apex, amp level 01, 2 epochs)"
|
||||
python train.py trainer.gpus=-1 trainer.max_epochs=2 \
|
||||
python run.py trainer.gpus=-1 trainer.max_epochs=2 \
|
||||
+trainer.amp_backend="apex" +trainer.amp_level="O1" +trainer.precision=16 \
|
||||
print_config=false
|
||||
|
||||
echo "TEST 5"
|
||||
echo "Train with mixed precision (apex, amp level 02, 2 epochs)"
|
||||
python train.py trainer.gpus=-1 trainer.max_epochs=2 \
|
||||
python run.py trainer.gpus=-1 trainer.max_epochs=2 \
|
||||
+trainer.amp_backend="apex" +trainer.amp_level="O2" +trainer.precision=16 \
|
||||
print_config=false
|
||||
+11
-11
@@ -17,59 +17,59 @@ export PYTHONWARNINGS="ignore"
|
||||
|
||||
echo "TEST 1"
|
||||
echo "Debug mode (run 1 train, val and test loop using 1 batch)"
|
||||
python train.py trainer=debug_trainer debug=True \
|
||||
python run.py trainer=debug_trainer debug=True \
|
||||
print_config=false
|
||||
|
||||
echo "TEST 2"
|
||||
echo "Overfit to 10 batches (10 epochs)"
|
||||
python train.py trainer=debug_trainer trainer.overfit_batches=10 \
|
||||
python run.py trainer=debug_trainer trainer.overfit_batches=10 \
|
||||
trainer.min_epochs=10 trainer.max_epochs=10 \
|
||||
print_config=false
|
||||
|
||||
echo "TEST 3"
|
||||
echo "Train on CPU (1 epoch)"
|
||||
python train.py trainer=debug_trainer trainer.gpus=0 trainer.max_epochs=1 \
|
||||
python run.py trainer=debug_trainer trainer.gpus=0 trainer.max_epochs=1 \
|
||||
print_config=false
|
||||
|
||||
echo "TEST 4"
|
||||
echo "Train on 25% of data (1 epoch)"
|
||||
python train.py trainer=debug_trainer trainer.max_epochs=1 \
|
||||
python run.py trainer=debug_trainer trainer.max_epochs=1 \
|
||||
trainer.limit_train_batches=0.25 trainer.limit_val_batches=0.25 trainer.limit_test_batches=0.25 \
|
||||
print_config=false
|
||||
|
||||
echo "TEST 5"
|
||||
echo "Train on 15 train batches, 10 val batches, 5 test batches (1 epoch)"
|
||||
python train.py trainer=debug_trainer trainer.max_epochs=1 \
|
||||
python run.py trainer=debug_trainer trainer.max_epochs=1 \
|
||||
trainer.limit_train_batches=15 trainer.limit_val_batches=10 trainer.limit_test_batches=5 \
|
||||
print_config=false
|
||||
|
||||
echo "TEST 6"
|
||||
echo "Run all experiment configs (2 epochs)"
|
||||
python train.py -m trainer=debug_trainer '+experiment=glob(*)' trainer.max_epochs=2 \
|
||||
python run.py -m trainer=debug_trainer '+experiment=glob(*)' trainer.max_epochs=2 \
|
||||
print_config=false
|
||||
|
||||
echo "TEST 7"
|
||||
echo "Run default hydra sweep (executes 4 different combinations in debug mode)"
|
||||
python train.py -m trainer=debug_trainer datamodule.batch_size=32,64 optimizer.lr=0.001,0.003 \
|
||||
python run.py -m trainer=debug_trainer datamodule.batch_size=32,64 optimizer.lr=0.001,0.003 \
|
||||
debug=True \
|
||||
print_config=false
|
||||
|
||||
echo "TEST 8"
|
||||
echo "Run with gradient accumulation (1 epoch)"
|
||||
python train.py trainer=debug_trainer trainer.max_epochs=1 trainer.accumulate_grad_batches=10 \
|
||||
python run.py trainer=debug_trainer trainer.max_epochs=1 trainer.accumulate_grad_batches=10 \
|
||||
print_config=false
|
||||
|
||||
echo "TEST 9"
|
||||
echo "Run validation loop twice per epoch (2 epochs)"
|
||||
python train.py trainer=debug_trainer trainer.max_epochs=2 trainer.val_check_interval=0.5 \
|
||||
python run.py trainer=debug_trainer trainer.max_epochs=2 trainer.val_check_interval=0.5 \
|
||||
print_config=false
|
||||
|
||||
echo "TEST 10"
|
||||
echo "Run with CSVLogger (2 epochs)"
|
||||
python train.py trainer=debug_trainer logger=csv trainer.min_epochs=5 trainer.max_epochs=2 \
|
||||
python run.py trainer=debug_trainer logger=csv trainer.min_epochs=5 trainer.max_epochs=2 \
|
||||
print_config=false
|
||||
|
||||
echo "TEST 11"
|
||||
echo "Run with TensorBoardLogger (2 epochs)"
|
||||
python train.py trainer=debug_trainer logger=tensorboard trainer.min_epochs=5 trainer.max_epochs=2 \
|
||||
python run.py trainer=debug_trainer logger=tensorboard trainer.min_epochs=5 trainer.max_epochs=2 \
|
||||
print_config=false
|
||||
@@ -17,15 +17,16 @@ export PYTHONWARNINGS="ignore"
|
||||
|
||||
echo "TEST 1"
|
||||
echo "Default hydra sweep with wandb logging"
|
||||
python train.py -m datamodule.batch_size=64,128 model.lr=0.001,0.003 \
|
||||
python run.py -m \
|
||||
+experiment=exp_example_simple \
|
||||
datamodule.batch_size=64,128 optimizer.lr=0.001,0.003 \
|
||||
trainer.gpus=-1 trainer.max_epochs=2 \
|
||||
datamodule.num_workers=12 datamodule.pin_memory=True \
|
||||
logger=wandb logger.wandb.project="env_tests" logger.wandb.group="DefaultSweep_MNIST_SimpleDenseNet"
|
||||
|
||||
echo "TEST 2"
|
||||
echo "Optuna sweep with wandb logging"
|
||||
python train.py -m --config-name config_optuna.yaml \
|
||||
python run.py -m --config-name config_optuna.yaml \
|
||||
+experiment=exp_example_simple \
|
||||
trainer.gpus=-1 trainer.max_epochs=5 \
|
||||
datamodule.num_workers=12 datamodule.pin_memory=True \
|
||||
|
||||
Reference in new issue
Block a user