adjust sweep file to new config structure
This commit is contained in:
1 parent
801dc8ec96
commit
166bd57198
5 files changed
+48
-25
No files matched your search
@@ -17,7 +17,7 @@ The directory structure of new project looks like this:
|
||||
│ ├── data_modules <- Data related modules
|
||||
│ │ ├── datamodules.py <- "LightningDataModule" modules
|
||||
│ │ ├── datasets.py <- "Dataset" modules
|
||||
│ │ └── transforms.py <- Data transformations (data preprocessing)
|
||||
│ │ └── transforms.py <- Data transformations
|
||||
│ │
|
||||
│ ├── logs <- Logs generated by Weights&Biases and PyTorch Lightning
|
||||
│ │
|
||||
@@ -29,19 +29,19 @@ The directory structure of new project looks like this:
|
||||
│ │ ├── callbacks.py <- Training callbacks
|
||||
│ │ └── init_utils.py <- Some useful initializers
|
||||
│ │
|
||||
│ ├── models
|
||||
│ ├── models <- All your models should be located here
|
||||
│ │ ├── simple_mnist_classifier <- Example model
|
||||
│ │ │ ├── lightning_module.py <- Contains train/val/test step methods
|
||||
│ │ │ └── models.py <- Models declarations used in lightning_module.py
|
||||
│ │ │ └── models.py <- Model declarations used in lightning_module.py
|
||||
│ │ │
|
||||
│ │ ├── simple_cifar10_classifier <- Example model
|
||||
│ │ │ ├── lightning_module.py <- Contains train/val/test step methods
|
||||
│ │ │ └── models.py <- Models declarations used in lightning_module.py
|
||||
│ │ │ └── models.py <- Model declarations used in lightning_module.py
|
||||
│ │ │
|
||||
│ │ └── ...
|
||||
│ │
|
||||
│ ├── project_config.yaml <- Project configuration
|
||||
│ ├── run_configs.yaml <- Different runs configurations
|
||||
│ ├── run_configs.yaml <- Run configurations
|
||||
│ ├── execute_sweep.py <- Special file for executing wandb sweeps (hyperparameter search)
|
||||
│ └── train.py <- Train model
|
||||
│
|
||||
@@ -54,7 +54,7 @@ The directory structure of new project looks like this:
|
||||
```
|
||||
|
||||
## Project config parameters
|
||||
#### [project_config.yaml](project/project_config.yaml):
|
||||
#### [project_config.yaml](project/project_config.yaml)
|
||||
```yaml
|
||||
num_of_gpus: -1
|
||||
|
||||
@@ -94,7 +94,9 @@ printing:
|
||||
```
|
||||
|
||||
## Run config parameters
|
||||
#### [run_configs.yaml](project/run_configs.yaml):
|
||||
#### [run_configs.yaml](project/run_configs.yaml)
|
||||
You can store many run configurations in this file.<br>
|
||||
Example run configuration:
|
||||
```yaml
|
||||
CIFAR10_CLASSIFIER_V2:
|
||||
trainer:
|
||||
@@ -117,5 +119,22 @@ CIFAR10_CLASSIFIER_V2:
|
||||
pin_memory: False
|
||||
```
|
||||
|
||||
The run configuration that you want to train with needs to be chose in [train.py](project/train.py):
|
||||
```python
|
||||
if __name__ == "__main__":
|
||||
|
||||
# --------------------------------------- CHOOSE YOUR RUN CONFIG HEREE --------------------------------------- #
|
||||
# --------------------------------------------------- ↓↓↓ ---------------------------------------------------- #
|
||||
RUN_CONFIG = "MNIST_CLASSIFIER_V1"
|
||||
# --------------------------------------------------- ↑↑↑ ---------------------------------------------------- #
|
||||
# ------------------------------------------------------------------------------------------------------------ #
|
||||
|
||||
project_conf = load_config("project_config.yaml")
|
||||
run_conf = load_config("run_configs.yaml")[RUN_CONFIG]
|
||||
|
||||
train(project_config=project_conf, run_config=run_conf)
|
||||
```
|
||||
|
||||
|
||||
## Tips
|
||||
Read [TIPS.md](TIPS.md)
|
||||
For training tips read [TIPS.md](TIPS.md)
|
||||
Reference in new issue
Block a user