-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove deprecated functions (#496) * Remove deprecated functions * Remove Java from CI * Fix tests * More fix * Update C API doc * Fix CI * Fix CMake example * Fix temp dir on Windows * Creat tmpdir * Remove unused code (#497) * Remove unused code * Remove treelite::optional, since it's not used * Remove unused imports * typo * Remove deprecated functions from doc (#498) * Set up formatting check via pre-commit (#500) * Set up pre-commit * Use f-strings * Fix typo * Replace setup.py with pyproject.toml (#501) * Replace setup.py with pyproject.toml * Replace setup.py with pyproject.toml * Add script to change version * Convert pathlib to str before passing it to LoadLibrary * Fix visibility on Linux * Fix MacOS wheel build * Use Mamba to speed up Python env setup * Move ContiguousArray and TaskType to separate headers (#502) * Document current v3 serialization format (#504) * Document current v3 serialization format * Add missing description * Clean up serialization logic (#507) * Clean up serialization logic * Add missing header * Add missing header * Add missing header * Fix compatibility test * Add extra check for num_nodes * Add missing header * Add missing std:: * Use shared_ptr<> to store ref to mixin * Don't store iterator in mixin * Remove stray & * Document proposed v4 serialization format (#505) * Document current v3 serialization format * Add missing description * Document proposed v4 serialization format * Fix typo * Update * Apply suggestions from code review * Update docs/serialization/v4.rst * Update docs/serialization/v4.rst * Use std::variant in treelite::Model (#508) * Fix loading from XGBoost 2.0 dev (#509) * Removed deprecated parameter size_leaf_vector * Handle iteration_indptr field in JSON * Add additional metadata for trees (#510) * Add additional metadata for trees * Use class_id * Fix formatting * Simplify task_type * Update v4.rst * Fix serializer test (#512) * Fix serializer test * Fix typo * Use C++ headers from Conda env * Fix compiler warnings (#513) * Fix warnings from Visual Studio * Fix warnings from GCC * Fix unused parameter warning * Use std:: prefix for uint32_t and size_t * Clean up unused parameter warnings * Refactor sklearn importer to use mix-in classes (#516) * Minor formatting fixes * Move sklearn importers to sklearn namespace * Refactor sklearn importer to use mix-in classes * Divide tests into multiple files * Revise v4 spec (#518) Also simplify doc build * Fix typo in doc * Rename NodeType -> TreeNodeType * Clarify behavior of node stats field * Name a nameless field * [Doc] Clarify leaf_vector_shape * Fix doc build * Use signed integers for some metadata types, to avoid programming errors * Clarify the meaning of average_tree_output * Rename pred_transform -> postprocessor * Clarify num_class * Implement Treelite v4 specification (#524) * Bring in treelite-ng * Apply linting to CMake files * Fix CMakeLists.txt * Fix C++ app example * Fix build on MacOS * Fix build on MacOS * Fix scripts * Use MacOS 10.15+ * Fix test on MacOS: size_t != uint64_t on MacOS * Install latest XGBoost in CI * Don't install if TEST_COVERAGE * Don't install fmt * Don't use O0 for test coverage * Use latest MacOS and Windows workers * Require MSVC 2022 * Use latest Windows * Ensure that we use positive int for seeding rng * Fix build with USE_OPENMP=OFF * Fix flaky test * Add back LightGBM * Install XGBoost from the source * Fix tests * [Doc] various fixes (#525) * [Doc] various fixes * Update docstring * Update docstrings * Add submodules * Doc fix * [sklearn] Use more stable interface to get base_scores (#526) * Doc fix * Add legacy model builder (#527) * Add legacy model builder * Use bysource order
- Loading branch information
Showing
319 changed files
with
13,771 additions
and
63,879 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
Language: Cpp | ||
Standard: c++17 | ||
BasedOnStyle: Google | ||
TabWidth: 2 | ||
IndentWidth: 2 | ||
ColumnLimit: 100 | ||
UseTab: Never | ||
|
||
AccessModifierOffset: -1 | ||
AlignAfterOpenBracket: DontAlign | ||
AlignConsecutiveAssignments: None | ||
AlignConsecutiveDeclarations: None | ||
AlignEscapedNewlines: Left | ||
AlignTrailingComments: false | ||
AllowAllArgumentsOnNextLine: true | ||
AllowAllConstructorInitializersOnNextLine: true | ||
AllowAllParametersOfDeclarationOnNextLine: true | ||
AllowShortBlocksOnASingleLine: Empty | ||
AllowShortCaseLabelsOnASingleLine: false | ||
AllowShortFunctionsOnASingleLine: Empty | ||
AllowShortIfStatementsOnASingleLine: Never | ||
AllowShortLambdasOnASingleLine: All | ||
AllowShortLoopsOnASingleLine: false | ||
AlwaysBreakTemplateDeclarations: Yes | ||
BinPackArguments: true | ||
BinPackParameters: true | ||
BreakBeforeBinaryOperators: All | ||
BreakBeforeBraces: Attach | ||
BreakBeforeTernaryOperators: true | ||
BreakConstructorInitializers: BeforeColon | ||
BreakInheritanceList: AfterColon | ||
BreakStringLiterals: true | ||
CompactNamespaces: false | ||
Cpp11BracedListStyle: true | ||
DerivePointerAlignment: false | ||
IndentWrappedFunctionNames: false | ||
InsertBraces: true | ||
IndentCaseLabels: false | ||
KeepEmptyLinesAtTheStartOfBlocks: false | ||
NamespaceIndentation: None | ||
PointerAlignment: Left | ||
ReflowComments: true | ||
SortIncludes: CaseInsensitive | ||
SpaceAfterCStyleCast: false | ||
SpaceAfterTemplateKeyword: true | ||
SpaceBeforeAssignmentOperators: true | ||
SpaceBeforeCpp11BracedList: false | ||
SpaceBeforeCtorInitializerColon: true | ||
SpaceBeforeInheritanceColon: true | ||
SpaceBeforeParens: ControlStatements | ||
SpaceBeforeRangeBasedForLoopColon: true | ||
SpaceInEmptyParentheses: false | ||
SpacesInAngles: false | ||
SpacesInCStyleCastParentheses: false | ||
SpacesInContainerLiterals: false | ||
SpacesInParentheses: false | ||
SpacesInSquareBrackets: false | ||
QualifierAlignment: Right |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[flake8] | ||
filename = *.py, *.pyx, *.pxd | ||
exclude = | ||
*.egg, | ||
.git, | ||
__pycache__, | ||
build/, | ||
cpp, | ||
docs, | ||
tests/cython/ | ||
|
||
# Cython Rules ignored: | ||
# E999: invalid syntax (works for Python, not Cython) | ||
# E225: Missing whitespace around operators (breaks cython casting syntax like <int>) | ||
# E226: Missing whitespace around arithmetic operators (breaks cython pointer syntax like int*) | ||
# E227: Missing whitespace around bitwise or shift operator (Can also break casting syntax) | ||
# W503: line break before binary operator (breaks lines that start with a pointer) | ||
# W504: line break after binary operator (breaks lines that end with a pointer) | ||
|
||
extend-ignore = | ||
# handled by black | ||
E501, W503, E203 | ||
# imported but unused | ||
F401 | ||
# redefinition of unused | ||
F811 | ||
extend-ignore = | ||
# E203 whitespace before ':' | ||
# https://github.com/psf/black/issues/315 | ||
E203 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: pre-commit | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
- uses: pre-commit/action@v3.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[settings] | ||
profile=black | ||
known_first_party=treelite,treelite_runtime | ||
known_first_party=treelite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.2.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
args: ["--maxkb=4000"] | ||
- repo: https://github.com/psf/black | ||
rev: 23.1.0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
args: ["--profile", "black", "--filter-files"] | ||
- repo: https://github.com/MarcoGorelli/cython-lint | ||
rev: v0.15.0 | ||
hooks: | ||
- id: cython-lint | ||
- id: double-quote-cython-strings | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 5.0.4 | ||
hooks: | ||
- id: flake8 | ||
args: [--config=.flake8] | ||
files: .*$ | ||
types: [file] | ||
types_or: [python] | ||
additional_dependencies: [flake8-force] | ||
- repo: local | ||
hooks: | ||
- id: pylint | ||
name: pylint | ||
entry: python dev/run_pylint.py | ||
language: python | ||
types: [python] | ||
additional_dependencies: [ | ||
pylint, hatchling, pytest, scikit-learn, hypothesis, pandas, treelite, | ||
lightgbm, xgboost, tqdm | ||
] | ||
- repo: https://github.com/pocc/pre-commit-hooks | ||
rev: v1.3.5 | ||
hooks: | ||
- id: clang-format | ||
args: ["-i", "--style=file:.clang-format"] | ||
language: python | ||
additional_dependencies: [clang-format>=15.0] | ||
types_or: [c, c++] | ||
- id: cpplint | ||
language: python | ||
args: [ | ||
"--linelength=100", "--recursive", | ||
"--filter=-build/c++11,-build/include,-build/namespaces_literals,-runtime/references,-build/include_order,+build/include_what_you_use", | ||
"--root=include"] | ||
additional_dependencies: [cpplint] | ||
types_or: [c++] | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.2.0 | ||
hooks: | ||
- id: mypy | ||
additional_dependencies: [types-setuptools, numpy] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,4 +28,3 @@ sphinx: | |
python: | ||
install: | ||
- requirements: docs/requirements.txt | ||
system_packages: true |
Oops, something went wrong.