Skip to content

Commit 99b6baa

Browse files
committed
Fixed test for JRuby [skip ci]
1 parent 77b86e4 commit 99b6baa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/train_test.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ def test_early_stopping_not_early
5454
model = LightGBM.train(regression_params, regression_train, valid_sets: [regression_train, regression_test], early_stopping_rounds: 500)
5555
end
5656
assert_equal 100, model.best_iteration
57-
assert_includes stdout, "Best iteration is: [100]\ttraining's l2: 0.024524\tvalid_1's l2: 0.0841232"
57+
if jruby?
58+
assert_includes stdout, "Best iteration is: [100]\ttraining's l2: 0.0245240\tvalid_1's l2: 0.0841232"
59+
else
60+
assert_includes stdout, "Best iteration is: [100]\ttraining's l2: 0.024524\tvalid_1's l2: 0.0841232"
61+
end
5862
end
5963

6064
def test_early_stopping_early_higher_better

0 commit comments

Comments
 (0)