You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ch...@apache.org on 2019/01/22 13:43:23 UTC

[ignite] branch master updated: IGNITE-11028: [ML] Flaky test(KeepBinaryTest)

This is an automated email from the ASF dual-hosted git repository.

chief pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new 5cc1d73  IGNITE-11028: [ML] Flaky test(KeepBinaryTest)
5cc1d73 is described below

commit 5cc1d731ae11fbea4b68178f096b89aa24b4f8f5
Author: YuriBabak <y....@gmail.com>
AuthorDate: Tue Jan 22 16:43:06 2019 +0300

    IGNITE-11028: [ML] Flaky test(KeepBinaryTest)
    
    This closes #5882
---
 .../ml/src/test/java/org/apache/ignite/ml/common/KeepBinaryTest.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/ml/src/test/java/org/apache/ignite/ml/common/KeepBinaryTest.java b/modules/ml/src/test/java/org/apache/ignite/ml/common/KeepBinaryTest.java
index 3af62bd..1d1103f 100644
--- a/modules/ml/src/test/java/org/apache/ignite/ml/common/KeepBinaryTest.java
+++ b/modules/ml/src/test/java/org/apache/ignite/ml/common/KeepBinaryTest.java
@@ -88,8 +88,9 @@ public class KeepBinaryTest extends GridCommonAbstractTest {
 
         KMeansModel kmdl = trainer.fit(datasetBuilder, featureExtractor, lbExtractor);
 
-        assertTrue(kmdl.predict(VectorUtils.num2Vec(0.0)) == 0);
-        assertTrue(kmdl.predict(VectorUtils.num2Vec(10.0)) == 1);
+        Integer zeroCentre = kmdl.predict(VectorUtils.num2Vec(0.0));
+
+        assertTrue(kmdl.getCenters()[zeroCentre].get(0) == 0);
     }
 
     /**