GaNDLF

For any new feature, please ensure the corresponding option in the sample configuration is added, so that others can review/use/extend it as needed.

Environment

Before starting to work on the code-level on GaNDLF, please follow the installation instructions to get the environment ready. Once that’s done, please install GaNDLF from the source code using the following commands (this can be skipped if you have installed from sources):

# continue from previous shell
(venv_gandlf) $> git clone https://github.com/mlcommons/GaNDLF.git
cd GaNDLF
pip install -e .

Back To Top ↑

Overall Architecture

Back To Top ↑

Dependency Management

To update/change/add a dependency in setup, please ensure at least the following conditions are met:

Adding Models

Back To Top ↑

Adding Augmentation Transformations

Back To Top ↑

Adding Preprocessing functionality

Back To Top ↑

Adding Training Functionality

Back To Top ↑

Adding Inference Functionality

Back To Top ↑

Update Tests

Once you have made changes to functionality, it is imperative that the unit tests be updated to cover the new code. Please see the full testing suite for details and examples.

Back To Top ↑

Run Tests

Once you have the virtual environment set up, tests can be run using the following command:

pytest --device cuda # can be cuda or cpu, defaults to cpu

Any failures will be reported in the file ${GaNDLF_HOME}/testing/failures.log.

Back To Top ↑

Code coverage

The code coverage for the tests can be obtained by the following command:

coverage run -m pytest --device cuda; coverage report -m

Back To Top ↑