[MNT] remove unnecessary dependencies - numba - #23
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes numba as a declared dependency and eliminates the only direct usage of numba in the repository (a test-only fixture that disabled JIT during the anomaly model equality test). This keeps PyCaret’s core dependency set smaller and removes test code that was only present to work around numba behavior.
Changes:
- Dropped
numbafrompyproject.tomlcore dependencies. - Removed the
disable_numbapytest fixture and its related imports fromtests/test_models.py. - Removed
numbafrom the dependency list reported bypycaret.utils._show_versions.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
tests/test_models.py |
Removes the test fixture/imports that relied on numba, and updates the anomaly equality test signature accordingly. |
pyproject.toml |
Removes numba from core dependencies to keep the dependency set minimal. |
pycaret/utils/_show_versions.py |
Stops reporting numba as a required dependency. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fkiraly
added a commit
that referenced
this pull request
Aug 8, 2026
fkiraly
pushed a commit
that referenced
this pull request
Aug 9, 2026
) Fully passing CI (https://github.com/WilliamJudge94/sktime-pycaret/actions/runs/31238435952) ## Summary This PR brings the fork's Python 3.13 compatibility work together with upstream dependency maintenance. Local `main` now contains `sktime/pycaret:main` through `7e766c1a`, then adds the fork-specific compatibility, CI, test, and dependency constraints required to keep the project working on Python 3.10–3.13. ## What changed and why ### Python 3.13 and dependency compatibility - Added Python 3.13 support across package metadata, runtime guards, and CI. - Added Python-version dependency markers for NumPy, pandas, SciPy, scikit-learn, LightGBM, Numba, Trio, Matplotlib, SHAP, XGBoost, pmdarima, and scikit-learn-intelex. These constraints select dependency versions with Python 3.13 wheels and compatible APIs rather than using one range for all supported Python releases. - Added compatibility fixes for NumPy 2, current scikit-learn validation/metric APIs, SHAP output shapes, Moto, MLflow/cloudpickle serialization, Joblib cache behavior, and optional dependencies. - Disabled BATS/TBATS where NumPy 2 compatibility is unavailable, preventing model discovery from failing during setup. ### Runtime and time-series compatibility - Added a scikit-learn compatibility layer and updated preprocessing, metrics, caching, experiment setup, and parallel/logging integrations to support newer dependency APIs. - Restored legacy forecasting-horizon split behavior and supports both current and legacy `sktime` exogenous-variable tags. This preserves the fork's expected train/test semantics while remaining compatible with newer `sktime` tag names. - Added or updated tests for cache persistence, MLflow artifacts, model behavior, Python 3.13 clustering-engine availability, BATS/TBATS handling, forecasting tags, and pipeline tag propagation. ### CI and upstream synchronization - Kept the fork's Python 3.13 CI matrix, notebook coverage, and platform safeguards, including the macOS/Python-3.13 `daal4py` guard. - Merged upstream through `7e766c1a`, establishing shared ancestry so these dependency-maintenance commits will not need to be re-integrated as a future divergence. - Retained upstream removals of direct `markupsafe`, `importlib_metadata`, `nbformat`, and `deprecation` requirements. ## Why selected upstream changes were rolled back locally `feature/merge_deps_removal` merged `upstream/main` at merge commit `58c9cff1`. This establishes shared ancestry through upstream commit `7e766c1a`, preventing the same six upstream commits from being re-integrated as a future divergence. The merge preserved this branch's existing Python 3.13 CI matrices and `daal4py` guard. Two deliberate follow-up commits restore behavior that upstream removed but this fork requires: - `e638bea7` — `bug: retain numba test safeguard` - `5f45a6bf` — `bug: retain wurlitzer logging` ## Upstream commit disposition | Upstream commit | Subject | Decision | Local outcome and rationale | | --- | --- | --- | --- | | `805629fb` | `[MNT] remove stale.yml workflow which automatically closes issues or PR (#17)` | Kept | The stale issue/PR workflow was removed as upstream intended. | | `635416f0` | `[MNT] fix CI - use uv, remove legacy builds (#15)` | Adapted | Its upstream ancestry is retained. The branch kept its already-working Python 3.13 CI matrix and stronger `pytest.importorskip("daal4py")`/macOS guard rather than replacing them with the older workflow and import changes. The upstream test extra addition (`pytest-timeout`) is retained through the merge. | | `345f9581` | `[MNT] remove unnecessary dependencies - numba (#23)` | Rewritten | The upstream removal was accepted by the merge, then `e638bea7` restored Numba's Python-version dependency declarations, version reporting, and the `disable_numba` test fixture. Docker Python 3.13 testing showed that deleting this fixture causes PyOD ABOD to raise `numba.core.errors.TypingError`; keeping it prevents that regression. | | `8ad0d2a0` | `[MNT] remove unnecessary deps - notebook/colab related packages (#22)` | Kept | Removed direct `markupsafe`, `importlib_metadata`, and `nbformat` requirements while retaining the branch's Python 3.13 dependency markers. Targeted Docker tests passed. | | `b1727ca1` | `[MNT] remove unnecessary deps - wurlitzer (#21)` | Rewritten | The upstream removal was accepted by the merge, then `5f45a6bf` restored `wurlitzer`, its version report entry, and `redirect_output`'s C/child-process stdout/stderr capture. This fork intentionally keeps that logging capability. | | `7e766c1a` | `[MNT] Remove unused packages - deprecations (#25)` | Kept | Removed the direct `deprecation` requirement. Targeted Docker install/import checks passed. | ## Comparison context and remaining risk At the time of comparison, local `main` was 65 commits ahead and 0 commits behind `sktime/pycaret:main`; all remaining changes are fork-specific. The highest-risk areas are the broad Python-version dependency matrix and the custom legacy `sktime` forecasting split. Full CI across Python 3.10–3.13 remains important to validate the permitted dependency combinations and platform behavior. ## Conflict resolutions | File | Resolution | | --- | --- | | `.github/workflows/test.yml` | Kept the local workflow because it already uses `uv` and contains the branch's Python 3.13-focused CI configuration. | | `tests/test_clustering_engines.py` | Kept the local `pytest.importorskip("daal4py")`, macOS/Python-3.13 guard, and module-based assertions. | | `pyproject.toml` | Retained local Python-version markers. Applied safe upstream removals; restored Numba and Wurlitzer through the separate override commits. | ## Validation The integrated branch was tested in Docker using `python:3.13-slim` with `libgomp1` installed for LightGBM: ```text Python 3.13.14 uv pip install --system --no-cache ".[test]" # passed python -m pip check # passed redirect_output() context smoke test # passed python -m pytest -q tests/test_models.py # 5 passed ``` The full CI matrix was not run locally. The Docker validation specifically confirms the two protected regressions (Numba fixture and Wurlitzer logging) alongside the dependency merge. CI should validate the full supported Python 3.10–3.13 matrix before merge.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes unnecessary dependency
numba.numbais only imported in order to deactivatenumbain a single test, in case it is there.Entirely unnecessary.