Increase default timeouts [WIP] (#407)
* Increase default test timeout to 60 sec due to slow PPC CI machines Signed-off-by: Alex Black <blacka101@gmail.com> * Fix flaky NLP test (randomly fails due to no RNG seed set) Signed-off-by: Alex Black <blacka101@gmail.com>master
parent
0a1f75a5d9
commit
75cc6e2ed7
|
@ -68,7 +68,7 @@ public abstract class BaseDL4JTest {
|
|||
* Override this method to set the default timeout for methods in the test class
|
||||
*/
|
||||
public long getTimeoutMilliseconds(){
|
||||
return 30000;
|
||||
return 60_000;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -70,7 +70,7 @@ public class NearestVertexWalker<V extends SequenceElement> implements GraphWalk
|
|||
public void reset(boolean shuffle) {
|
||||
position.set(0);
|
||||
if (shuffle) {
|
||||
log.debug("Calling shuffle() on entries...");
|
||||
log.trace("Calling shuffle() on entries...");
|
||||
// https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#The_modern_algorithm
|
||||
for (int i = order.length - 1; i > 0; i--) {
|
||||
int j = rng.nextInt(i + 1);
|
||||
|
|
|
@ -249,7 +249,7 @@ public class RandomWalker<T extends SequenceElement> implements GraphWalker<T> {
|
|||
public void reset(boolean shuffle) {
|
||||
this.position.set(0);
|
||||
if (shuffle) {
|
||||
logger.debug("Calling shuffle() on entries...");
|
||||
logger.trace("Calling shuffle() on entries...");
|
||||
// https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#The_modern_algorithm
|
||||
for (int i = order.length - 1; i > 0; i--) {
|
||||
int j = rng.nextInt(i + 1);
|
||||
|
|
|
@ -123,6 +123,7 @@ public class RandomWalkerTest extends BaseDL4JTest {
|
|||
@Test
|
||||
public void testGraphTraverseRandom2() throws Exception {
|
||||
RandomWalker<VocabWord> walker = (RandomWalker<VocabWord>) new RandomWalker.Builder<>(graph)
|
||||
.setSeed(12345)
|
||||
.setNoEdgeHandling(NoEdgeHandling.EXCEPTION_ON_DISCONNECTED).setWalkLength(20)
|
||||
.setWalkDirection(WalkDirection.FORWARD_UNIQUE)
|
||||
.setNoEdgeHandling(NoEdgeHandling.CUTOFF_ON_DISCONNECTED).build();
|
||||
|
@ -169,6 +170,7 @@ public class RandomWalkerTest extends BaseDL4JTest {
|
|||
@Test
|
||||
public void testGraphTraverseRandom4() throws Exception {
|
||||
RandomWalker<VocabWord> walker = (RandomWalker<VocabWord>) new RandomWalker.Builder<>(graphBig)
|
||||
.setSeed(12345)
|
||||
.setNoEdgeHandling(NoEdgeHandling.EXCEPTION_ON_DISCONNECTED).setWalkLength(20)
|
||||
.setWalkDirection(WalkDirection.FORWARD_UNIQUE)
|
||||
.setNoEdgeHandling(NoEdgeHandling.CUTOFF_ON_DISCONNECTED).build();
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~ Copyright (c) 2015-2018 Skymind, Inc.
|
||||
~
|
||||
~ 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.
|
||||
~
|
||||
~ 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
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
|
||||
|
||||
<configuration>
|
||||
|
||||
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
|
||||
<file>logs/application.log</file>
|
||||
<encoder>
|
||||
<pattern> %logger{15} - %message%n%xException{5}
|
||||
</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern> %logger{15} - %message%n%xException{5}
|
||||
</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<logger name="org.apache.catalina.core" level="DEBUG" />
|
||||
<logger name="org.springframework" level="DEBUG" />
|
||||
<logger name="org.deeplearning4j" level="INFO" />
|
||||
<logger name="org.datavec" level="INFO" />
|
||||
<logger name="org.nd4j" level="INFO" />
|
||||
<logger name="opennlp.uima.util" level="OFF" />
|
||||
<logger name="org.apache.uima" level="OFF" />
|
||||
<logger name="org.cleartk" level="OFF" />
|
||||
|
||||
|
||||
|
||||
<root level="ERROR">
|
||||
<appender-ref ref="STDOUT" />
|
||||
<appender-ref ref="FILE" />
|
||||
</root>
|
||||
|
||||
</configuration>
|
|
@ -55,7 +55,7 @@ public abstract class BaseND4JTest {
|
|||
* Override this method to set the default timeout for methods in the test class
|
||||
*/
|
||||
public long getTimeoutMilliseconds(){
|
||||
return 30000;
|
||||
return 60_000;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue