General improvements (#88)
* remove unnecessary linters from pre-commit-config * hook fix * small improvements * fix readme * implement easier access to debug mode * fix tests * Update README.md * Update README.md
This commit is contained in:
1 parent
5385a2ec98
commit
3d301977b3
14 files changed
+176
-113
No files matched your search
@@ -27,6 +27,12 @@ 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 \
|
||||
+trainer.precision=16 \
|
||||
print_config=false
|
||||
|
||||
echo "TEST 4"
|
||||
echo "Train with mixed-precision (apex, 2 epochs)"
|
||||
python train.py trainer.gpus=-1 trainer.max_epochs=2 \
|
||||
+trainer.amp_backend='apex' +trainer.amp_level='O2' \
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
#####################################################
|
||||
# export WANDB_START_METHOD=thread
|
||||
# python hydra_wandb_test.py -m +some_param=1,2,3,4
|
||||
#####################################################
|
||||
|
||||
|
||||
# import os, sys
|
||||
# sys.path.insert(1, os.path.join(sys.path[0], ".."))
|
||||
# print(os.path.abspath(os.curdir))
|
||||
|
||||
|
||||
import hydra
|
||||
import wandb
|
||||
|
||||
|
||||
@hydra.main(config_path="../configs/", config_name="config.yaml")
|
||||
def main(config):
|
||||
wandb.init(project="env_tests")
|
||||
wandb.finish()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
+14
-19
@@ -16,65 +16,60 @@ export PYTHONWARNINGS="ignore"
|
||||
|
||||
|
||||
echo "TEST 1"
|
||||
echo "fast_dev_run=true (run 1 train, val and test loop using 1 batch)"
|
||||
python train.py trainer.fast_dev_run=True \
|
||||
echo "Debug mode (run 1 train, val and test loop using 1 batch)"
|
||||
python train.py debug=True \
|
||||
print_config=false
|
||||
|
||||
echo "TEST 2"
|
||||
echo "Overfit to 10 bathes"
|
||||
echo "Overfit to 10 batches (10 epochs)"
|
||||
python train.py +trainer.overfit_batches=10 \
|
||||
trainer.min_epochs=10 trainer.max_epochs=10 \
|
||||
print_config=false
|
||||
|
||||
echo "TEST 3"
|
||||
echo "Train 1 epoch on CPU"
|
||||
echo "Train on CPU (1 epoch)"
|
||||
python train.py trainer.gpus=0 trainer.max_epochs=1 \
|
||||
print_config=false
|
||||
|
||||
echo "TEST 4"
|
||||
echo "Train on 25% of data"
|
||||
echo "Train on 25% of data (1 epoch)"
|
||||
python train.py 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"
|
||||
echo "Train on 15 train batches, 10 val batches, 5 test batches (1 epoch)"
|
||||
python train.py 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 for 2 epochs"
|
||||
echo "Run all experiment configs (2 epochs)"
|
||||
python train.py -m '+experiment=glob(*)' trainer.max_epochs=2 \
|
||||
print_config=false
|
||||
|
||||
echo "TEST 7"
|
||||
echo "Run default hydra sweep (executes 4 different combinations with fast_dev_run=True)"
|
||||
echo "Run default hydra sweep (executes 4 different combinations in debug mode)"
|
||||
python train.py -m datamodule.batch_size=32,64 model.lr=0.001,0.003 \
|
||||
trainer.fast_dev_run=True \
|
||||
debug=True \
|
||||
print_config=false
|
||||
|
||||
echo "TEST 8"
|
||||
echo "Run with 16 bit precision"
|
||||
python train.py trainer.max_epochs=1 +trainer.precision=16 \
|
||||
print_config=false
|
||||
|
||||
echo "TEST 9"
|
||||
echo "Run with gradient accumulation"
|
||||
echo "Run with gradient accumulation (1 epoch)"
|
||||
python train.py trainer.max_epochs=1 +trainer.accumulate_grad_batches=10 \
|
||||
print_config=false
|
||||
|
||||
echo "TEST 10"
|
||||
echo "Run validation loop twice per epoch"
|
||||
echo "TEST 9"
|
||||
echo "Run validation loop twice per epoch (2 epochs)"
|
||||
python train.py trainer.max_epochs=2 +trainer.val_check_interval=0.5 \
|
||||
print_config=false
|
||||
|
||||
echo "TEST 11"
|
||||
echo "TEST 10"
|
||||
echo "Run with CSVLogger (2 epochs)"
|
||||
python train.py logger=csv trainer.min_epochs=5 trainer.max_epochs=2 \
|
||||
print_config=false
|
||||
|
||||
echo "TEST 12"
|
||||
echo "TEST 11"
|
||||
echo "Run with TensorBoardLogger (2 epochs)"
|
||||
python train.py logger=tensorboard trainer.min_epochs=5 trainer.max_epochs=2 \
|
||||
print_config=false
|
||||
Reference in new issue
Block a user