Skip to content

Latest commit

 

History

History
7 lines (4 loc) · 1.92 KB

pytest_informations.md

File metadata and controls

7 lines (4 loc) · 1.92 KB

PyTest Informations

The test folder on the CL branch contains multiple PyTests that are used to validate the correctness of the provided Source Code. In general, we provide 4 tests, whereas two of those use at least one GPU. The tests not using a GPU are the one testing the functionality to change mask labels for dataset based on a mapping file as described here and the one testing the MultiHead Architecture as described here.

PyTests for Multi-Head and CL Trainers

The test located here tests the Multi-Head Trainer. Before using the CL extension for training or as a foundation for something else, we recommend to run those tests at the beginning to ensure that everything is as expected; the tests should all terminate without errors. Given the complexity and large test suite, the tests take several hours to complete. Knowing this, one can easily remove the tests once they are sucessfully run for the first time, since they do not need to be executed every time as long as no major changes have been made. During those tests, a log file is created within the folder of the trained models located in the RESULTS_FOLDER. Further, the tests use the Hippocampus and Heart data from the Medical Decathlon Challenge. Mentioning this, the user has to download those datasets before executing the test suite. The test itself plans and preprocesses these datasets, so the user does not have to do this. Last but not least, since the test suite uses a GPU, the user has to set the CUDA_VISIBLE_DEVICES if a specific GPU should be used. In case the error "Expected all tensors to be on the same device, but found at least two devices [...]" gets thrown, use export CUDA_VISIBLE_DEVICES to set the visible devices instead.