Dev (#129)
* remove WANDB_START_METHOD env variable, since it's no longer needed * change disable_warnings parameter to ignore_warnings * improve readme
This commit is contained in:
1 parent
e27c11c342
commit
74eb7c7e57
4 files changed
+15
-18
No files matched your search
@@ -343,21 +343,21 @@ python run.py -m 'experiment=glob(*)'
|
|||||||
|
|
||||||
|
|
||||||
## :whale: Docker
|
## :whale: Docker
|
||||||
Docker image for the template is available for download [here](https://hub.docker.com/r/ashleve/lightning-hydra).
|
I recommend the official [nvidia ngc pytorch container](https://ngc.nvidia.com/catalog/containers/nvidia:pytorch/tags) (size: 6GB, it comes with installed Apex for mixed-precision training), or "devel" version of [pytorch/pytorch](https://hub.docker.com/r/pytorch/pytorch).
|
||||||
|
|
||||||
|
Custom dockerfiles for the template are provided on branch [`dockerfiles`](https://github.com/ashleve/lightning-hydra-template/tree/dockerfiles). You can use them as a starting point for building your own images.
|
||||||
```yaml
|
```yaml
|
||||||
# download image
|
# download image
|
||||||
docker pull ashleve/lightning-hydra:latest
|
docker pull nvcr.io/nvidia/pytorch:21.03-py3
|
||||||
|
|
||||||
# run container from image
|
# run container from image with GPUs enabled
|
||||||
docker run --gpus all -it --rm ashleve/lightning-hydra
|
docker run --gpus all -it --rm nvcr.io/nvidia/pytorch:21.03-py3
|
||||||
|
```
|
||||||
# you can also build image by yourself using Dockerfile
|
```yaml
|
||||||
|
# alternatively build image by yourself using Dockerfile from the mentioned template branch
|
||||||
docker build -t lightning-hydra .
|
docker build -t lightning-hydra .
|
||||||
```
|
```
|
||||||
Dockerfiles are provided on branch [`dockerfiles`](https://github.com/ashleve/lightning-hydra-template/tree/dockerfiles). You can use them as a starting point for building your own images.<br>
|
<br><br>
|
||||||
If you want to use some popular official image instead, I recommend the [nvidia ngc pytorch container](https://ngc.nvidia.com/catalog/containers/nvidia:pytorch/tags), or "devel" version of [pytorch/pytorch](https://hub.docker.com/r/pytorch/pytorch) (this one doesn't have installed Apex for mixed-precision training).
|
|
||||||
<br><br><br>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -507,7 +507,7 @@ defaults:
|
|||||||
|
|
||||||
# we override default configurations with nulls to prevent them from loading at all
|
# we override default configurations with nulls to prevent them from loading at all
|
||||||
# instead we define all modules and their paths directly in this config,
|
# instead we define all modules and their paths directly in this config,
|
||||||
# so everything is stored in one place for more readibility
|
# so everything is stored in one place for more readability
|
||||||
|
|
||||||
seed: 12345
|
seed: 12345
|
||||||
|
|
||||||
|
|||||||
+2
-5
@@ -39,7 +39,7 @@ print_config: True
|
|||||||
|
|
||||||
|
|
||||||
# disable python warnings if they annoy you
|
# disable python warnings if they annoy you
|
||||||
disable_warnings: True
|
ignore_warnings: True
|
||||||
|
|
||||||
|
|
||||||
hydra:
|
hydra:
|
||||||
@@ -54,7 +54,4 @@ hydra:
|
|||||||
# you can set here environment variables that are universal for all users
|
# you can set here environment variables that are universal for all users
|
||||||
# for system specific variables (like data paths) it's better to use .env file!
|
# for system specific variables (like data paths) it's better to use .env file!
|
||||||
env_set:
|
env_set:
|
||||||
# currently there are some issues with running sweeps alongside wandb
|
EXAMPLE_VAR: "example_value"
|
||||||
# https://github.com/wandb/client/issues/1314
|
|
||||||
# this env var fixes that
|
|
||||||
WANDB_START_METHOD: thread
|
|
||||||
@@ -12,7 +12,7 @@ defaults:
|
|||||||
|
|
||||||
# we override default configurations with nulls to prevent them from loading at all
|
# we override default configurations with nulls to prevent them from loading at all
|
||||||
# instead we define all modules and their paths directly in this config,
|
# instead we define all modules and their paths directly in this config,
|
||||||
# so everything is stored in one place for more readibility
|
# so everything is stored in one place for more readability
|
||||||
|
|
||||||
seed: 12345
|
seed: 12345
|
||||||
|
|
||||||
|
|||||||
@@ -43,8 +43,8 @@ def extras(config: DictConfig) -> None:
|
|||||||
OmegaConf.set_struct(config, False)
|
OmegaConf.set_struct(config, False)
|
||||||
|
|
||||||
# disable python warnings if <config.disable_warnings=True>
|
# disable python warnings if <config.disable_warnings=True>
|
||||||
if config.get("disable_warnings"):
|
if config.get("ignore_warnings"):
|
||||||
log.info(f"Disabling python warnings! <config.disable_warnings=True>")
|
log.info(f"Disabling python warnings! <config.ignore_warnings=True>")
|
||||||
warnings.filterwarnings("ignore")
|
warnings.filterwarnings("ignore")
|
||||||
|
|
||||||
# set <config.trainer.fast_dev_run=True> if <config.debug=True>
|
# set <config.trainer.fast_dev_run=True> if <config.debug=True>
|
||||||
|
|||||||
Reference in new issue
Block a user