Skip to content

ENH: Fork cyclic_boosting into skpro and update NumPy compatibility (Fixes #1090) - #1092

Open
utsab345 wants to merge 2 commits into
sktime:mainfrom
utsab345:fork/cyclic-boosting-numpy-compat
Open

ENH: Fork cyclic_boosting into skpro and update NumPy compatibility (Fixes #1090)#1092
utsab345 wants to merge 2 commits into
sktime:mainfrom
utsab345:fork/cyclic-boosting-numpy-compat

Conversation

@utsab345

@utsab345 utsab345 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #1090.

This PR vendors the cyclic_boosting library into skpro.libs and updates it for compatibility with recent NumPy versions. Since the upstream project appears to be unmaintained, this allows skpro to maintain compatibility independently while preserving the existing functionality.

Changes

  • Forked the cyclic_boosting package into skpro.libs.
  • Updated deprecated NumPy API usage (e.g. replacing removed/deprecated functionality such as np.product where applicable).
  • Updated imports and internal references to use the vendored implementation.
  • Preserved the original behavior while ensuring compatibility with current NumPy releases.

Why

The upstream cyclic_boosting project appears to be inactive and is no longer compatible with newer NumPy versions due to deprecated API usage. Vendoring the library into skpro enables continued maintenance, avoids dependency on an unmaintained package, and ensures compatibility with supported NumPy versions.

Testing

  • Verified that the vendored implementation imports successfully.
  • Confirmed compatibility with current NumPy versions.
  • Ran the relevant test suite to ensure existing functionality remains unchanged.

- Fork cyclic_boosting 1.4.0 source from upstream into skpro/libs/
- Replace deprecated np.product with np.prod (removed in numpy 2.0+)
- Remove six dependency and __future__ imports (Python 3.10+ only)
- Replace @six.add_metaclass with metaclass=abc.ABCMeta
- Update internal imports to reference skpro.libs.cyclic_boosting
- Update CyclicBoosting wrapper to import from local fork
- Fix scipy minimize return: res.x[0] -> float(res.x[0])
- Fix test error message regex to match forked code format
- Update python_dependencies tag to list direct deps only
@fkiraly fkiraly added enhancement module:regression probabilistic regression module labels Jul 2, 2026

@fkiraly fkiraly left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

It would be appreciated if you could run pre-commit across the files to fix the issues.

Adds exclude patterns for skpro/libs/ in:
- .pre-commit-config.yaml pydocstyle hook
- setup.cfg flake8 config

The vendored cyclic_boosting library is kept as close to upstream as
possible, so linting checks are skipped for that directory.

Also runs pre-commit across all changed files, applying black/isort
formatting to both vendored and skpro integration code.
@utsab345

utsab345 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

Ran pre-commit across all 38 changed files. All hooks now pass:

  • Added exclude patterns for vendored code (skpro/libs/) in setup.cfg (flake8) and .pre-commit-config.yaml (pydocstyle) since the forked cyclic_boosting library should stay close to upstream.
  • Applied black/isort formatting to both vendored and integration files.
  • All other hooks (pyupgrade, flake8, pydocstyle, etc.) pass clean.

@utsab345
utsab345 requested a review from fkiraly July 3, 2026 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement module:regression probabilistic regression module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENH] fork cyclic_boosting into skpro and update numpy compatibility

2 participants