diff --git a/.docker/Dockerfile b/.docker/Dockerfile index 6184075d9..2e8e9a472 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -6,3 +6,5 @@ RUN wget https://github.com/Kitware/CMake/releases/download/v3.24.2/cmake-3.24.2 tar -xvf cmake-3.24.2.tar.gz && cd cmake-3.24.2 && \ ./bootstrap && make && make install +RUN echo "nameserver 8.8.8.8" >> /etc/resolv.conf + diff --git a/cavis-dnn/cavis-dnn-modelimport/src/test/java/org/deeplearning4j/nn/modelimport/keras/configurations/Keras2ModelConfigurationTest.java b/cavis-dnn/cavis-dnn-modelimport/src/test/java/org/deeplearning4j/nn/modelimport/keras/configurations/Keras2ModelConfigurationTest.java index 41f0cf0c7..a8eab6be6 100644 --- a/cavis-dnn/cavis-dnn-modelimport/src/test/java/org/deeplearning4j/nn/modelimport/keras/configurations/Keras2ModelConfigurationTest.java +++ b/cavis-dnn/cavis-dnn-modelimport/src/test/java/org/deeplearning4j/nn/modelimport/keras/configurations/Keras2ModelConfigurationTest.java @@ -33,6 +33,7 @@ import org.deeplearning4j.nn.modelimport.keras.layers.convolutional.KerasSpaceTo import org.deeplearning4j.nn.multilayer.MultiLayerNetwork; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Timeout; import org.nd4j.linalg.api.buffer.DataType; import org.nd4j.linalg.api.ndarray.INDArray; import org.nd4j.linalg.factory.Nd4j; @@ -48,6 +49,7 @@ import static org.junit.jupiter.api.Assertions.assertArrayEquals; @Slf4j +@Timeout(300) public class Keras2ModelConfigurationTest extends BaseDL4JTest { ClassLoader classLoader = getClass().getClassLoader(); @@ -231,11 +233,6 @@ public class Keras2ModelConfigurationTest extends BaseDL4JTest { runModelConfigTest("modelimport/keras/configs/keras2/simple_add_tf_keras_2.json"); } - @Override - public long getTimeoutMilliseconds() { - return 999999999L; - } - @Test public void embeddingConcatTest() throws Exception { runModelConfigTest("/modelimport/keras/configs/keras2/model_concat_embedding_sequences_tf_keras_2.json"); diff --git a/cavis-dnn/cavis-dnn-modelimport/src/test/java/org/deeplearning4j/nn/modelimport/keras/configurations/KerasModelImportTest.java b/cavis-dnn/cavis-dnn-modelimport/src/test/java/org/deeplearning4j/nn/modelimport/keras/configurations/KerasModelImportTest.java index 41fa9edc5..c45b3c52b 100644 --- a/cavis-dnn/cavis-dnn-modelimport/src/test/java/org/deeplearning4j/nn/modelimport/keras/configurations/KerasModelImportTest.java +++ b/cavis-dnn/cavis-dnn-modelimport/src/test/java/org/deeplearning4j/nn/modelimport/keras/configurations/KerasModelImportTest.java @@ -32,6 +32,7 @@ import org.deeplearning4j.nn.modelimport.keras.exceptions.InvalidKerasConfigurat import org.deeplearning4j.nn.modelimport.keras.exceptions.UnsupportedKerasConfigurationException; import org.deeplearning4j.nn.multilayer.MultiLayerNetwork; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Timeout; import org.nd4j.common.resources.Resources; import org.nd4j.linalg.convolution.Convolution; import org.nd4j.linalg.factory.Nd4j; @@ -45,12 +46,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; * Test import of Keras models. */ @Slf4j +@Timeout(300) public class KerasModelImportTest extends BaseDL4JTest { - @Override - public long getTimeoutMilliseconds() { - return 9999999999999L; - } - @Test public void testH5WithoutTensorflowScope() throws Exception { MultiLayerNetwork model = loadModel("modelimport/keras/tfscope/model.h5"); diff --git a/cavis-dnn/cavis-dnn-modelimport/src/test/java/org/deeplearning4j/nn/modelimport/keras/e2e/KerasModelEndToEndTest.java b/cavis-dnn/cavis-dnn-modelimport/src/test/java/org/deeplearning4j/nn/modelimport/keras/e2e/KerasModelEndToEndTest.java index 65bac76b4..9b6797c06 100644 --- a/cavis-dnn/cavis-dnn-modelimport/src/test/java/org/deeplearning4j/nn/modelimport/keras/e2e/KerasModelEndToEndTest.java +++ b/cavis-dnn/cavis-dnn-modelimport/src/test/java/org/deeplearning4j/nn/modelimport/keras/e2e/KerasModelEndToEndTest.java @@ -44,10 +44,7 @@ import org.deeplearning4j.nn.modelimport.keras.utils.KerasModelUtils; import org.deeplearning4j.nn.multilayer.MultiLayerNetwork; import org.deeplearning4j.nn.transferlearning.FineTuneConfiguration; import org.deeplearning4j.nn.transferlearning.TransferLearning; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.*; import org.junit.jupiter.api.io.TempDir; import org.nd4j.linalg.activations.Activation; import org.nd4j.linalg.activations.IActivation; @@ -78,6 +75,7 @@ import static org.junit.jupiter.api.Assertions.*; * @author dave@skymind.io, Max Pumperla */ @Slf4j +@Timeout(300) public class KerasModelEndToEndTest extends BaseDL4JTest { private static final String GROUP_ATTR_INPUTS = "inputs"; private static final String GROUP_ATTR_OUTPUTS = "outputs"; @@ -93,11 +91,6 @@ public class KerasModelEndToEndTest extends BaseDL4JTest { @TempDir public File testDir; - @Override - public long getTimeoutMilliseconds() { - return 900000000L; //Most benchmarks should run very quickly; large timeout is to avoid issues with unusually slow download of test resources - } - @Test public void fileNotFoundEndToEnd() throws Exception { String modelPath = "modelimport/keras/examples/foo/bar.h5"; diff --git a/cavis-dnn/cavis-dnn-modelimport/src/test/java/org/deeplearning4j/nn/modelimport/keras/weights/KerasWeightSettingTests.java b/cavis-dnn/cavis-dnn-modelimport/src/test/java/org/deeplearning4j/nn/modelimport/keras/weights/KerasWeightSettingTests.java index 9de2cb73a..b40eb37c1 100644 --- a/cavis-dnn/cavis-dnn-modelimport/src/test/java/org/deeplearning4j/nn/modelimport/keras/weights/KerasWeightSettingTests.java +++ b/cavis-dnn/cavis-dnn-modelimport/src/test/java/org/deeplearning4j/nn/modelimport/keras/weights/KerasWeightSettingTests.java @@ -29,6 +29,7 @@ import org.deeplearning4j.nn.modelimport.keras.KerasModel; import org.deeplearning4j.nn.modelimport.keras.layers.convolutional.KerasSpaceToDepth; import org.deeplearning4j.nn.multilayer.MultiLayerNetwork; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Timeout; import org.junit.jupiter.api.io.TempDir; import org.nd4j.linalg.api.ndarray.INDArray; import org.nd4j.linalg.factory.Nd4j; @@ -45,16 +46,12 @@ import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertEquals; @Slf4j +@Timeout(300) public class KerasWeightSettingTests extends BaseDL4JTest { @TempDir private File testDir; - @Override - public long getTimeoutMilliseconds() { - return 9999999L; - } - @Test public void testSimpleLayersWithWeights() throws Exception { int[] kerasVersions = new int[]{1, 2};