diff --git a/README.md b/README.md index 7efce27..108534d 100644 --- a/README.md +++ b/README.md @@ -276,7 +276,7 @@ python run.py trainer.weights_summary="full" python run.py +trainer.profiler="simple" # raise exception, if any of the parameters or the loss are NaN or +/-inf -python run.py trainer.terminate_on_nan=true +python run.py +trainer.terminate_on_nan=true # try overfitting to 1 batch python run.py +trainer.overfit_batches=1 trainer.max_epochs=20 @@ -320,7 +320,7 @@ python run.py -m datamodule.batch_size=32,64,128 model.lr=0.001,0.0005
Create a sweep over hyperparameters with Optuna -> Using [Optuna Sweeper](https://hydra.cc/docs/next/plugins/optuna_sweeper) plugin doesn't require you to code any boilerplate into your pipeline, everything is defined in a [single config file](configs/config_optuna.yaml)! +> Using [Optuna Sweeper](https://hydra.cc/docs/next/plugins/optuna_sweeper) plugin doesn't require you to code any boilerplate into your pipeline, everything is defined in a [single config file](configs/hparams_search/mnist_optuna.yaml)! ```yaml # this will run hyperparameter search defined in `configs/hparams_search/mnist_optuna.yaml` # over chosen experiment config @@ -435,14 +435,10 @@ defaults: - callbacks: default.yaml # set this to null if you don't want to use callbacks - logger: null # set logger here or use command line (e.g. `python run.py logger=wandb`) - - experiment: null - - hparams_search: null - - hydra: default.yaml - # enable color logging - - override hydra/hydra_logging: colorlog - - override hydra/job_logging: colorlog + - experiment: null + - hparams_search: null # path to original working directory @@ -456,13 +452,6 @@ work_dir: ${hydra:runtime.cwd} data_dir: ${work_dir}/data/ -# use `python run.py debug=true` for easy debugging! -# this will run 1 train, val and test loop with only 1 batch -# equivalent to running `python run.py trainer.fast_dev_run=true` -# (this is placed here just for easier access from command line) -debug: False - - # pretty print config at the start of the run using Rich library print_config: True @@ -516,7 +505,7 @@ datamodule:
-Advanced example +Show advanced example ```yaml # to execute this experiment run: @@ -642,7 +631,7 @@ defaults: # choose metric which will be optimized by Optuna -optimized_metric: "val/acc_best" +optimized_metric: "val/acc" hydra: @@ -697,8 +686,8 @@ hydra:
-Next, you can execute it with: `python run.py hparams_search=hparams_config_name`.
-Using this approach doesn't require you to add any boilerplate into your pipeline, everything is defined in a single config file! You can use different optimization frameworks integrated with Hydra, like Optuna, Ax or Nevergrad. +Next, you can execute it with: `python run.py -m hparams_search=mnist_optuna`
+Using this approach doesn't require you to add any boilerplate into your pipeline, everything is defined in a single config file. You can use different optimization frameworks integrated with Hydra, like Optuna, Ax or Nevergrad.

@@ -753,18 +742,6 @@ You can run DDP on mnist example with 4 GPUs like this: python run.py trainer.gpus=4 +trainer.accelerator="ddp" ``` ⚠️ When using DDP you have to be careful how you write your models - learn more [here](https://pytorch-lightning.readthedocs.io/en/latest/advanced/multi_gpu.html). -
@@ -790,28 +767,7 @@ You can easily remove any of those by modifying [run.py](run.py) and [src/train. ## Best Practices -