diff options
Diffstat (limited to 'config-model/src/test/java/com/yahoo/schema/processing/RankingExpressionWithLightGBMTestCase.java')
-rw-r--r-- | config-model/src/test/java/com/yahoo/schema/processing/RankingExpressionWithLightGBMTestCase.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/config-model/src/test/java/com/yahoo/schema/processing/RankingExpressionWithLightGBMTestCase.java b/config-model/src/test/java/com/yahoo/schema/processing/RankingExpressionWithLightGBMTestCase.java index 4df0a09ec2e..50cc12e9b33 100644 --- a/config-model/src/test/java/com/yahoo/schema/processing/RankingExpressionWithLightGBMTestCase.java +++ b/config-model/src/test/java/com/yahoo/schema/processing/RankingExpressionWithLightGBMTestCase.java @@ -5,8 +5,8 @@ import com.yahoo.config.application.api.ApplicationPackage; import com.yahoo.io.IOUtils; import com.yahoo.path.Path; import com.yahoo.schema.parser.ParseException; -import org.junit.After; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Test; import java.io.IOException; @@ -20,25 +20,25 @@ public class RankingExpressionWithLightGBMTestCase { private final static String lightGBMExpression = "if (!(numerical_2 >= 0.46643291586559305), 2.1594397038037663, if (categorical_2 in [\"k\", \"l\", \"m\"], 2.235297305276056, 2.1792953471546546)) + if (categorical_1 in [\"d\", \"e\"], 0.03070842919354316, if (!(numerical_1 >= 0.5102250691730842), -0.04439151147520909, 0.005117411709368601)) + if (!(numerical_2 >= 0.668665477622446), if (!(numerical_2 >= 0.008118820676863816), -0.15361238490967524, -0.01192330846157292), 0.03499044894987518) + if (!(numerical_1 >= 0.5201391072644542), -0.02141000620783247, if (categorical_1 in [\"a\", \"b\"], -0.004121485787596721, 0.04534090904886873)) + if (categorical_2 in [\"k\", \"l\", \"m\"], if (!(numerical_2 >= 0.27283279016959255), -0.01924803254356527, 0.03643772842347651), -0.02701711918923075)"; - @After + @AfterEach public void removeGeneratedModelFiles() { IOUtils.recursiveDeleteDir(applicationDir.append(ApplicationPackage.MODELS_GENERATED_DIR).toFile()); } @Test - public void testLightGBMReference() { + void testLightGBMReference() { RankProfileSearchFixture search = fixtureWith("lightgbm('regression.json')"); search.assertFirstPhaseExpression(lightGBMExpression, "my_profile"); } @Test - public void testNestedLightGBMReference() { + void testNestedLightGBMReference() { RankProfileSearchFixture search = fixtureWith("5 + sum(lightgbm('regression.json'))"); search.assertFirstPhaseExpression("5 + reduce(" + lightGBMExpression + ", sum)", "my_profile"); } @Test - public void testImportingFromStoredExpressions() throws IOException { + void testImportingFromStoredExpressions() throws IOException { RankProfileSearchFixture search = fixtureWith("lightgbm('regression.json')"); search.assertFirstPhaseExpression(lightGBMExpression, "my_profile"); @@ -47,7 +47,7 @@ public class RankingExpressionWithLightGBMTestCase { try { storedApplicationDirectory.toFile().mkdirs(); IOUtils.copyDirectory(applicationDir.append(ApplicationPackage.MODELS_GENERATED_DIR).toFile(), - storedApplicationDirectory.append(ApplicationPackage.MODELS_GENERATED_DIR).toFile()); + storedApplicationDirectory.append(ApplicationPackage.MODELS_GENERATED_DIR).toFile()); RankingExpressionWithOnnxTestCase.StoringApplicationPackage storedApplication = new RankingExpressionWithOnnxTestCase.StoringApplicationPackage(storedApplicationDirectory); RankProfileSearchFixture searchFromStored = fixtureWith("lightgbm('regression.json')"); searchFromStored.assertFirstPhaseExpression(lightGBMExpression, "my_profile"); |