Skip to content

⚠️ CI failed on Linux_Nightly_PyPy.pypy3 ⚠️ #27648

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

Closed
scikit-learn-bot opened this issue Oct 24, 2023 · 2 comments · Fixed by #27687
Closed

⚠️ CI failed on Linux_Nightly_PyPy.pypy3 ⚠️ #27648

scikit-learn-bot opened this issue Oct 24, 2023 · 2 comments · Fixed by #27687

Comments

@scikit-learn-bot
Copy link
Contributor

scikit-learn-bot commented Oct 24, 2023

CI is still failing on Linux_Nightly_PyPy.pypy3 (Nov 06, 2023)

  • test_plot_partial_dependence_with_categorical[categorical_features2-array]
  • test_plot_partial_dependence_with_categorical[categorical_features1-array]
@github-actions github-actions bot added the Needs Triage Issue requires triage label Oct 24, 2023
@glemaitre glemaitre removed the Needs Triage Issue requires triage label Nov 3, 2023
@lesteve
Copy link
Member

lesteve commented Nov 6, 2023

The test_plot_partial_dependence_with_categorical error seems genuine:

import numpy as np
import matplotlib.pyplot as plt

plt.bar(np.array(['A', 'A', 'B']), np.array([1, 2, 3]))

For some reason this snippet does not work with PyPy with the stack-trace below, but works fine with CPython:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/lesteve/micromamba/envs/pypy/lib/pypy3.9/site-packages/matplotlib/pyplot.py", line 2742, in bar
    return gca().bar(
  File "/home/lesteve/micromamba/envs/pypy/lib/pypy3.9/site-packages/matplotlib/__init__.py", line 1465, in inner
    return func(ax, *map(sanitize_sequence, args), **kwargs)
  File "/home/lesteve/micromamba/envs/pypy/lib/pypy3.9/site-packages/matplotlib/axes/_axes.py", line 2429, in bar
    self._process_unit_info(
  File "/home/lesteve/micromamba/envs/pypy/lib/pypy3.9/site-packages/matplotlib/axes/_base.py", line 2555, in _process_unit_info
    axis.update_units(data)
  File "/home/lesteve/micromamba/envs/pypy/lib/pypy3.9/site-packages/matplotlib/axis.py", line 1706, in update_units
    converter = munits.registry.get_converter(data)
  File "/home/lesteve/micromamba/envs/pypy/lib/pypy3.9/site-packages/matplotlib/units.py", line 183, in get_converter
    first = cbook._safe_first_finite(x)
  File "/home/lesteve/micromamba/envs/pypy/lib/pypy3.9/site-packages/matplotlib/cbook.py", line 1730, in _safe_first_finite
    if safe_isfinite(val):
  File "/home/lesteve/micromamba/envs/pypy/lib/pypy3.9/site-packages/matplotlib/cbook.py", line 1699, in safe_isfinite
    return math.isfinite(val)
ValueError: could not convert string to float: 'A'

@lesteve
Copy link
Member

lesteve commented Nov 6, 2023

Looks like this issue does not exist in matplotlib 3.8.1 for PyPy, so fixed by #27687

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 a pull request may close this issue.

3 participants