Skip to content

Commit 8c83baf

Browse files
authored
Remove deprecated functions (#642)
* Remove deprecated frontend methods * Removed deprecated legacy model builder class * fix * Fix serializer test
1 parent 10aab6b commit 8c83baf

File tree

9 files changed

+151
-1030
lines changed

9 files changed

+151
-1030
lines changed

docs/treelite-api.rst

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,13 @@ Model builder
2828
:members:
2929
:member-order: bysource
3030

31-
Model builder (Legacy)
32-
----------------------
33-
34-
.. autoclass:: treelite.ModelBuilder
35-
:members:
36-
:member-order: bysource
37-
3831
Model class
3932
-----------
4033

4134
.. autoclass:: treelite.Model
4235
:members:
4336
:member-order: bysource
37+
:exclude-members: load, from_xgboost, from_xgboost_json, from_lightgbm
4438

4539

4640
.. _field_accessors:

ops/test-serializer-compatibility.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -euo pipefail
44

55
echo "##[section]Building Treelite..."
6-
mkdir build
6+
mkdir -p build
77
cd build
88
cmake .. -GNinja
99
ninja
@@ -19,6 +19,14 @@ PYTHONPATH=./python/ python tests/serializer/compatibility_tester.py --task load
1919
--checkpoint-path checkpoint.bin --model-pickle-path model.pkl \
2020
--expected-treelite-version ${CURRENT_VERSION}
2121

22+
echo "##[section]Testing serialization: 4.3.0 -> ${CURRENT_VERSION}"
23+
pip install --force-reinstall treelite==4.3.0
24+
python tests/serializer/compatibility_tester.py --task save --checkpoint-path checkpoint.bin \
25+
--model-pickle-path model.pkl --expected-treelite-version 4.3.0
26+
PYTHONPATH=./python/ python tests/serializer/compatibility_tester.py --task load \
27+
--checkpoint-path checkpoint.bin --model-pickle-path model.pkl \
28+
--expected-treelite-version ${CURRENT_VERSION}
29+
2230
echo "##[section]Testing serialization: ${CURRENT_VERSION} -> ${CURRENT_VERSION}"
2331
PYTHONPATH=./python/ python tests/serializer/compatibility_tester.py --task save \
2432
--checkpoint-path checkpoint.bin --model-pickle-path model.pkl \

python/treelite/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from . import frontend, gtil, model_builder, sklearn
66
from .core import TreeliteError
77
from .model import Model
8-
from .model_builder_legacy import ModelBuilder
98

109
VERSION_FILE = pathlib.Path(__file__).parent / "VERSION"
1110
with open(VERSION_FILE, "r", encoding="UTF-8") as _f:
@@ -18,6 +17,5 @@
1817
"sklearn",
1918
"model_builder",
2019
"TreeliteError",
21-
"ModelBuilder",
2220
"__version__",
2321
]

python/treelite/compat.py

Lines changed: 0 additions & 199 deletions
This file was deleted.

0 commit comments

Comments
 (0)