Skip to content

[CI] Various CI fixes - #694

Merged
chyunsu3 merged 2 commits into
dmlc:mainlinefrom
chyunsu3:fix_precommit
Aug 26, 2026
Merged

[CI] Various CI fixes#694
chyunsu3 merged 2 commits into
dmlc:mainlinefrom
chyunsu3:fix_precommit

Conversation

@chyunsu3

@chyunsu3 chyunsu3 commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator
  • Fix pre-commit errors:

python/treelite/sklearn/importer.py:434: error: Unexpected keyword argument "start" for overloaded function "arange" [call-overload]
tests/python/util.py:101: error: Value of type "int" is not indexable [index]
python/treelite/frontend.py:199: error: Module has no attribute "Booster" [attr-defined]
python/treelite/frontend.py:201: error: Module has no attribute "__version__" [attr-defined]

  • Pin lcov<2.0 to work around error:

lcov: ERROR: (inconsistent) mismatched end line for _ZN8treelite34SerializerRoundTrip_TreeStump_Test8TestBodyEv at /home/runner/work/treelite/treelite/tests/cpp/test_serializer.cc:163: 163 -> 170 while capturing from ./build/tests/cpp/CMakeFiles/treelite_cpp_test.dir/test_serializer.cc.gcda

Comment thread tests/python/util.py
Comment on lines +97 to +99
new_col_idx = np.asarray(
rng.choice(n_features, n_features, replace=False, shuffle=True)
)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mypy is conservative and assuming int return type for rng.choice(). We explicitly annotate the return type (np.ndarray) here.

feat_remapper = np.arange(
start=0, stop=sklearn_model.n_features_in_, dtype=np.int32
)
feat_remapper = np.arange(0, stop=sklearn_model.n_features_in_, dtype=np.int32)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The start parameter in np.arange is now a positional-only argument. See numpy/numpy#30368 (comment)

@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.39%. Comparing base (a1938f3) to head (c557ec7).

Additional details and impacted files
@@             Coverage Diff              @@
##           mainline     #694      +/-   ##
============================================
- Coverage     86.32%   84.39%   -1.93%     
============================================
  Files            13       75      +62     
  Lines           943     6862    +5919     
  Branches          0      557     +557     
============================================
+ Hits            814     5791    +4977     
- Misses          129     1071     +942     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chyunsu3 chyunsu3 changed the title [CI] Fix pre-commit failures [CI] Various CI fixes Aug 26, 2026
@chyunsu3
chyunsu3 merged commit 3b2a9a3 into dmlc:mainline Aug 26, 2026
19 of 20 checks passed
@chyunsu3
chyunsu3 deleted the fix_precommit branch August 26, 2026 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant