Skip to content

Commit

Permalink
move from pytorch_lightning to lightning
Browse files Browse the repository at this point in the history
  • Loading branch information
ioangatop committed Mar 18, 2024
1 parent 9e59836 commit f5f8573
Show file tree
Hide file tree
Showing 29 changed files with 112 additions and 89 deletions.
4 changes: 2 additions & 2 deletions configs/core/tests/offline/embeddings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ trainer:
limit_train_batches: 2
limit_val_batches: 2
callbacks:
- class_path: pytorch_lightning.callbacks.LearningRateMonitor
- class_path: lightning.pytorch.callbacks.LearningRateMonitor
init_args:
logging_interval: epoch
logger:
- class_path: pytorch_lightning.loggers.TensorBoardLogger
- class_path: lightning.pytorch.loggers.TensorBoardLogger
init_args:
save_dir: *OUTPUT_DIR
name: ""
Expand Down
8 changes: 4 additions & 4 deletions configs/vision/dino_vit/offline/bach.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ trainer:
default_root_dir: &OUTPUT_ROOT ${oc.env:OUTPUT_ROOT, logs/${oc.env:DINO_BACKBONE, dino_vits16}/offline/bach}
max_steps: &MAX_STEPS ${oc.env:MAX_STEPS, 12500}
callbacks:
- class_path: pytorch_lightning.callbacks.LearningRateMonitor
- class_path: lightning.pytorch.callbacks.LearningRateMonitor
init_args:
logging_interval: epoch
- class_path: pytorch_lightning.callbacks.ModelCheckpoint
- class_path: lightning.pytorch.callbacks.ModelCheckpoint
init_args:
filename: best
save_last: true
save_top_k: 1
monitor: &MONITOR_METRIC ${oc.env:MONITOR_METRIC, val/MulticlassAccuracy}
mode: &MONITOR_METRIC_MODE ${oc.env:MONITOR_METRIC_MODE, max}
- class_path: pytorch_lightning.callbacks.EarlyStopping
- class_path: lightning.pytorch.callbacks.EarlyStopping
init_args:
min_delta: 0
patience: 400
Expand All @@ -39,7 +39,7 @@ trainer:
force_reload: ${oc.env:FORCE_RELOAD, false}
checkpoint_path: ${oc.env:CHECKPOINT_PATH, null}
logger:
- class_path: pytorch_lightning.loggers.TensorBoardLogger
- class_path: lightning.pytorch.loggers.TensorBoardLogger
init_args:
save_dir: *OUTPUT_ROOT
name: ""
Expand Down
8 changes: 4 additions & 4 deletions configs/vision/dino_vit/offline/crc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ trainer:
default_root_dir: &OUTPUT_ROOT ${oc.env:OUTPUT_ROOT, logs/${oc.env:DINO_BACKBONE, dino_vits16}/offline/crc}
max_steps: &MAX_STEPS ${oc.env:MAX_STEPS, 12500}
callbacks:
- class_path: pytorch_lightning.callbacks.LearningRateMonitor
- class_path: lightning.pytorch.callbacks.LearningRateMonitor
init_args:
logging_interval: epoch
- class_path: pytorch_lightning.callbacks.ModelCheckpoint
- class_path: lightning.pytorch.callbacks.ModelCheckpoint
init_args:
filename: best
save_last: true
save_top_k: 1
monitor: &MONITOR_METRIC ${oc.env:MONITOR_METRIC, val/MulticlassAccuracy}
mode: &MONITOR_METRIC_MODE ${oc.env:MONITOR_METRIC_MODE, max}
- class_path: pytorch_lightning.callbacks.EarlyStopping
- class_path: lightning.pytorch.callbacks.EarlyStopping
init_args:
min_delta: 0
patience: 24
Expand All @@ -39,7 +39,7 @@ trainer:
force_reload: ${oc.env:FORCE_RELOAD, false}
checkpoint_path: ${oc.env:CHECKPOINT_PATH, null}
logger:
- class_path: pytorch_lightning.loggers.TensorBoardLogger
- class_path: lightning.pytorch.loggers.TensorBoardLogger
init_args:
save_dir: *OUTPUT_ROOT
name: ""
Expand Down
8 changes: 4 additions & 4 deletions configs/vision/dino_vit/offline/mhist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ trainer:
default_root_dir: &OUTPUT_ROOT ${oc.env:OUTPUT_ROOT, logs/${oc.env:DINO_BACKBONE, dino_vits16}/offline/mhist}
max_steps: &MAX_STEPS ${oc.env:MAX_STEPS, 12500}
callbacks:
- class_path: pytorch_lightning.callbacks.LearningRateMonitor
- class_path: lightning.pytorch.callbacks.LearningRateMonitor
init_args:
logging_interval: epoch
- class_path: pytorch_lightning.callbacks.ModelCheckpoint
- class_path: lightning.pytorch.callbacks.ModelCheckpoint
init_args:
filename: best
save_last: true
save_top_k: 1
monitor: &MONITOR_METRIC ${oc.env:MONITOR_METRIC, val/BinaryAccuracy}
mode: &MONITOR_METRIC_MODE ${oc.env:MONITOR_METRIC_MODE, max}
- class_path: pytorch_lightning.callbacks.EarlyStopping
- class_path: lightning.pytorch.callbacks.EarlyStopping
init_args:
min_delta: 0
patience: 51
Expand All @@ -39,7 +39,7 @@ trainer:
force_reload: ${oc.env:FORCE_RELOAD, false}
checkpoint_path: ${oc.env:CHECKPOINT_PATH, null}
logger:
- class_path: pytorch_lightning.loggers.TensorBoardLogger
- class_path: lightning.pytorch.loggers.TensorBoardLogger
init_args:
save_dir: *OUTPUT_ROOT
name: ""
Expand Down
8 changes: 4 additions & 4 deletions configs/vision/dino_vit/offline/patch_camelyon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ trainer:
default_root_dir: &OUTPUT_ROOT ${oc.env:OUTPUT_ROOT, logs/${oc.env:DINO_BACKBONE, dino_vits16}/offline/patch_camelyon}
max_steps: &MAX_STEPS ${oc.env:MAX_STEPS, 12500}
callbacks:
- class_path: pytorch_lightning.callbacks.LearningRateMonitor
- class_path: lightning.pytorch.callbacks.LearningRateMonitor
init_args:
logging_interval: epoch
- class_path: pytorch_lightning.callbacks.ModelCheckpoint
- class_path: lightning.pytorch.callbacks.ModelCheckpoint
init_args:
filename: best
save_last: true
save_top_k: 1
monitor: &MONITOR_METRIC ${oc.env:MONITOR_METRIC, val/BinaryAccuracy}
mode: &MONITOR_METRIC_MODE ${oc.env:MONITOR_METRIC_MODE, max}
- class_path: pytorch_lightning.callbacks.EarlyStopping
- class_path: lightning.pytorch.callbacks.EarlyStopping
init_args:
min_delta: 0
patience: 9
Expand All @@ -40,7 +40,7 @@ trainer:
force_reload: ${oc.env:FORCE_RELOAD, false}
checkpoint_path: ${oc.env:CHECKPOINT_PATH, null}
logger:
- class_path: pytorch_lightning.loggers.TensorBoardLogger
- class_path: lightning.pytorch.loggers.TensorBoardLogger
init_args:
save_dir: *OUTPUT_ROOT
name: ""
Expand Down
8 changes: 4 additions & 4 deletions configs/vision/dino_vit/online/bach.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@ trainer:
default_root_dir: &OUTPUT_ROOT ${oc.env:OUTPUT_ROOT, logs/${oc.env:DINO_BACKBONE, dino_vits16}/online/bach}
max_steps: &MAX_STEPS ${oc.env:MAX_STEPS, 12500}
callbacks:
- class_path: pytorch_lightning.callbacks.LearningRateMonitor
- class_path: lightning.pytorch.callbacks.LearningRateMonitor
init_args:
logging_interval: epoch
- class_path: pytorch_lightning.callbacks.ModelCheckpoint
- class_path: lightning.pytorch.callbacks.ModelCheckpoint
init_args:
filename: best
save_last: true
save_top_k: 1
monitor: &MONITOR_METRIC ${oc.env:MONITOR_METRIC, val/MulticlassAccuracy}
mode: &MONITOR_METRIC_MODE ${oc.env:MONITOR_METRIC_MODE, max}
- class_path: pytorch_lightning.callbacks.EarlyStopping
- class_path: lightning.pytorch.callbacks.EarlyStopping
init_args:
min_delta: 0
patience: 400
monitor: *MONITOR_METRIC
mode: *MONITOR_METRIC_MODE
logger:
- class_path: pytorch_lightning.loggers.TensorBoardLogger
- class_path: lightning.pytorch.loggers.TensorBoardLogger
init_args:
save_dir: *OUTPUT_ROOT
name: ""
Expand Down
8 changes: 4 additions & 4 deletions configs/vision/dino_vit/online/crc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@ trainer:
default_root_dir: &OUTPUT_ROOT ${oc.env:OUTPUT_ROOT, logs/${oc.env:DINO_BACKBONE, dino_vits16}/online/crc}
max_steps: &MAX_STEPS ${oc.env:MAX_STEPS, 12500}
callbacks:
- class_path: pytorch_lightning.callbacks.LearningRateMonitor
- class_path: lightning.pytorch.callbacks.LearningRateMonitor
init_args:
logging_interval: epoch
- class_path: pytorch_lightning.callbacks.ModelCheckpoint
- class_path: lightning.pytorch.callbacks.ModelCheckpoint
init_args:
filename: best
save_last: true
save_top_k: 1
monitor: &MONITOR_METRIC ${oc.env:MONITOR_METRIC, val/MulticlassAccuracy}
mode: &MONITOR_METRIC_MODE ${oc.env:MONITOR_METRIC_MODE, max}
- class_path: pytorch_lightning.callbacks.EarlyStopping
- class_path: lightning.pytorch.callbacks.EarlyStopping
init_args:
min_delta: 0
patience: 24
monitor: *MONITOR_METRIC
mode: *MONITOR_METRIC_MODE
logger:
- class_path: pytorch_lightning.loggers.TensorBoardLogger
- class_path: lightning.pytorch.loggers.TensorBoardLogger
init_args:
save_dir: *OUTPUT_ROOT
name: ""
Expand Down
8 changes: 4 additions & 4 deletions configs/vision/dino_vit/online/mhist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@ trainer:
default_root_dir: &LIGHTNING_ROOT ${oc.env:LIGHTNING_ROOT, logs/dino_vits16/online/mhist}
max_steps: &MAX_STEPS ${oc.env:MAX_STEPS, 12500}
callbacks:
- class_path: pytorch_lightning.callbacks.LearningRateMonitor
- class_path: lightning.pytorch.callbacks.LearningRateMonitor
init_args:
logging_interval: epoch
- class_path: pytorch_lightning.callbacks.ModelCheckpoint
- class_path: lightning.pytorch.callbacks.ModelCheckpoint
init_args:
filename: best
save_last: true
save_top_k: 1
monitor: &MONITOR_METRIC ${oc.env:MONITOR_METRIC, val/BinaryAccuracy}
mode: &MONITOR_METRIC_MODE ${oc.env:MONITOR_METRIC_MODE, max}
- class_path: pytorch_lightning.callbacks.EarlyStopping
- class_path: lightning.pytorch.callbacks.EarlyStopping
init_args:
min_delta: 0
patience: 51
monitor: *MONITOR_METRIC
mode: *MONITOR_METRIC_MODE
logger:
- class_path: pytorch_lightning.loggers.TensorBoardLogger
- class_path: lightning.pytorch.loggers.TensorBoardLogger
init_args:
save_dir: *LIGHTNING_ROOT
name: ""
Expand Down
8 changes: 4 additions & 4 deletions configs/vision/dino_vit/online/patch_camelyon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@ trainer:
default_root_dir: &OUTPUT_ROOT ${oc.env:OUTPUT_ROOT, logs/${oc.env:DINO_BACKBONE, dino_vits16}/online/patch_camelyon}
max_steps: &MAX_STEPS ${oc.env:MAX_STEPS, 12500}
callbacks:
- class_path: pytorch_lightning.callbacks.LearningRateMonitor
- class_path: lightning.pytorch.callbacks.LearningRateMonitor
init_args:
logging_interval: epoch
- class_path: pytorch_lightning.callbacks.ModelCheckpoint
- class_path: lightning.pytorch.callbacks.ModelCheckpoint
init_args:
filename: best
save_last: true
save_top_k: 1
monitor: &MONITOR_METRIC ${oc.env:MONITOR_METRIC, val/BinaryAccuracy}
mode: &MONITOR_METRIC_MODE ${oc.env:MONITOR_METRIC_MODE, max}
- class_path: pytorch_lightning.callbacks.EarlyStopping
- class_path: lightning.pytorch.callbacks.EarlyStopping
init_args:
min_delta: 0
patience: 9
monitor: *MONITOR_METRIC
mode: *MONITOR_METRIC_MODE
logger:
- class_path: pytorch_lightning.loggers.TensorBoardLogger
- class_path: lightning.pytorch.loggers.TensorBoardLogger
init_args:
save_dir: *OUTPUT_ROOT
name: ""
Expand Down
8 changes: 4 additions & 4 deletions configs/vision/owkin/phikon/offline/bach.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ trainer:
default_root_dir: &OUTPUT_ROOT ${oc.env:OUTPUT_ROOT, logs/${oc.env:DINO_BACKBONE, owkin/phikon}/offline/bach}
max_steps: &MAX_STEPS ${oc.env:MAX_STEPS, 12500}
callbacks:
- class_path: pytorch_lightning.callbacks.LearningRateMonitor
- class_path: lightning.pytorch.callbacks.LearningRateMonitor
init_args:
logging_interval: epoch
- class_path: pytorch_lightning.callbacks.ModelCheckpoint
- class_path: lightning.pytorch.callbacks.ModelCheckpoint
init_args:
filename: best
save_last: true
save_top_k: 1
monitor: &MONITOR_METRIC ${oc.env:MONITOR_METRIC, val/MulticlassAccuracy}
mode: &MONITOR_METRIC_MODE ${oc.env:MONITOR_METRIC_MODE, max}
- class_path: pytorch_lightning.callbacks.EarlyStopping
- class_path: lightning.pytorch.callbacks.EarlyStopping
init_args:
min_delta: 0
patience: 400
Expand All @@ -35,7 +35,7 @@ trainer:
tensor_transforms:
class_path: eva.core.models.networks.transforms.ExtractCLSFeatures
logger:
- class_path: pytorch_lightning.loggers.TensorBoardLogger
- class_path: lightning.pytorch.loggers.TensorBoardLogger
init_args:
save_dir: *OUTPUT_ROOT
name: ""
Expand Down
8 changes: 4 additions & 4 deletions configs/vision/owkin/phikon/offline/crc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ trainer:
default_root_dir: &OUTPUT_ROOT ${oc.env:OUTPUT_ROOT, logs/${oc.env:DINO_BACKBONE, owkin/phikon}/offline/crc}
max_steps: &MAX_STEPS ${oc.env:MAX_STEPS, 12500}
callbacks:
- class_path: pytorch_lightning.callbacks.LearningRateMonitor
- class_path: lightning.pytorch.callbacks.LearningRateMonitor
init_args:
logging_interval: epoch
- class_path: pytorch_lightning.callbacks.ModelCheckpoint
- class_path: lightning.pytorch.callbacks.ModelCheckpoint
init_args:
filename: best
save_last: true
save_top_k: 1
monitor: &MONITOR_METRIC ${oc.env:MONITOR_METRIC, val/MulticlassAccuracy}
mode: &MONITOR_METRIC_MODE ${oc.env:MONITOR_METRIC_MODE, max}
- class_path: pytorch_lightning.callbacks.EarlyStopping
- class_path: lightning.pytorch.callbacks.EarlyStopping
init_args:
min_delta: 0
patience: 24
Expand All @@ -35,7 +35,7 @@ trainer:
tensor_transforms:
class_path: eva.core.models.networks.transforms.ExtractCLSFeatures
logger:
- class_path: pytorch_lightning.loggers.TensorBoardLogger
- class_path: lightning.pytorch.loggers.TensorBoardLogger
init_args:
save_dir: *OUTPUT_ROOT
name: ""
Expand Down
8 changes: 4 additions & 4 deletions configs/vision/owkin/phikon/offline/mhist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ trainer:
default_root_dir: &OUTPUT_ROOT ${oc.env:OUTPUT_ROOT, logs/${oc.env:DINO_BACKBONE, owkin/phikon}/offline/mhist}
max_steps: &MAX_STEPS ${oc.env:MAX_STEPS, 12500}
callbacks:
- class_path: pytorch_lightning.callbacks.LearningRateMonitor
- class_path: lightning.pytorch.callbacks.LearningRateMonitor
init_args:
logging_interval: epoch
- class_path: pytorch_lightning.callbacks.ModelCheckpoint
- class_path: lightning.pytorch.callbacks.ModelCheckpoint
init_args:
filename: best
save_last: true
save_top_k: 1
monitor: &MONITOR_METRIC ${oc.env:MONITOR_METRIC, val/BinaryAccuracy}
mode: &MONITOR_METRIC_MODE ${oc.env:MONITOR_METRIC_MODE, max}
- class_path: pytorch_lightning.callbacks.EarlyStopping
- class_path: lightning.pytorch.callbacks.EarlyStopping
init_args:
min_delta: 0
patience: 51
Expand All @@ -35,7 +35,7 @@ trainer:
tensor_transforms:
class_path: eva.core.models.networks.transforms.ExtractCLSFeatures
logger:
- class_path: pytorch_lightning.loggers.TensorBoardLogger
- class_path: lightning.pytorch.loggers.TensorBoardLogger
init_args:
save_dir: *OUTPUT_ROOT
name: ""
Expand Down
8 changes: 4 additions & 4 deletions configs/vision/owkin/phikon/offline/patch_camelyon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ trainer:
default_root_dir: &OUTPUT_ROOT ${oc.env:OUTPUT_ROOT, logs/${oc.env:DINO_BACKBONE, owkin/phikon}/offline/patch_camelyon}
max_steps: &MAX_STEPS ${oc.env:MAX_STEPS, 12500}
callbacks:
- class_path: pytorch_lightning.callbacks.LearningRateMonitor
- class_path: lightning.pytorch.callbacks.LearningRateMonitor
init_args:
logging_interval: epoch
- class_path: pytorch_lightning.callbacks.ModelCheckpoint
- class_path: lightning.pytorch.callbacks.ModelCheckpoint
init_args:
filename: best
save_last: true
save_top_k: 1
monitor: &MONITOR_METRIC ${oc.env:MONITOR_METRIC, val/BinaryAccuracy}
mode: &MONITOR_METRIC_MODE ${oc.env:MONITOR_METRIC_MODE, max}
- class_path: pytorch_lightning.callbacks.EarlyStopping
- class_path: lightning.pytorch.callbacks.EarlyStopping
init_args:
min_delta: 0
patience: 9
Expand All @@ -36,7 +36,7 @@ trainer:
tensor_transforms:
class_path: eva.core.models.networks.transforms.ExtractCLSFeatures
logger:
- class_path: pytorch_lightning.loggers.TensorBoardLogger
- class_path: lightning.pytorch.loggers.TensorBoardLogger
init_args:
save_dir: *OUTPUT_ROOT
name: ""
Expand Down
4 changes: 2 additions & 2 deletions configs/vision/tests/offline/patch_camelyon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ trainer:
model: dino_vits16
pretrained: false
checkpoint_path: &CHECKPOINT_PATH ${oc.env:CHECKPOINT_PATH, null}
- class_path: pytorch_lightning.callbacks.ModelCheckpoint
- class_path: lightning.pytorch.callbacks.ModelCheckpoint
init_args:
filename: best
save_last: true
save_top_k: 1
monitor: &MONITOR_METRIC val/BinaryAccuracy
mode: &MONITOR_METRIC_MODE max
logger:
- class_path: pytorch_lightning.loggers.TensorBoardLogger
- class_path: lightning.pytorch.loggers.TensorBoardLogger
init_args:
save_dir: *LIGHTNING_ROOT
name: ""
Expand Down
Loading

0 comments on commit f5f8573

Please sign in to comment.