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

Restrict numpy<2 and bump actions #38

Merged
merged 2 commits into from
Jun 18, 2024
Merged

Conversation

tylerjthomas9
Copy link
Collaborator

Ref #37

I also went ahead and bumped the actions to prevent issues down the road (since this library is less actively developed).

Copy link

codecov bot commented Jun 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.55%. Comparing base (28930d4) to head (64c95d7).
Report is 1 commits behind head on main.

Current head 64c95d7 differs from pull request most recent head b6458f9

Please upload reports for the commit b6458f9 to get more accurate results.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #38   +/-   ##
=======================================
  Coverage   75.55%   75.55%           
=======================================
  Files           6        6           
  Lines         180      180           
=======================================
  Hits          136      136           
  Misses         44       44           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tylerjthomas9
Copy link
Collaborator Author

@ablaom Restricting numpy seemed to fix the issue

@ablaom
Copy link
Member

ablaom commented Jun 18, 2024

Great work and quick diagnosis! Many thanks.

Is this an issue that should be fixed at PythonCall.jl (it is already tagged here) or is this "expected behaviour" and we just merge your fix (here and in all the other effected packages)?

@tylerjthomas9
Copy link
Collaborator Author

I did not realize that it broke PythonCall.jl. Ideally, it would be fixed there, and we could pin a minimum PythonCall.jl version.

@tylerjthomas9
Copy link
Collaborator Author

I am struggling to reproduce the numpy issues with just PythonCall.jl. However, I can't import catboost from the created Python environment. Our error is happening when importing catboost in Python. I have tried pip and conda installing catboost, and neither one seems to work.

Python 3.12.4 | packaged by conda-forge | (main, Jun 17 2024, 10:23:07) [GCC 12.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import catboost
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/tmp/jl_mlbQrt/.CondaPkg/env/lib/python3.12/site-packages/catboost/__init__.py", line 1, in <module>
    from .core import (
  File "/tmp/jl_mlbQrt/.CondaPkg/env/lib/python3.12/site-packages/catboost/core.py", line 45, in <module>
    from .plot_helpers import save_plot_file, try_plot_offline, OfflineMetricVisualizer
  File "/tmp/jl_mlbQrt/.CondaPkg/env/lib/python3.12/site-packages/catboost/plot_helpers.py", line 5, in <module>
    from . import _catboost
  File "_catboost.pyx", line 1, in init _catboost
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
>>> 

@tylerjthomas9
Copy link
Collaborator Author

catboost/catboost#2671

It looks like catboost might restrict numpy to 1.x until the packages are rebuilt for numpy 2.0. I feel like we should just restrict numpy until it is resolved.

@ablaom ablaom closed this Jun 18, 2024
@ablaom ablaom reopened this Jun 18, 2024
@ablaom ablaom self-requested a review June 18, 2024 19:54
Copy link
Member

@ablaom ablaom left a comment

Choose a reason for hiding this comment

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

Looks good, thank you for the prompt action. 🙏🏾

@ablaom ablaom merged commit 445ba4b into JuliaAI:main Jun 18, 2024
12 of 14 checks passed
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 this pull request may close these issues.

2 participants