Skip to content

Commit

Permalink
[REVIEW] Add float64 warning when loading LightGBM model (#2874)
Browse files Browse the repository at this point in the history
* Add float64 warning when loading LightGBM model

* Update changelog
  • Loading branch information
wphicks authored Sep 26, 2020
1 parent 17b55cb commit fae1cba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- PR #2789: Dask LabelEncoder
- PR #2152: add FIL C++ benchmark
- PR #2638: Improve cython build with custom `build_ext`
- PR #2874: Issue warning for degraded accuracy with float64 models in Treelite

## Improvements
- PR #2873: Remove empty marker kernel code for NVTX markers
Expand Down
3 changes: 3 additions & 0 deletions python/cuml/fil/fil.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ cdef class TreeliteModel():
err = TreeliteGetLastError()
raise RuntimeError("Failed to load %s (%s)" % (filename, err))
elif model_type == "lightgbm":
logger.warn("Treelite currently does not support float64 model"
" parameters. Accuracy may degrade relative to"
" native LightGBM invocation.")
res = TreeliteLoadLightGBMModel(filename_bytes, &handle)
if res < 0:
err = TreeliteGetLastError()
Expand Down

0 comments on commit fae1cba

Please sign in to comment.