change folder structure

This commit is contained in:
hobogalaxy committed 2021-01-12 18:33:04 +01:00
1 parent fbe2464426
commit 9a5a4eb192
23 files changed
+148 -120

No files matched your search

@@ -4,7 +4,7 @@ model_checkpoint:
class: pytorch_lightning.callbacks.ModelCheckpoint
args:
monitor: "val_acc" # name of the logged metric which determines when model is improving
save_top_k: 1 # save k best lightning_models (determined by above metric)
save_top_k: 1 # save k best models (determined by above metric)
save_last: True # additionaly always save model from last epoch
mode: "max" # can be "max" or "min"
filepath: "checkpoints/{epoch}"
@@ -1,2 +1,5 @@
# @package _group_
defaults:
- default_callbacks.yaml
- wandb_callbacks.yaml
+23 -10
View File
@@ -1,18 +1,31 @@
# @package _group_
save_best_metric_scores_to_wandb:
class: pytorch_modules.lightning_callbacks.wandb_callbacks.SaveBestMetricScoresToWandb
class: src.callbacks.wandb_callbacks.SaveBestMetricScoresToWandb
args: {}
save_code_to_wandb_as_artifact:
class: pytorch_modules.lightning_callbacks.wandb_callbacks.SaveCodeToWandb
args:
code_dir: ${work_dir}/
#save_confusion_matrix_to_wandb:
# class: src.callbacks.wandb_callbacks.SaveConfusionMatrixToWandb
# args:
# class_names: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
#
#
#save_f1_precision_recall_heatmap_to_wandb:
# class: src.callbacks.wandb_callbacks.SaveMetricsHeatmapToWandb
# args:
# class_names: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
upload_ckpts_to_wandb_as_artifact:
class: pytorch_modules.lightning_callbacks.wandb_callbacks.UploadAllCheckpointsToWandb
args:
ckpt_dir: "checkpoints/"
upload_best_only: True
#upload_code_to_wandb_as_artifact:
# class: src.callbacks.wandb_callbacks.SaveCodeToWandb
# args:
# code_dir: ${work_dir}/
#upload_ckpts_to_wandb_as_artifact:
# class: src.callbacks.wandb_callbacks.UploadAllCheckpointsToWandb
# args:
# ckpt_dir: "checkpoints/"
# upload_best_only: True
+3 -3
View File
@@ -23,7 +23,7 @@ hydra:
dir: logs/multiruns/${now:%Y-%m-%d_%H-%M-%S}
subdir: ${hydra.job.num}
# extra things that are logged by all loggers as hyperparameters, before training starts
# extra things that are logged by all loggers as hyperparameters
extra_logs:
log_seeds: True
@@ -33,6 +33,6 @@ extra_logs:
log_model_class: True
log_optimizer_class: True
log_datamodule_class: True
log_model_architecture_class: True
log_train_val_test_sizes: True
log_model_architecture_class_name: True
log_train_val_test_sizes: False
@@ -1,6 +1,6 @@
# @package _group_
class: pytorch_modules.lightning_datamodules.mnist_datamodule.MNISTDataModule
class: src.datamodules.mnist_datamodule.MNISTDataModule
args:
batch_size: 64
train_val_test_split: [55_000, 5_000, 10_000]
@@ -26,7 +26,7 @@ trainer:
limit_val_batches: 0.9 # validate on 90% of validation data
limit_test_batches: 1.0 # test on 100% of test data
val_check_interval: 0.5 # perform validation twice per epoch
# resume_from_checkpoint: ${work_dir}/last.ckpt # use this to resume training from checkpoint
# resume_from_checkpoint: ${work_dir}/last.ckpt # path to checkpoint (this can be also url for download)
model:
args: # you can add here any params you want and then access them in lightning model
@@ -1,6 +1,6 @@
# @package _group_
class: pytorch_modules.lightning_models.simple_mnist_classifier.LitModel
class: src.models.simple_mnist_classifier.LitModel
args:
lr: 0.001
weight_decay: 0.00001
+4 -2
View File
@@ -3,9 +3,11 @@
# default args passed to Lightning Trainer on every experiment
# they can be combined or overwritten with args set in experiment config
args:
gpus: -1 # set -1 to train on all GPUs available, set 0 to train on CPU only
gpus: -1 # set -1 to train on all GPUs available, set 0 to train on CPU only
auto_select_gpus: True
max_epochs: 10
num_sanity_val_steps: 3
progress_bar_refresh_rate: 10
weights_summary: null # null in yaml represents python None value
weights_summary: null # null in yaml represents python None value
default_root_dir: "lightning_logs/"
auto_lr_find: False # "https://pytorch-lightning.readthedocs.io/en/stable/lr_finder.html"