Skip to content

Commit

Permalink
[python][tests] use default tolerance for dual GPU+CPU test (#3810)
Browse files Browse the repository at this point in the history
* Update test_dual.py

* Update .vsts-ci.yml

* Update .vsts-ci.yml

* Update test_dual.py

* Update .vsts-ci.yml

* Update .vsts-ci.yml

* Update .vsts-ci.yml
  • Loading branch information
StrikerRUS authored Jan 22, 2021
1 parent 6bb6164 commit 477cbf3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/python_package_test/test_dual.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ def test_cpu_and_gpu_work():

params_gpu = params_cpu.copy()
params_gpu["device"] = "gpu"
params_gpu["gpu_use_dp"] = True
gpu_bst = lgb.train(params_gpu, data, num_boost_round=10)
gpu_score = log_loss(y, gpu_bst.predict(X))

np.testing.assert_allclose(cpu_score, gpu_score, rtol=1e-4)
assert gpu_score < 0.25
np.testing.assert_allclose(cpu_score, gpu_score)
assert gpu_score < 0.242

0 comments on commit 477cbf3

Please sign in to comment.