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.
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 .
dictvia parameter parser
To update/change/add a dependency in setup, please ensure at least the following conditions are met:
python_requiresvariable in setup).
global_augs_dict, defined in
torchio.transforms.intensity_transform.IntensityTransform. For example, please see the threshold/clip functionality in the
global_preprocessing_dict, defined in
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.
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
The code coverage for the tests can be obtained by the following command:
coverage run -m pytest --device cuda; coverage report -m