Skip to content

Commit

Permalink
Fix error message about max depth (#30)
Browse files Browse the repository at this point in the history
* Fix error message about max depth

* Update test APITest.PathTooLong
  • Loading branch information
hcho3 authored Dec 22, 2021
1 parent c78fe62 commit 5af1daa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion GPUTreeShap/gpu_treeshap.h
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,7 @@ void ValidatePaths(const PathVectorT& device_paths,
path_lengths.end(), too_long_op);

if (invalid_length) {
throw std::invalid_argument("Tree depth must be <= 32");
throw std::invalid_argument("Tree depth must be < 32");
}

IncorrectVOp<SplitConditionT> incorrect_v_op{device_paths.data().get()};
Expand Down
2 changes: 1 addition & 1 deletion tests/test_gpu_treeshap.cu
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ TEST_F(APITest, PathTooLong) {
for (size_t i = 1; i < model.size(); i++) {
model[i] = {0, static_cast<int64_t>(i), 0, {0, 0, 0}, 0, 0};
}
ExpectAPIThrow<std::invalid_argument>("Tree depth must be <= 32");
ExpectAPIThrow<std::invalid_argument>("Tree depth must be < 32");
}

TEST_F(APITest, PathVIncorrect) {
Expand Down

0 comments on commit 5af1daa

Please sign in to comment.