Shafaq-Siddiqi commented on a change in pull request #976: URL: https://github.com/apache/systemml/pull/976#discussion_r442314756
########## File path: src/test/java/org/apache/sysds/test/functions/builtin/BuiltinGMMTest.java ########## @@ -44,69 +45,66 @@ addTestConfiguration(TEST_NAME, new TestConfiguration(TEST_CLASS_DIR, TEST_NAME, new String[] {"B"})); } - @Test public void testGMMM1() { runGMMTest(3, "VVV", "random", 100, 0.000001, 2, LopProperties.ExecType.CP); } + @Test public void testGMMM1() { runGMMTest(3, "VVV", "random", 100, 0.000001, true, LopProperties.ExecType.CP); } @Test public void testGMMM2() { - runGMMTest(3, "EEE", "random", 100, 0.000001, 2, LopProperties.ExecType.CP); + runGMMTest(3, "EEE", "random", 100, 0.000001, true, LopProperties.ExecType.CP); } @Test public void testGMMM3() { - runGMMTest(3, "VVI", "random", 100, 0.000001, 2, LopProperties.ExecType.CP); + runGMMTest(3, "VVI", "random", 100, 0.000001, true, LopProperties.ExecType.CP); } @Test public void testGMMM4() { - runGMMTest(3, "VII", "random", 100, 0.000001, 2, LopProperties.ExecType.CP); + runGMMTest(3, "VII", "random", 100, 0.000001, true, LopProperties.ExecType.CP); } @Test public void testGMMM1Kmean() { - runGMMTest(3, "VVV", "kmeans", 100, 0.000001, 2, LopProperties.ExecType.CP); + runGMMTest(3, "VVV", "kmeans", 100, 0.000001, true, LopProperties.ExecType.CP); } @Test public void testGMMM2Kmean() { - runGMMTest(3, "EEE", "kmeans", 100, 0.000001, 2, LopProperties.ExecType.CP); + runGMMTest(3, "EEE", "kmeans", 100, 0.000001, true, LopProperties.ExecType.CP); } @Test public void testGMMM3Kmean() { - runGMMTest(3, "VVI", "kmeans", 100, 0.000001, 2, LopProperties.ExecType.CP); + runGMMTest(3, "VVI", "kmeans", 100, 0.000001, true, LopProperties.ExecType.CP); } @Test public void testGMMM4Kmean() { - runGMMTest(3, "VII", "kmeans", 100, 0.000001, 2, LopProperties.ExecType.CP); + runGMMTest(3, "VII", "kmeans", 100, 0.000001, true, LopProperties.ExecType.CP); } - @Test public void testGMMM1Spark() { runGMMTest(3, "VVV", "random", 100, 0.000001, 2, LopProperties.ExecType.SPARK); } + @Test public void testGMMM1Spark() { runGMMTest(3, "VVV", "random", 100, 0.000001, true, LopProperties.ExecType.SPARK); } @Test public void testGMMM2Spark() { - runGMMTest(3, "EEE", "random", 100, 0.000001, 2, LopProperties.ExecType.CP); + runGMMTest(3, "EEE", "random", 100, 0.000001, true, LopProperties.ExecType.CP); } @Test public void testGMMMS3Spark() { - runGMMTest(3, "VVI", "random", 100, 0.000001, 2, LopProperties.ExecType.CP); + runGMMTest(3, "VVI", "random", 100, 0.000001, true, LopProperties.ExecType.CP); } @Test public void testGMMM4Spark() { - runGMMTest(3, "VII", "random", 100, 0.000001, 2, LopProperties.ExecType.CP); + runGMMTest(3, "VII", "random", 100, 0.000001, true, LopProperties.ExecType.CP); } -// @Test public void testGMMM1KmeanSpark() { -// runGMMTest(3, "VVV", "kmeans", 100, 0.000001, 2, LopProperties.ExecType.SPARK); -// } -// -// @Test public void testGMMM2KmeanSpark() { -// runGMMTest(3, "EEE", "kmeans", 100, 0.000001, 2, LopProperties.ExecType.SPARK); -// } -// -// @Test public void testGMMM3KmeanSpark() { -// runGMMTest(3, "VVI", "kmeans", 100, 0.000001, 2, LopProperties.ExecType.SPARK); -// } -// -// @Test public void testGMMM4KmeanSpark() { -// runGMMTest(3, "VII", "kmeans", 100, 0.000001, 2, LopProperties.ExecType.SPARK); -// } - - private void runGMMTest(int G_mixtures, String model, String init_param, int iter, double reg, int test, + @Test public void testGMMM1KmeanSpark() { + runGMMTest(3, "VVV", "kmeans", 100, 0.000001, false, LopProperties.ExecType.SPARK); + } + + @Test public void testGMMM3KmeanSpark() { + runGMMTest(3, "VVI", "kmeans", 100, 0.000001, false, LopProperties.ExecType.SPARK); + } + + @Test public void testGMMM4KmeanSpark() { + runGMMTest(3, "VII", "kmeans", 100, 0.000001, false, LopProperties.ExecType.SPARK); + } + + private void runGMMTest(int G_mixtures, String model, String init_param, int iter, double reg, boolean rewrite, LopProperties.ExecType instType) { Types.ExecMode platformOld = setExecMode(instType); + OptimizerUtils.ALLOW_ALGEBRAIC_SIMPLIFICATION = rewrite; Review comment: Spark test passed after setting OptimizerUtils.ALLOW_ALGEBRAIC_SIMPLIFICATION to false. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org