Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Linardos/GaNDLF
Browse files Browse the repository at this point in the history
  • Loading branch information
Linardos committed Sep 9, 2024
2 parents 3812249 + 20a83c7 commit 42c8b0b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 26 deletions.
4 changes: 2 additions & 2 deletions docs/customize.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ This file contains mid-level information regarding various parameters that can b
- These are various parameters that control the overall training process.
- `verbose`: generate verbose messages on console; generally used for debugging.
- `batch_size`: batch size to be used for training.
- `in_memory`: this is to enable or disable lazy loading. If set to True, all data is loaded on RAM once during data loading, resulting in faster training. If set to False, data gets read into RAM on-the-go when needed, which slows down training but lessens the memory load. The latter is recommended if the user's RAM has limited capacity.
- `in_memory`: this is to enable or disable lazy loading. If set to `True`, all data is loaded onto the RAM at once during the construction of the dataloader (either training/validation/testing), thus resulting in faster training. If set to `False`, data gets read into RAM on-the-go when needed (also called ["lazy loading"](https://en.wikipedia.org/wiki/Lazy_loading)), which slows down training but lessens the memory load. The latter is recommended if the user's RAM has limited capacity.
- `num_epochs`: number of epochs to train for.
- `patience`: number of epochs to wait for improvement before early stopping.
- `patience`: number of epochs to wait for improvement in the validation loss before early stopping.
- `learning_rate`: learning rate to be used for training.
- `scheduler`: learning rate scheduler to be used for training, more details are [here](https://github.com/mlcommons/GaNDLF/blob/master/GANDLF/schedulers/__init__.py); can take the following sub-parameters:
- `type`: `triangle`, `triangle_modified`, `exp`, `step`, `reduce-on-plateau`, `cosineannealing`, `triangular`, `triangular2`, `exp_range`
Expand Down
36 changes: 12 additions & 24 deletions docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,70 +32,58 @@ First, instantiate your environment
(venv_gandlf) $> ### subsequent commands go here
```

You may install pytorch to be compatible with CUDA, ROCm, or CPU-only. An exhaustive list of PyTorch installations can be found here: https://pytorch.org/get-started/previous-versions/#v210
You may install pytorch to be compatible with CUDA, ROCm, or CPU-only. An exhaustive list of PyTorch installations for the specific version compatible with GaNDLF can be found here: https://pytorch.org/get-started/previous-versions/#v231
Use one of the following depending on your needs:
- CUDA 12.1
```bash
pip install torch==2.2.1 torchvision==0.17.1 torchaudio==2.2.1 --index-url https://download.pytorch.org/whl/cu121
```
- CUDA 11.8
```bash
pip install torch==2.2.1 torchvision==0.17.1 torchaudio==2.2.1 --index-url https://download.pytorch.org/whl/cu118
```
- ROCm 5.7
```bash
pip install torch==2.2.1 torchvision==0.17.1 torchaudio==2.2.1 --index-url https://download.pytorch.org/whl/rocm5.7
```
- CPU-only
```bash
pip install torch==2.2.1 torchvision==0.17.1 torchaudio==2.2.1 --index-url https://download.pytorch.org/whl/cpu
(venv_gandlf) $> pip install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 --index-url https://download.pytorch.org/whl/cu121
```

### Optional Dependencies

The following dependencies are **optional**, and are only needed to access specific features of GaNDLF.

```bash
pip install openvino-dev==2023.0.1 # [OPTIONAL] to generate post-training optimized models for inference
pip install mlcube_docker # [OPTIONAL] to deploy GaNDLF models as MLCube-compliant Docker containers
(venv_gandlf) $> pip install openvino-dev==2023.0.1 # [OPTIONAL] to generate post-training optimized models for inference
(venv_gandlf) $> pip install mlcube_docker # [OPTIONAL] to deploy GaNDLF models as MLCube-compliant Docker containers
```

### Install from Package Managers

This option is recommended for most users, and allows for the quickest way to get started with GaNDLF.

```bash
pip install gandlf # this will give you the latest stable release
(venv_gandlf) $> pip install gandlf # this will give you the latest stable release
```
You can also use conda
```bash
conda install -c conda-forge gandlf -y
(venv_gandlf) $> conda install -c conda-forge gandlf -y
```

If you are interested in running the latest version of GaNDLF, you can install the nightly build by running the following command:

```bash
pip install --pre gandlf
(venv_gandlf) $> pip install --pre gandlf
```

You can also use conda
```bash
conda install -c conda-forge/label/gandlf_dev -c conda-forge gandlf -y
(venv_gandlf) $> conda install -c conda-forge/label/gandlf_dev -c conda-forge gandlf -y
```

### Install from Sources

Use this option if you want to [contribute to GaNDLF](https://github.com/mlcommons/GaNDLF/blob/master/CONTRIBUTING.md), or are interested to make other code-level changes for your own use.

```bash
git clone https://github.com/mlcommons/GaNDLF.git
cd GaNDLF
pip install -e .
(venv_gandlf) $> git clone https://github.com/mlcommons/GaNDLF.git
(venv_gandlf) $> cd GaNDLF
(venv_gandlf) $> pip install -e .
```

Test your installation:
```bash
gandlf --version
(venv_gandlf) $> gandlf verify-install
```

## Docker Installation
Expand Down

0 comments on commit 42c8b0b

Please sign in to comment.