More test fixes

Signed-off-by: brian <brian@brutex.de>
master
Brian Rosenberger 2022-10-11 10:16:51 +02:00
parent 21e7f1c8b8
commit 011ce913c9
4 changed files with 5 additions and 20 deletions

View File

@ -30,6 +30,7 @@ import org.deeplearning4j.nn.conf.WorkspaceMode;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.api.io.TempDir; import org.junit.jupiter.api.io.TempDir;
import org.nd4j.linalg.api.buffer.DataType; import org.nd4j.linalg.api.buffer.DataType;
import org.nd4j.linalg.api.ndarray.INDArray; import org.nd4j.linalg.api.ndarray.INDArray;
@ -42,13 +43,9 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
@Slf4j @Slf4j
@Timeout(300)
public class TsneTest extends BaseDL4JTest { public class TsneTest extends BaseDL4JTest {
@Override
public long getTimeoutMilliseconds() {
return 180000L;
}
@TempDir @TempDir
public File testDir; public File testDir;

View File

@ -78,11 +78,6 @@ import static org.junit.jupiter.api.Assertions.*;
@Timeout(240) @Timeout(240)
public class ParagraphVectorsTest extends BaseDL4JTest { public class ParagraphVectorsTest extends BaseDL4JTest {
@Override
public long getTimeoutMilliseconds() {
return isIntegrationTests() ? 600_000 : 240_000;
}
@TempDir @TempDir
public File testDir; public File testDir;

View File

@ -60,14 +60,10 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
@Slf4j @Slf4j
@Timeout(300)
public class Word2VecTestsSmall extends BaseDL4JTest { public class Word2VecTestsSmall extends BaseDL4JTest {
WordVectors word2vec; WordVectors word2vec;
@Override
public long getTimeoutMilliseconds() {
return isIntegrationTests() ? 240000 : 60000;
}
@BeforeEach @BeforeEach
public void setUp() throws Exception { public void setUp() throws Exception {
word2vec = WordVectorSerializer.readWord2VecModel(new ClassPathResource("vec.bin").getFile()); word2vec = WordVectorSerializer.readWord2VecModel(new ClassPathResource("vec.bin").getFile());

View File

@ -34,6 +34,7 @@ import org.deeplearning4j.text.tokenization.tokenizerfactory.DefaultTokenizerFac
import org.deeplearning4j.text.tokenization.tokenizerfactory.TokenizerFactory; import org.deeplearning4j.text.tokenization.tokenizerfactory.TokenizerFactory;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.nd4j.linalg.api.ndarray.INDArray; import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.dataset.DataSet; import org.nd4j.linalg.dataset.DataSet;
import org.nd4j.common.resources.Resources; import org.nd4j.common.resources.Resources;
@ -46,13 +47,9 @@ import java.util.concurrent.atomic.AtomicInteger;
import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertArrayEquals;
@Timeout(300)
public class Word2VecDataSetIteratorTest extends BaseDL4JTest { public class Word2VecDataSetIteratorTest extends BaseDL4JTest {
@Override
public long getTimeoutMilliseconds() {
return 60000L;
}
/** /**
* Basically all we want from this test - being able to finish without exceptions. * Basically all we want from this test - being able to finish without exceptions.
*/ */