* add smoke tests implemented with pytest

* add sweep tests, wandb tests and mixed-precision tests

* update requirements.txt

* remove .autoenv.template file

* update readme
This commit is contained in:
Łukasz Zalewski authored and GitHub committed 2021-04-26 23:06:50 +02:00
1 parent 5cc767a595
commit e0293193f5
30 files changed
+572 -280

No files matched your search

File renamed without changes.
@@ -1,31 +1,32 @@
defaults:
- default_callbacks.yaml
- default.yaml
watch_model_with_wandb:
watch_model:
_target_: src.callbacks.wandb_callbacks.WatchModelWithWandb
log: "all"
log_freq: 100
upload_code_to_wandb_as_artifact:
upload_code_as_artifact:
_target_: src.callbacks.wandb_callbacks.UploadCodeToWandbAsArtifact
code_dir: ${work_dir}
upload_ckpts_to_wandb_as_artifact:
upload_ckpts_as_artifact:
_target_: src.callbacks.wandb_callbacks.UploadCheckpointsToWandbAsArtifact
ckpt_dir: "checkpoints/"
upload_best_only: True
save_f1_precision_recall_heatmap_to_wandb:
log_f1_precision_recall_heatmap:
_target_: src.callbacks.wandb_callbacks.LogF1PrecRecHeatmapToWandb
save_confusion_matrix_to_wandb:
log_confusion_matrix:
_target_: src.callbacks.wandb_callbacks.LogConfusionMatrixToWandb
log_images:
log_images_with_predictions:
_target_: src.callbacks.wandb_callbacks.ImagePredictionLogger
num_samples: 8
+2 -2
View File
@@ -2,10 +2,10 @@
# specify here default training configuration
defaults:
- trainer: default_trainer.yaml
- trainer: minimal.yaml
- model: mnist_model.yaml
- datamodule: mnist_datamodule.yaml
- callbacks: default_callbacks.yaml # set this to null if you don't want to use callbacks
- callbacks: default.yaml # set this to null if you don't want to use callbacks
- logger: null # set logger here or use command line (e.g. `python run.py logger=wandb`)
- experiment: null
@@ -1,7 +1,7 @@
# @package _global_
# to execute this experiment run:
# python run.py +experiment=exp_example_full
# python run.py experiment=example_full.yaml
defaults:
- override /trainer: null # override trainer to null so it's not loaded from main config defaults...
@@ -12,7 +12,7 @@ defaults:
# we override default configurations with nulls to prevent them from loading at all
# instead we define all modules and their paths directly in this config,
# so everything is stored in one place for more readability
# so everything is stored in one place
seed: 12345
@@ -1,13 +1,13 @@
# @package _global_
# to execute this experiment run:
# python run.py +experiment=exp_example_simple
# python run.py experiment=example_simple.yaml
defaults:
- override /trainer: default_trainer.yaml # choose trainer from 'configs/trainer/'
- override /trainer: minimal.yaml # choose trainer from 'configs/trainer/'
- override /model: mnist_model.yaml
- override /datamodule: mnist_datamodule.yaml
- override /callbacks: default_callbacks.yaml
- override /callbacks: default.yaml
- override /logger: null
# all parameters below will be merged with parameters from default configurations set above
+5
View File
@@ -0,0 +1,5 @@
_target_: pytorch_lightning.Trainer
gpus: 4
accelerator: ddp
+21
View File
@@ -0,0 +1,21 @@
_target_: pytorch_lightning.Trainer
gpus: 0
min_epochs: 1
max_epochs: 3
# prints
progress_bar_refresh_rate: null
weights_summary: null
profiler: null
# debugs
num_sanity_val_steps: 2
fast_dev_run: False
overfit_batches: 0
limit_train_batches: 1.0
limit_val_batches: 1.0
limit_test_batches: 1.0
track_grad_norm: -1
terminate_on_nan: False
-49
View File
@@ -1,49 +0,0 @@
# Trainer args for debugging model
_target_: pytorch_lightning.Trainer
gpus: 0
min_epochs: 1
max_epochs: 3
# prints
progress_bar_refresh_rate: null
weights_summary: null
profiler: null
# all parameters below are set to Lightning defaults
# tricks
gradient_clip_val: 0
accumulate_grad_batches: 1
val_check_interval: 1.0
check_val_every_n_epoch: 1
stochastic_weight_avg: False
# debug
num_sanity_val_steps: 2
fast_dev_run: False
overfit_batches: 0
limit_train_batches: 1.0
limit_val_batches: 1.0
limit_test_batches: 1.0
track_grad_norm: -1
terminate_on_nan: False
# others
amp_backend: "native"
amp_level: "02"
precision: 32
accelerator: null
num_nodes: 1
tpu_cores: null
deterministic: False
resume_from_checkpoint: null
# automatically find the largest batch size that fits into memory and is power of 2
# (requires calling trainer.tune(model=model, datamodule=datamodule))
# auto_scale_batch_size:'power'
+50
View File
@@ -0,0 +1,50 @@
_target_: pytorch_lightning.Trainer
# default values for all trainer parameters
checkpoint_callback: True
default_root_dir: null
gradient_clip_val: 0.0
process_position: 0
num_nodes: 1
num_processes: 1
gpus: null
auto_select_gpus: False
tpu_cores: null
log_gpu_memory: null
progress_bar_refresh_rate: 1
overfit_batches: 0.0
track_grad_norm: -1
check_val_every_n_epoch: 1
fast_dev_run: False
accumulate_grad_batches: 1
max_epochs: 1
min_epochs: 1
max_steps: null
min_steps: null
limit_train_batches: 1.0
limit_val_batches: 1.0
limit_test_batches: 1.0
val_check_interval: 1.0
flush_logs_every_n_steps: 100
log_every_n_steps: 50
accelerator: null
sync_batchnorm: False
precision: 32
weights_summary: 'top'
weights_save_path: null
num_sanity_val_steps: 2
truncated_bptt_steps: null
resume_from_checkpoint: null
profiler: null
benchmark: False
deterministic: False
reload_dataloaders_every_epoch: False
auto_lr_find: False
replace_sampler_ddp: True
terminate_on_nan: False
auto_scale_batch_size: False
prepare_data_per_node: True
plugins: null
amp_backend: 'native'
amp_level: 'O2'
move_metrics_to_cpu: False
@@ -9,4 +9,4 @@ max_epochs: 10
weights_summary: null
progress_bar_refresh_rate: 10
terminate_on_nan: False
# resume_from_checkpoint: null