More test fixes

Signed-off-by: brian <brian@brutex.de>
master
Brian Rosenberger 2022-10-14 12:11:15 +02:00
parent 4718195681
commit 5eb3d1c33d
16 changed files with 57 additions and 80 deletions

View File

@ -0,0 +1,49 @@
/*
*
* ******************************************************************************
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://www.apache.org/licenses/LICENSE-2.0.
* *
* * See the NOTICE file distributed with this work for additional
* * information regarding copyright ownership.
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* * License for the specific language governing permissions and limitations
* * under the License.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*
*/
pipeline {
agent {
dockerfile {
filename 'Dockerfile'
dir '.docker'
label 'linux && docker'
//additionalBuildArgs '--build-arg version=1.0.2'
//args '--gpus all'
}
}
stages {
stage('publish-linux-cpu') {
environment {
MAVEN = credentials('Internal Archiva')
OSSRH = credentials('OSSRH')
}
steps {
withGradle {
sh 'sh ./gradlew publish -x test -PCAVIS_CHIP=cpu \
-Pmavenuser=$MAVEN_USR -Pmavenpass=$MAVEN_PSW \
-PossrhUsername=$OSSRH_USR -PossrhPassword=$OSSRH_PSW'
}
}
}
}
}

View File

@ -19,10 +19,7 @@ package org.deeplearning4j.clustering.kdtree;
import lombok.val;
import org.deeplearning4j.BaseDL4JTest;
import org.joda.time.Duration;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.*;
import org.nd4j.linalg.api.buffer.DataType;
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.factory.Nd4j;
@ -44,12 +41,9 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
/**
* Created by agibsonccc on 1/1/15.
*/
@Timeout(120)
public class KDTreeTest extends BaseDL4JTest {
@Override
public long getTimeoutMilliseconds() {
return 120000L;
}
private KDTree kdTree;

View File

@ -22,6 +22,7 @@ import org.deeplearning4j.Performance;
import org.deeplearning4j.clustering.algorithm.Distance;
import org.deeplearning4j.clustering.cluster.*;
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;
@ -34,15 +35,11 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
/**
* Created by agibsonccc on 7/2/17.
*/
@Timeout(120)
public class KMeansTest extends BaseDL4JTest {
private boolean[] useKMeansPlusPlus = {true, false};
@Override
public long getTimeoutMilliseconds() {
return 60000L;
}
@Test
public void testKMeans() {
Nd4j.getRandom().setSeed(7);

View File

@ -33,11 +33,6 @@ import static org.junit.jupiter.api.Assertions.*;
*/
public class SPTreeTest extends BaseDL4JTest {
@Override
public long getTimeoutMilliseconds() {
return 120000L;
}
@BeforeEach
public void setUp() {
DataTypeUtil.setDTypeForContext(DataType.DOUBLE);

View File

@ -29,11 +29,6 @@ import java.util.Map;
public class BaseSparkKryoTest extends BaseSparkTest {
@Override
public long getTimeoutMilliseconds() {
return 120000L;
}
@Override
public JavaSparkContext getContext() {
if (sc != null) {

View File

@ -56,11 +56,6 @@ public abstract class BaseSparkTest extends BaseDL4JTest implements Serializable
protected transient DataSet data;
protected transient JavaRDD<DataSet> sparkData;
@Override
public long getTimeoutMilliseconds() {
return 120000L;
}
@BeforeEach
public void before() {

View File

@ -53,11 +53,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
@Slf4j
public class TestSparkDl4jMultiLayer extends BaseSparkTest {
@Override
public long getTimeoutMilliseconds() {
return 120000L;
}
@Override
public DataType getDataType() {
return DataType.FLOAT;

View File

@ -98,12 +98,6 @@ public class TestSparkMultiLayerParameterAveraging extends BaseSparkTest {
@TempDir
public File testDir;
@Override
public long getTimeoutMilliseconds() {
return 120000L;
}
@Override
public DataType getDefaultFPDataType() {
return DataType.FLOAT;

View File

@ -31,6 +31,7 @@ import org.deeplearning4j.spark.impl.common.CountPartitionsFunction;
import org.deeplearning4j.spark.impl.repartitioner.DefaultRepartitioner;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import scala.Tuple2;
import java.util.ArrayList;
@ -42,13 +43,9 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
@Timeout(300)
public class TestRepartitioning extends BaseSparkTest {
@Override
public long getTimeoutMilliseconds() {
return isIntegrationTests() ? 240000 : 60000;
}
@Test
public void testRepartitioning() {
if(Platform.isWindows()) {

View File

@ -35,11 +35,6 @@ import java.util.Map;
public abstract class BaseSparkTest extends BaseDL4JTest implements Serializable {
protected transient JavaSparkContext sc;
@Override
public long getTimeoutMilliseconds() {
return 120000L;
}
@BeforeEach
public void before() throws Exception {
sc = getContext();

View File

@ -54,12 +54,6 @@ public abstract class BaseSparkTest extends BaseDL4JTest implements Serializable
protected transient DataSet data;
protected transient JavaRDD<DataSet> sparkData;
@Override
public long getTimeoutMilliseconds() {
return 120000L;
}
@BeforeEach
public void before() {

View File

@ -78,11 +78,6 @@ public class GradientSharingTrainingTest extends BaseSparkTest {
@TempDir
public File testDir;
@Override
public long getTimeoutMilliseconds() {
return 180000L;
}
@Test
public void trainSanityCheck() throws Exception {

View File

@ -40,11 +40,6 @@ import java.io.IOException;
public class TestTransferStatsCollection extends BaseDL4JTest {
@Override
public long getTimeoutMilliseconds() {
return 90_000L;
}
@Test
public void test() throws IOException {

View File

@ -41,6 +41,7 @@ import org.deeplearning4j.ui.model.storage.InMemoryStatsStorage;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.nd4j.linalg.activations.Activation;
import org.nd4j.linalg.dataset.api.iterator.DataSetIterator;
import org.nd4j.common.function.Function;
@ -58,13 +59,9 @@ import static org.junit.jupiter.api.Assertions.*;
@Slf4j
//@Ignore
@Timeout(600)
public class TestVertxUIManual extends BaseDL4JTest {
@Override
public long getTimeoutMilliseconds() {
return 3600_000L;
}
@AfterAll
public void shutdownServer() throws InterruptedException {
UIServer.getInstance().stop();

View File

@ -37,11 +37,6 @@ import java.io.File;
//@Ignore("Times out too often")
public class MiscTests extends BaseDL4JTest {
@Override
public long getTimeoutMilliseconds() {
return Long.MAX_VALUE;
}
@Test
public void testTransferVGG() throws Exception {
DataSet ds = new DataSet();

View File

@ -57,11 +57,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
//@Ignore("Times out too often")
public class TestImageNet extends BaseDL4JTest {
@Override
public long getTimeoutMilliseconds() {
return 90000L;
}
@Override
public DataType getDataType(){
return DataType.FLOAT;