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

[0.23.1] doctest GradientBoostingClassifier failes on arm(rhel) processors #17797

Closed
murata-yu opened this issue Jul 1, 2020 · 5 comments
Closed

Comments

@murata-yu
Copy link
Contributor

Describe the bug

On arm processors (AWS:gravition2, rhel), I get the following failure in version 0.23.1

1038     >>> from sklearn.model_selection import train_test_split
1039     >>> X, y = make_classification(random_state=0)
1040     >>> X_train, X_test, y_train, y_test = train_test_split(
1041     ...     X, y, random_state=0)
1042     >>> clf = GradientBoostingClassifier(random_state=0)
1043     >>> clf.fit(X_train, y_train)
1044     GradientBoostingClassifier(random_state=0)
1045     >>> clf.predict(X_test[:2])
1046     array([1, 0])
1047     >>> clf.score(X_test, y_test)
Expected:
    0.88
Got:
    0.84

Steps/Code to Reproduce

pytest -v sklearn/ensemble/_gb.py::sklearn.ensemble._gb.GradientBoostingClassifier

Expected Results

PASSED is thrown.

Actual Results

FAILED is thrown.

1047     >>> clf.score(X_test, y_test)
Expected:
    0.88
Got:
    0.84

Versions

System:
    python: 3.6.8 (default, Dec  5 2019, 16:02:25)  [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
executable: /usr/bin/python3
   machine: Linux-4.18.0-193.1.2.el8_2.aarch64-aarch64-with-redhat-8.2-Ootpa

Python dependencies:
          pip: 20.1.1
   setuptools: 39.2.0
      sklearn: 0.23.1
        numpy: 1.14.3
        scipy: 1.0.0
       Cython: 0.29
       pandas: 1.0.5
   matplotlib: 3.2.1
       joblib: 0.14.0
threadpoolctl: 2.1.0

Built with OpenMP: True
Linux-4.18.0-193.1.2.el8_2.aarch64-aarch64-with-redhat-8.2-Ootpa
Traceback (most recent call last):
  File "<string>", line 3, in <module>
NameError: name 'Python' is not defined
@murata-yu murata-yu changed the title [0.23.1] doctest GradientBoostingClassifier failes on arm(rhel) [0.23.1] doctest GradientBoostingClassifier failes on arm(rhel) processors Jul 1, 2020
@rth
Copy link
Member

rth commented Jul 26, 2020

Thanks for the report @murata-yu , I can reproduce in #17996

Not yet sure if it's an indication of an actual issue of it we should just increase the tolerance.

@ogrisel
Copy link
Member

ogrisel commented Jul 27, 2020

From a user point of view, 4% of change in accuracy in the 0.8 range looks like more than a small numerical rounding discrepancy. It's worth investigating.

@ogrisel
Copy link
Member

ogrisel commented Jul 28, 2020

I can reproduce the problem locally by building scikit-learn in an arm64 miniforge environment in docker / qemu container as described in #17644 (comment).

@Higgs32584
Copy link
Contributor

I was unable to replicate this issue. I got .88 when I ran the code

Python 3.12.1

Package Version Editable project location


alabaster 0.7.16
Babel 2.14.0
black 23.3.0
certifi 2023.11.17
cfgv 3.4.0
charset-normalizer 3.3.2
click 8.1.7
colorama 0.4.6
coverage 7.4.0
Cython 3.0.7
distlib 0.3.8
docutils 0.20.1
filelock 3.13.1
identify 2.5.33
idna 3.6
imagesize 1.4.1
iniconfig 2.0.0
Jinja2 3.1.3
joblib 1.3.2
MarkupSafe 2.1.3
mypy 1.8.0
mypy-extensions 1.0.0
nodeenv 1.8.0
numpy 1.26.3
numpydoc 1.6.0
packaging 23.2
pathspec 0.12.1
pip 23.3.2
platformdirs 4.1.0
pluggy 1.3.0
pre-commit 3.6.0
Pygments 2.17.2
pytest 7.4.4
pytest-cov 4.1.0
PyYAML 6.0.1
requests 2.31.0
ruff 0.1.13
scikit-learn 1.5.dev0 C:\Users\mjhig\scikit\scikit-learn
SciPy 1.11.4
setuptools 69.0.3
snowballstemmer 2.2.0
Sphinx 7.2.6
sphinxcontrib-applehelp 1.0.8
sphinxcontrib-devhelp 1.0.6
sphinxcontrib-htmlhelp 2.0.5
sphinxcontrib-jsmath 1.0.1
sphinxcontrib-qthelp 1.0.7
sphinxcontrib-serializinghtml 1.1.10
tabulate 0.9.0
threadpoolctl 3.2.0
typing_extensions 4.9.0
urllib3 2.1.0
virtualenv 20.25.0
wheel 0.42.0

@adrinjalali
Copy link
Member

Hasn't been coming up in a couple of years. Closing, can open a new one when it comes up with a more recent version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants