Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bigearthnet/configs/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,4 @@ defaults:
- _self_
- model: baseline.yaml # uses the default baseline model when training
- transforms: norm.yaml # performs normalization as default transform
- override hydra/sweeper: orion
28 changes: 28 additions & 0 deletions bigearthnet/configs/hydra/sweeper/orion.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
orion:
name: 'experiment'
version: '1'

algorithm:
type: random
config:
seed: 1

worker:
n_workers: -1
max_broken: 3
max_trials: 3

storage:
type: legacy

database:
type: pickleddb
host: 'database.pkl'

# parametrization of the hyperparameter space
parametrization:
datamodule:
batch_size: "choices([64, 128, 256])"
optimizer:
lr: "uniform(0, 1)"
name: "choices(['adam', 'sgd'])"
2 changes: 2 additions & 0 deletions bigearthnet/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ def main(cfg: DictConfig):
trainer.fit(model, datamodule=datamodule)
log.info("Training Done.")

return model.val_best_metric


if __name__ == "__main__":
main()
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"jupyter",
"matplotlib",
"numpy>=1.23",
"orion",
"pyyaml>=5.3",
"pytest",
"pytorch_lightning==1.6.4",
Expand Down