Skip to content

Commit

Permalink
Have a hanging test.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Oct 29, 2020
1 parent d0fd4f3 commit a15a244
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions hang
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
81234168284343979873719512816958541056
4 changes: 4 additions & 0 deletions tests/python/test_predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ def run_predict_leaf(predictor):
'predictor': predictor, 'tree_method': 'hist'}, m,
num_boost_round=num_boost_round)

empty = xgb.DMatrix(np.ones(shape=(0, cols)))
empty_leaf = booster.predict(empty, pred_leaf=True)
assert empty_leaf.shape[0] == 0

leaf = booster.predict(m, pred_leaf=True)
assert leaf.shape[0] == rows
assert leaf.shape[1] == classes * num_parallel_tree * num_boost_round
Expand Down

0 comments on commit a15a244

Please sign in to comment.