arrow-left
All pages
gitbookPowered by GitBook
1 of 1

Loading...

Testing

How to conduct a release to Maven Central

hashtag
Parameters for testing

  1. test.heap.size: The heap size used for maven surefire plugin sub processes

  2. test.offheap.size: The off heap size used for maven surefire sub processes. This is very important for

    configuration (especially on gpu systems)

hashtag
Test resources

In order to run the deeplearning4j tests, many pretrained models and other resources are required. Ensure as a dependency on your classpath. It is a big repository that needs to be mvn clean installed in order to run the tests properly. You can do this by adding -Ptestresources to your test execution when running the tests from maven.

hashtag
Test profiles for enabling nd4j backends

When running deeplearning4j's tests, there are 2 main profiles to be aware of: nd4j-tests-cpu and nd4j-tests-cuda. These each enable running cpu or gpu tests respectively across the whole code base. Please ensure one of these is selected when running tests.

testresources: Used to add the test resources used for nd4j.

hashtag
Test categories

Deeplearning4j uses' junit 5's tags to categorize tests in to different types. All of the tag names used throughout the code base can be found Nd4j-common-tests is included as a dependency for all tests and has a few reusable utilities used throughout the code base for tests. This makes it a great location to put common utilities we want to use throughout the code base. The tag names are mainly there to categorize tests that can take longer or use more resources so we can avoid running those dynamically depending on the size of the machine we are running tests on.

hashtag
GPUs and multi threaded boxes

Note when running gpu tests on a box with more than 1 gpu, it can/will run out of memory if test.heap.size is at not at least 4g. Also of note, is when running tests

dl4j test resourcesarrow-up-right
herearrow-up-right