Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recent Numba not usable with pygbm #98

Open
esc opened this issue Nov 16, 2020 · 1 comment
Open

Recent Numba not usable with pygbm #98

esc opened this issue Nov 16, 2020 · 1 comment

Comments

@esc
Copy link

esc commented Nov 16, 2020

I am seeing the following:

::>> running: 'conda run -n pygbm pytest'
ERROR conda.cli.main_run:execute(33): Subprocess for 'conda run ['pytest']' command failed.  (See above for error)
============================= test session starts ==============================
platform linux -- Python 3.8.5, pytest-6.1.1, py-1.9.0, pluggy-0.13.1
rootdir: /home/circleci/repo/pygbm
collected 0 items / 9 errors

==================================== ERRORS ====================================
____________________ ERROR collecting tests/test_binning.py ____________________
ImportError while importing test module '/home/circleci/repo/pygbm/tests/test_binning.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../miniconda3/envs/pygbm/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_binning.py:5: in <module>
    from pygbm.binning import BinMapper, _find_binning_thresholds, _map_to_bins
pygbm/__init__.py:1: in <module>
    from pygbm.gradient_boosting import GradientBoostingClassifier
pygbm/gradient_boosting.py:18: in <module>
    from pygbm.grower import TreeGrower
pygbm/grower.py:11: in <module>
    from .splitting import (SplittingContext, split_indices, find_node_split,
pygbm/splitting.py:9: in <module>
    from numba import njit, jitclass, prange, float32, uint8, uint32
E   ImportError: cannot import name 'jitclass' from 'numba' (/home/circleci/repo/miniconda3/envs/pygbm/lib/python3.8/site-packages/numba/__init__.py)
_______________ ERROR collecting tests/test_compare_lightgbm.py ________________
ImportError while importing test module '/home/circleci/repo/pygbm/tests/test_compare_lightgbm.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../miniconda3/envs/pygbm/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_compare_lightgbm.py:7: in <module>
    from pygbm import GradientBoostingRegressor, GradientBoostingClassifier
pygbm/__init__.py:1: in <module>
    from pygbm.gradient_boosting import GradientBoostingClassifier
pygbm/gradient_boosting.py:18: in <module>
    from pygbm.grower import TreeGrower
pygbm/grower.py:11: in <module>
    from .splitting import (SplittingContext, split_indices, find_node_split,
pygbm/splitting.py:9: in <module>
    from numba import njit, jitclass, prange, float32, uint8, uint32
E   ImportError: cannot import name 'jitclass' from 'numba' (/home/circleci/repo/miniconda3/envs/pygbm/lib/python3.8/site-packages/numba/__init__.py)
_______________ ERROR collecting tests/test_gradient_boosting.py _______________
ImportError while importing test module '/home/circleci/repo/pygbm/tests/test_gradient_boosting.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../miniconda3/envs/pygbm/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_gradient_boosting.py:8: in <module>
    from pygbm import GradientBoostingClassifier
pygbm/__init__.py:1: in <module>
    from pygbm.gradient_boosting import GradientBoostingClassifier
pygbm/gradient_boosting.py:18: in <module>
    from pygbm.grower import TreeGrower
pygbm/grower.py:11: in <module>
    from .splitting import (SplittingContext, split_indices, find_node_split,
pygbm/splitting.py:9: in <module>
    from numba import njit, jitclass, prange, float32, uint8, uint32
E   ImportError: cannot import name 'jitclass' from 'numba' (/home/circleci/repo/miniconda3/envs/pygbm/lib/python3.8/site-packages/numba/__init__.py)
____________________ ERROR collecting tests/test_grower.py _____________________
ImportError while importing test module '/home/circleci/repo/pygbm/tests/test_grower.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../miniconda3/envs/pygbm/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_grower.py:7: in <module>
    from pygbm.grower import TreeGrower
pygbm/__init__.py:1: in <module>
    from pygbm.gradient_boosting import GradientBoostingClassifier
pygbm/gradient_boosting.py:18: in <module>
    from pygbm.grower import TreeGrower
pygbm/grower.py:11: in <module>
    from .splitting import (SplittingContext, split_indices, find_node_split,
pygbm/splitting.py:9: in <module>
    from numba import njit, jitclass, prange, float32, uint8, uint32
E   ImportError: cannot import name 'jitclass' from 'numba' (/home/circleci/repo/miniconda3/envs/pygbm/lib/python3.8/site-packages/numba/__init__.py)
___________________ ERROR collecting tests/test_histogram.py ___________________
ImportError while importing test module '/home/circleci/repo/pygbm/tests/test_histogram.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../miniconda3/envs/pygbm/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_histogram.py:5: in <module>
    from pygbm.histogram import _build_histogram_naive
pygbm/__init__.py:1: in <module>
    from pygbm.gradient_boosting import GradientBoostingClassifier
pygbm/gradient_boosting.py:18: in <module>
    from pygbm.grower import TreeGrower
pygbm/grower.py:11: in <module>
    from .splitting import (SplittingContext, split_indices, find_node_split,
pygbm/splitting.py:9: in <module>
    from numba import njit, jitclass, prange, float32, uint8, uint32
E   ImportError: cannot import name 'jitclass' from 'numba' (/home/circleci/repo/miniconda3/envs/pygbm/lib/python3.8/site-packages/numba/__init__.py)
_____________________ ERROR collecting tests/test_loss.py ______________________
ImportError while importing test module '/home/circleci/repo/pygbm/tests/test_loss.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../miniconda3/envs/pygbm/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_loss.py:8: in <module>
    from pygbm.loss import _LOSSES
pygbm/__init__.py:1: in <module>
    from pygbm.gradient_boosting import GradientBoostingClassifier
pygbm/gradient_boosting.py:18: in <module>
    from pygbm.grower import TreeGrower
pygbm/grower.py:11: in <module>
    from .splitting import (SplittingContext, split_indices, find_node_split,
pygbm/splitting.py:9: in <module>
    from numba import njit, jitclass, prange, float32, uint8, uint32
E   ImportError: cannot import name 'jitclass' from 'numba' (/home/circleci/repo/miniconda3/envs/pygbm/lib/python3.8/site-packages/numba/__init__.py)
___________________ ERROR collecting tests/test_plotting.py ____________________
ImportError while importing test module '/home/circleci/repo/pygbm/tests/test_plotting.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../miniconda3/envs/pygbm/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_plotting.py:5: in <module>
    from pygbm.grower import TreeGrower
pygbm/__init__.py:1: in <module>
    from pygbm.gradient_boosting import GradientBoostingClassifier
pygbm/gradient_boosting.py:18: in <module>
    from pygbm.grower import TreeGrower
pygbm/grower.py:11: in <module>
    from .splitting import (SplittingContext, split_indices, find_node_split,
pygbm/splitting.py:9: in <module>
    from numba import njit, jitclass, prange, float32, uint8, uint32
E   ImportError: cannot import name 'jitclass' from 'numba' (/home/circleci/repo/miniconda3/envs/pygbm/lib/python3.8/site-packages/numba/__init__.py)
___________________ ERROR collecting tests/test_predictor.py ___________________
ImportError while importing test module '/home/circleci/repo/pygbm/tests/test_predictor.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../miniconda3/envs/pygbm/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_predictor.py:9: in <module>
    from pygbm.grower import TreeGrower
pygbm/__init__.py:1: in <module>
    from pygbm.gradient_boosting import GradientBoostingClassifier
pygbm/gradient_boosting.py:18: in <module>
    from pygbm.grower import TreeGrower
pygbm/grower.py:11: in <module>
    from .splitting import (SplittingContext, split_indices, find_node_split,
pygbm/splitting.py:9: in <module>
    from numba import njit, jitclass, prange, float32, uint8, uint32
E   ImportError: cannot import name 'jitclass' from 'numba' (/home/circleci/repo/miniconda3/envs/pygbm/lib/python3.8/site-packages/numba/__init__.py)
___________________ ERROR collecting tests/test_splitting.py ___________________
ImportError while importing test module '/home/circleci/repo/pygbm/tests/test_splitting.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../miniconda3/envs/pygbm/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_splitting.py:6: in <module>
    from pygbm.splitting import _find_histogram_split
pygbm/__init__.py:1: in <module>
    from pygbm.gradient_boosting import GradientBoostingClassifier
pygbm/gradient_boosting.py:18: in <module>
    from pygbm.grower import TreeGrower
pygbm/grower.py:11: in <module>
    from .splitting import (SplittingContext, split_indices, find_node_split,
pygbm/splitting.py:9: in <module>
    from numba import njit, jitclass, prange, float32, uint8, uint32
E   ImportError: cannot import name 'jitclass' from 'numba' (/home/circleci/repo/miniconda3/envs/pygbm/lib/python3.8/site-packages/numba/__init__.py)

The fix is easy, jitclass must now be imported so: from numba.experimental import jitclass. I can submit a patch if need be.

@esc
Copy link
Author

esc commented Nov 16, 2020

FYI: these are the relevant versions

# Name                    Version                   Build  Channel
llvmlite                  0.35.0rc3        py38hf484d3e_0    numba/label/dev
numba                     0.52.0rc2       np1.11py3.8h04863e7_gc1fa8487a_10    numba/label/dev
pygbm                     0.1.0                     dev_0    <develop>

esc added a commit to esc/numba-integration-testing that referenced this issue Dec 4, 2020
We (the Numba devs) have decided to remove pygbm since recent Numba
versions are no longer compatible with pygbm as outlined in
ogrisel/pygbm#98
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

No branches or pull requests

1 participant