Skip to content

Commit

Permalink
Undo changes to tests/conf files
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjstewart committed Jan 6, 2022
1 parent b484e05 commit b5c5dbf
Show file tree
Hide file tree
Showing 25 changed files with 48 additions and 6 deletions.
2 changes: 2 additions & 0 deletions tests/conf/bigearthnet_all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ experiment:
module:
loss: "bce"
classification_model: "resnet18"
learning_rate: 1e-3
learning_rate_schedule_patience: 6
weights: "random"
in_channels: 14
num_classes: 19
Expand Down
2 changes: 2 additions & 0 deletions tests/conf/bigearthnet_s1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ experiment:
module:
loss: "bce"
classification_model: "resnet18"
learning_rate: 1e-3
learning_rate_schedule_patience: 6
weights: "random"
in_channels: 2
num_classes: 19
Expand Down
2 changes: 2 additions & 0 deletions tests/conf/bigearthnet_s2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ experiment:
module:
loss: "bce"
classification_model: "resnet18"
learning_rate: 1e-3
learning_rate_schedule_patience: 6
weights: "random"
in_channels: 12
num_classes: 19
Expand Down
2 changes: 2 additions & 0 deletions tests/conf/byol.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ experiment:
encoder: "resnet18"
input_channels: 4
imagenet_pretraining: False
learning_rate: 1e-3
learning_rate_schedule_patience: 6
datamodule:
root_dir: "tests/data/chesapeake/cvpr"
train_splits:
Expand Down
2 changes: 2 additions & 0 deletions tests/conf/chesapeake_cvpr_5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ experiment:
encoder_name: "resnet50"
encoder_weights: null
encoder_output_stride: 16
learning_rate: 1e-3
learning_rate_schedule_patience: 6
in_channels: 4
num_classes: 5
num_filters: 1
Expand Down
2 changes: 2 additions & 0 deletions tests/conf/chesapeake_cvpr_7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ experiment:
encoder_name: "resnet18"
encoder_weights: null
encoder_output_stride: 16
learning_rate: 1e-3
learning_rate_schedule_patience: 6
in_channels: 4
num_classes: 7
num_filters: 1
Expand Down
2 changes: 2 additions & 0 deletions tests/conf/chesapeake_cvpr_prior.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ experiment:
encoder_name: "resnet50"
encoder_weights: null
encoder_output_stride: 16
learning_rate: 1e-3
learning_rate_schedule_patience: 6
in_channels: 4
num_classes: 5
num_filters: 1
Expand Down
2 changes: 2 additions & 0 deletions tests/conf/cowc_counting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ experiment:
task: cowc_counting
module:
model: resnet18
learning_rate: 1e-3
learning_rate_schedule_patience: 2
pretrained: False
datamodule:
root_dir: "tests/data/cowc_counting"
Expand Down
2 changes: 2 additions & 0 deletions tests/conf/cyclone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ experiment:
task: "cyclone"
module:
model: "resnet18"
learning_rate: 1e-3
learning_rate_schedule_patience: 2
pretrained: False
datamodule:
root_dir: "tests/data/cyclone"
Expand Down
2 changes: 2 additions & 0 deletions tests/conf/etci2021.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ experiment:
segmentation_model: "unet"
encoder_name: "resnet18"
encoder_weights: null
learning_rate: 1e-3
learning_rate_schedule_patience: 6
in_channels: 7
num_classes: 2
ignore_zeros: True
Expand Down
2 changes: 2 additions & 0 deletions tests/conf/eurosat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ experiment:
module:
loss: "ce"
classification_model: "resnet18"
learning_rate: 1e-3
learning_rate_schedule_patience: 6
weights: "random"
in_channels: 13
num_classes: 2
Expand Down
2 changes: 2 additions & 0 deletions tests/conf/landcoverai.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ experiment:
segmentation_model: "unet"
encoder_name: "resnet18"
encoder_weights: null
learning_rate: 1e-3
learning_rate_schedule_patience: 6
verbose: false
in_channels: 3
num_classes: 6
Expand Down
2 changes: 2 additions & 0 deletions tests/conf/naipchesapeake.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ experiment:
encoder_name: "resnet34"
encoder_weights: null
encoder_output_stride: 16
learning_rate: 1e-3
learning_rate_schedule_patience: 2
in_channels: 4
num_classes: 13
num_filters: 1
Expand Down
2 changes: 2 additions & 0 deletions tests/conf/oscd_all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ experiment:
segmentation_model: "unet"
encoder_name: "resnet18"
encoder_weights: null
learning_rate: 1e-3
learning_rate_schedule_patience: 6
verbose: false
in_channels: 26
num_classes: 2
Expand Down
2 changes: 2 additions & 0 deletions tests/conf/oscd_rgb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ experiment:
segmentation_model: "unet"
encoder_name: "resnet18"
encoder_weights: null
learning_rate: 1e-3
learning_rate_schedule_patience: 6
verbose: false
in_channels: 6
num_classes: 2
Expand Down
2 changes: 2 additions & 0 deletions tests/conf/resisc45.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ experiment:
module:
loss: "ce"
classification_model: "resnet18"
learning_rate: 1e-3
learning_rate_schedule_patience: 6
weights: "random"
in_channels: 3
num_classes: 3
Expand Down
2 changes: 2 additions & 0 deletions tests/conf/sen12ms_all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ experiment:
encoder_name: "resnet18"
encoder_weights: null
encoder_output_stride: 16
learning_rate: 1e-3
learning_rate_schedule_patience: 2
in_channels: 15
num_classes: 11
ignore_zeros: False
Expand Down
2 changes: 2 additions & 0 deletions tests/conf/sen12ms_s1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ experiment:
encoder_name: "resnet18"
encoder_weights: null
encoder_output_stride: 16
learning_rate: 1e-3
learning_rate_schedule_patience: 2
in_channels: 2
num_classes: 11
ignore_zeros: False
Expand Down
2 changes: 2 additions & 0 deletions tests/conf/sen12ms_s2_all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ experiment:
encoder_name: "resnet18"
encoder_weights: null
encoder_output_stride: 16
learning_rate: 1e-3
learning_rate_schedule_patience: 2
in_channels: 13
num_classes: 11
ignore_zeros: False
Expand Down
2 changes: 2 additions & 0 deletions tests/conf/sen12ms_s2_reduced.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ experiment:
encoder_name: "resnet18"
encoder_weights: null
encoder_output_stride: 16
learning_rate: 1e-3
learning_rate_schedule_patience: 2
in_channels: 6
num_classes: 11
ignore_zeros: False
Expand Down
2 changes: 2 additions & 0 deletions tests/conf/so2sat_supervised.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ experiment:
module:
loss: "focal"
classification_model: "resnet18"
learning_rate: 1e-3
learning_rate_schedule_patience: 6
weights: "random"
in_channels: 3
num_classes: 17
Expand Down
2 changes: 2 additions & 0 deletions tests/conf/so2sat_unsupervised.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ experiment:
module:
loss: "jaccard"
classification_model: "resnet18"
learning_rate: 1e-3
learning_rate_schedule_patience: 6
weights: "random"
in_channels: 3
num_classes: 17
Expand Down
2 changes: 2 additions & 0 deletions tests/conf/ucmerced.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ experiment:
loss: "ce"
classification_model: "resnet18"
weights: "random"
learning_rate: 1e-3
learning_rate_schedule_patience: 6
in_channels: 3
num_classes: 2
datamodule:
Expand Down
4 changes: 1 addition & 3 deletions tests/datamodules/test_chesapeake.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
class TestChesapeakeCVPRDataModule:
@pytest.fixture(scope="class")
def datamodule(self) -> ChesapeakeCVPRDataModule:
conf = OmegaConf.load(
os.path.join("tests", "conf", "chesapeake_cvpr_5.yaml")
)
conf = OmegaConf.load(os.path.join("tests", "conf", "chesapeake_cvpr_5.yaml"))
kwargs = OmegaConf.to_object(conf.experiment.datamodule)
kwargs = cast(Dict[str, Any], kwargs)

Expand Down
4 changes: 1 addition & 3 deletions tests/trainers/test_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,7 @@ def test_trainer(
trainer.test(model=model, datamodule=datamodule)

def test_no_logger(self) -> None:
conf = OmegaConf.load(
os.path.join("tests", "conf", "bigearthnet_s1.yaml")
)
conf = OmegaConf.load(os.path.join("tests", "conf", "bigearthnet_s1.yaml"))
conf_dict = OmegaConf.to_object(conf.experiment)
conf_dict = cast(Dict[Any, Dict[Any, Any]], conf_dict)

Expand Down

0 comments on commit b5c5dbf

Please sign in to comment.