From 569a46f87d3aef2a6365eb9740f90aec3e80491d Mon Sep 17 00:00:00 2001 From: Alex Black Date: Wed, 5 Feb 2020 17:07:36 +1100 Subject: [PATCH] Fixes (#213) * Increase timeouts for 2 tests occasionally failing on CI Signed-off-by: AlexDBlack * Explicitly set character encoding via argline for maven surefire tests Signed-off-by: AlexDBlack * CUDA gradient check timeout fix + simple rnn masking fix Signed-off-by: AlexDBlack --- arbiter/pom.xml | 2 +- datavec/pom.xml | 2 +- .../GradientCheckTestsMasking.java | 32 +++++++++++-------- .../deeplearning4j-dataimport-solrj/pom.xml | 2 +- .../deeplearning4j-modelexport-solr/pom.xml | 2 +- .../pom.xml | 2 +- .../clustering/kmeans/KMeansTest.java | 5 +++ .../nn/layers/recurrent/SimpleRnn.java | 6 ++++ deeplearning4j/pom.xml | 2 +- .../nd4j-backend-impls/nd4j-cuda/pom.xml | 2 +- nd4j/nd4j-backends/nd4j-backend-impls/pom.xml | 2 +- .../nd4j-tests-tensorflow/pom.xml | 4 +-- nd4j/nd4j-backends/nd4j-tests/pom.xml | 2 +- .../java/org/nd4j/autodiff/TestOpMapping.java | 5 +++ nd4j/nd4j-serde/nd4j-aeron/pom.xml | 2 +- nd4j/nd4j-serde/nd4j-arrow/pom.xml | 2 +- nd4j/nd4j-serde/nd4j-gson/pom.xml | 2 +- nd4j/nd4j-serde/nd4j-kryo/pom.xml | 2 +- 18 files changed, 49 insertions(+), 29 deletions(-) diff --git a/arbiter/pom.xml b/arbiter/pom.xml index 364c6d904..93f877968 100644 --- a/arbiter/pom.xml +++ b/arbiter/pom.xml @@ -192,7 +192,7 @@ maven-surefire-plugin ${maven-surefire-plugin.version} - -Ddtype=double -Xmx3024m -Xms3024m + -Ddtype=double -Dfile.encoding=UTF-8 -Xmx3024m -Xms3024m *.java diff --git a/deeplearning4j/deeplearning4j-modelexport-solr/pom.xml b/deeplearning4j/deeplearning4j-modelexport-solr/pom.xml index 02ce30a40..383eb1c8c 100644 --- a/deeplearning4j/deeplearning4j-modelexport-solr/pom.xml +++ b/deeplearning4j/deeplearning4j-modelexport-solr/pom.xml @@ -33,7 +33,7 @@ org.apache.maven.plugins maven-surefire-plugin - -Ddtype=float -Xmx8g -Dtest.solr.allowed.securerandom=NativePRNG + -Ddtype=float -Dfile.encoding=UTF-8 -Xmx8g -Dtest.solr.allowed.securerandom=NativePRNG *.java diff --git a/deeplearning4j/deeplearning4j-nearestneighbors-parent/deeplearning4j-nearestneighbor-server/pom.xml b/deeplearning4j/deeplearning4j-nearestneighbors-parent/deeplearning4j-nearestneighbor-server/pom.xml index 2d4a4da14..911432cf0 100644 --- a/deeplearning4j/deeplearning4j-nearestneighbors-parent/deeplearning4j-nearestneighbor-server/pom.xml +++ b/deeplearning4j/deeplearning4j-nearestneighbors-parent/deeplearning4j-nearestneighbor-server/pom.xml @@ -36,7 +36,7 @@ org.apache.maven.plugins maven-surefire-plugin - -Ddtype=float -Xmx8g + -Ddtype=float -Dfile.encoding=UTF-8 -Xmx8g *.java diff --git a/deeplearning4j/deeplearning4j-nearestneighbors-parent/nearestneighbor-core/src/test/java/org/deeplearning4j/clustering/kmeans/KMeansTest.java b/deeplearning4j/deeplearning4j-nearestneighbors-parent/nearestneighbor-core/src/test/java/org/deeplearning4j/clustering/kmeans/KMeansTest.java index 2f2619e78..abbfa04bc 100644 --- a/deeplearning4j/deeplearning4j-nearestneighbors-parent/nearestneighbor-core/src/test/java/org/deeplearning4j/clustering/kmeans/KMeansTest.java +++ b/deeplearning4j/deeplearning4j-nearestneighbors-parent/nearestneighbor-core/src/test/java/org/deeplearning4j/clustering/kmeans/KMeansTest.java @@ -38,6 +38,11 @@ public class KMeansTest extends BaseDL4JTest { private boolean[] useKMeansPlusPlus = {true, false}; + @Override + public long getTimeoutMilliseconds() { + return 60000L; + } + @Test public void testKMeans() { Nd4j.getRandom().setSeed(7); diff --git a/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/layers/recurrent/SimpleRnn.java b/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/layers/recurrent/SimpleRnn.java index 044f444c0..87d88efcb 100644 --- a/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/layers/recurrent/SimpleRnn.java +++ b/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/layers/recurrent/SimpleRnn.java @@ -282,6 +282,12 @@ public class SimpleRnn extends BaseRecurrentLayer true false - -Ddtype=float -Xmx8g + -Ddtype=float -Dfile.encoding=UTF-8 -Xmx8g *.java diff --git a/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cuda/pom.xml b/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cuda/pom.xml index d98c7a6d1..36f25d636 100644 --- a/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cuda/pom.xml +++ b/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cuda/pom.xml @@ -60,7 +60,7 @@ Maximum heap size was set to 6g, as a minimum required value for tests run. Depending on a build machine, default value is not always enough. --> - -Ddtype=float -Xmx8g + -Ddtype=float -Dfile.encoding=UTF-8 -Xmx8g diff --git a/nd4j/nd4j-backends/nd4j-backend-impls/pom.xml b/nd4j/nd4j-backends/nd4j-backend-impls/pom.xml index 86ce07ff7..c6da5e6f0 100644 --- a/nd4j/nd4j-backends/nd4j-backend-impls/pom.xml +++ b/nd4j/nd4j-backends/nd4j-backend-impls/pom.xml @@ -117,7 +117,7 @@ Maximum heap size was set to 8g, as a minimum required value for tests run. Depending on a build machine, default value is not always enough. --> - -Ddtype=float -Xmx8g + -Ddtype=float -Dfile.encoding=UTF-8 -Xmx8g diff --git a/nd4j/nd4j-backends/nd4j-tests-tensorflow/pom.xml b/nd4j/nd4j-backends/nd4j-tests-tensorflow/pom.xml index 5f5c5fa90..6a3cc6eda 100644 --- a/nd4j/nd4j-backends/nd4j-tests-tensorflow/pom.xml +++ b/nd4j/nd4j-backends/nd4j-tests-tensorflow/pom.xml @@ -224,7 +224,7 @@ Depending on a build machine, default value is not always enough. --> false - -Xmx6g + -Xmx6g -Dfile.encoding=UTF-8 @@ -296,7 +296,7 @@ Maximum heap size was set to 6g, as a minimum required value for tests run. Depending on a build machine, default value is not always enough. --> - -Xmx6g + -Xmx6g -Dfile.encoding=UTF-8 false false diff --git a/nd4j/nd4j-backends/nd4j-tests/pom.xml b/nd4j/nd4j-backends/nd4j-tests/pom.xml index 9d098189f..8d250629a 100644 --- a/nd4j/nd4j-backends/nd4j-tests/pom.xml +++ b/nd4j/nd4j-backends/nd4j-tests/pom.xml @@ -252,7 +252,7 @@ Maximum heap size was set to 6g, as a minimum required value for tests run. Depending on a build machine, default value is not always enough. --> - -Ddtype=float -Xmx6g + -Ddtype=float -Dfile.encoding=UTF-8 -Xmx6g diff --git a/nd4j/nd4j-backends/nd4j-tests/src/test/java/org/nd4j/autodiff/TestOpMapping.java b/nd4j/nd4j-backends/nd4j-tests/src/test/java/org/nd4j/autodiff/TestOpMapping.java index ab56ae281..e88f195c0 100644 --- a/nd4j/nd4j-backends/nd4j-tests/src/test/java/org/nd4j/autodiff/TestOpMapping.java +++ b/nd4j/nd4j-backends/nd4j-tests/src/test/java/org/nd4j/autodiff/TestOpMapping.java @@ -44,6 +44,11 @@ public class TestOpMapping extends BaseNd4jTest { return 'c'; } + @Override + public long getTimeoutMilliseconds() { + return 60000L; + } + @Test public void testOpMappingCoverage() throws Exception { Reflections reflections = new Reflections("org.nd4j"); diff --git a/nd4j/nd4j-serde/nd4j-aeron/pom.xml b/nd4j/nd4j-serde/nd4j-aeron/pom.xml index 87e9347dd..827afb23a 100644 --- a/nd4j/nd4j-serde/nd4j-aeron/pom.xml +++ b/nd4j/nd4j-serde/nd4j-aeron/pom.xml @@ -91,7 +91,7 @@ For testing large zoo models, this may not be enough (so comment it out). --> - -Ddtype=float -Xmx8g + -Ddtype=float -Dfile.encoding=UTF-8 -Xmx8g diff --git a/nd4j/nd4j-serde/nd4j-arrow/pom.xml b/nd4j/nd4j-serde/nd4j-arrow/pom.xml index ddadc2df1..3a768c1a5 100644 --- a/nd4j/nd4j-serde/nd4j-arrow/pom.xml +++ b/nd4j/nd4j-serde/nd4j-arrow/pom.xml @@ -109,7 +109,7 @@ For testing large zoo models, this may not be enough (so comment it out). --> - -Ddtype=float -Xmx8g + -Ddtype=float -Dfile.encoding=UTF-8 -Xmx8g diff --git a/nd4j/nd4j-serde/nd4j-gson/pom.xml b/nd4j/nd4j-serde/nd4j-gson/pom.xml index f7215436a..f488bfde5 100644 --- a/nd4j/nd4j-serde/nd4j-gson/pom.xml +++ b/nd4j/nd4j-serde/nd4j-gson/pom.xml @@ -100,7 +100,7 @@ For testing large zoo models, this may not be enough (so comment it out). --> - -Ddtype=float -Xmx8g + -Ddtype=float -Dfile.encoding=UTF-8 -Xmx8g diff --git a/nd4j/nd4j-serde/nd4j-kryo/pom.xml b/nd4j/nd4j-serde/nd4j-kryo/pom.xml index 25acac26f..02970d5e2 100644 --- a/nd4j/nd4j-serde/nd4j-kryo/pom.xml +++ b/nd4j/nd4j-serde/nd4j-kryo/pom.xml @@ -220,7 +220,7 @@ Maximum heap size was set to 6g, as a minimum required value for tests run. Depending on a build machine, default value is not always enough. --> - -Ddtype=float -Xmx6g + -Ddtype=float -Dfile.encoding=UTF-8 -Xmx6g