Skip to content

Commit

Permalink
Use only one thread in test_basic.py (microsoft#412)
Browse files Browse the repository at this point in the history
  • Loading branch information
huanzhang12 authored and guolinke committed Apr 13, 2017
1 parent ab55910 commit a5f11d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/python_package_test/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ def test(self):
"metric": "auc",
"min_data": 10,
"num_leaves": 15,
"verbose": -1
"verbose": -1,
"num_threads": 1
}
bst = lgb.Booster(params, train_data)
bst.add_valid(valid_data, "valid_1")
Expand All @@ -47,6 +48,7 @@ def test(self):
pred_from_model_file = bst.predict(X_test)
self.assertEqual(len(pred_from_matr), len(pred_from_model_file))
for preds in zip(pred_from_matr, pred_from_model_file):
# we need to check the consistency of model file here, so test for exact equal
self.assertEqual(*preds)
# check pmml
os.system('python ../../pmml/pmml.py model.txt')
Expand Down

0 comments on commit a5f11d4

Please sign in to comment.