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

catboost: tweak, fix build #370663

Merged
merged 1 commit into from
Jan 3, 2025
Merged

Conversation

lucasew
Copy link
Contributor

@lucasew lucasew commented Jan 3, 2025

This is a dependency of orange3. Merging this would fix orange3 by consequence.

  • catboost: tweak, fix build

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

Signed-off-by: lucasew <lucas59356@gmail.com>
@GaetanLepage
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 370663


x86_64-linux

❌ 8 packages failed to build:
  • python312Packages.catboost
  • python312Packages.catboost.dist
  • python312Packages.orange3
  • python312Packages.orange3.dist
  • python313Packages.catboost
  • python313Packages.catboost.dist
  • python313Packages.orange3
  • python313Packages.orange3.dist
✅ 2 packages built:
  • catboost
  • catboost.dev

x86_64-darwin

⏩ 10 packages marked as broken and skipped:
  • catboost
  • catboost.dev
  • python312Packages.catboost
  • python312Packages.catboost.dist
  • python312Packages.orange3
  • python312Packages.orange3.dist
  • python313Packages.catboost
  • python313Packages.catboost.dist
  • python313Packages.orange3
  • python313Packages.orange3.dist

aarch64-darwin

⏩ 4 packages marked as broken and skipped:
  • python312Packages.orange3
  • python312Packages.orange3.dist
  • python313Packages.orange3
  • python313Packages.orange3.dist
❌ 4 packages failed to build:
  • python312Packages.catboost
  • python312Packages.catboost.dist
  • python313Packages.catboost
  • python313Packages.catboost.dist
✅ 2 packages built:
  • catboost
  • catboost.dev

@GaetanLepage
Copy link
Contributor

@lucasew Would you be able to fix the failures ? Please, ping me if you need the logs.

@lucasew
Copy link
Contributor Author

lucasew commented Jan 3, 2025

@lucasew Would you be able to fix the failures ? Please, ping me if you need the logs.

Working on that

@lucasew
Copy link
Contributor Author

lucasew commented Jan 3, 2025

The rabbit hole is much deeper than I expected

@lucasew
Copy link
Contributor Author

lucasew commented Jan 3, 2025

catboost> Check whether the following modules can be imported: catboost
catboost> Traceback (most recent call last):
catboost>   File "<string>", line 1, in <module>
catboost>   File "<string>", line 1, in <lambda>
catboost>   File "/nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/lib/python3.12/importlib/__init__.py", line 90, in import_module
catboost>     return _bootstrap._gcd_import(name[level:], package, level)
catboost>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
catboost>   File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
catboost>   File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
catboost>   File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
catboost>   File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
catboost>   File "<frozen importlib._bootstrap_external>", line 999, in exec_module
catboost>   File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
catboost>   File "/nix/store/m65h8awffiai2snjag7pjilq09kz75rw-python3.12-catboost-1.2.7/lib/python3.12/site-packages/catboost/__init__.py", line 1, in <module>
catboost>     from .core import (
catboost>   File "/nix/store/m65h8awffiai2snjag7pjilq09kz75rw-python3.12-catboost-1.2.7/lib/python3.12/site-packages/catboost/core.py", line 45, in <module>
catboost>     from .plot_helpers import save_plot_file, try_plot_offline, OfflineMetricVisualizer
catboost>   File "/nix/store/m65h8awffiai2snjag7pjilq09kz75rw-python3.12-catboost-1.2.7/lib/python3.12/site-packages/catboost/plot_helpers.py", line 5, in <module>
catboost>     from . import _catboost
catboost>   File "_catboost.pyx", line 1, in init _catboost
catboost> ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

@GaetanLepage
Copy link
Contributor

catboost> Check whether the following modules can be imported: catboost
catboost> Traceback (most recent call last):
catboost>   File "<string>", line 1, in <module>
catboost>   File "<string>", line 1, in <lambda>
catboost>   File "/nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/lib/python3.12/importlib/__init__.py", line 90, in import_module
catboost>     return _bootstrap._gcd_import(name[level:], package, level)
catboost>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
catboost>   File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
catboost>   File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
catboost>   File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
catboost>   File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
catboost>   File "<frozen importlib._bootstrap_external>", line 999, in exec_module
catboost>   File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
catboost>   File "/nix/store/m65h8awffiai2snjag7pjilq09kz75rw-python3.12-catboost-1.2.7/lib/python3.12/site-packages/catboost/__init__.py", line 1, in <module>
catboost>     from .core import (
catboost>   File "/nix/store/m65h8awffiai2snjag7pjilq09kz75rw-python3.12-catboost-1.2.7/lib/python3.12/site-packages/catboost/core.py", line 45, in <module>
catboost>     from .plot_helpers import save_plot_file, try_plot_offline, OfflineMetricVisualizer
catboost>   File "/nix/store/m65h8awffiai2snjag7pjilq09kz75rw-python3.12-catboost-1.2.7/lib/python3.12/site-packages/catboost/plot_helpers.py", line 5, in <module>
catboost>     from . import _catboost
catboost>   File "_catboost.pyx", line 1, in init _catboost
catboost> ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

Try to rm -rf catboost in preCheck.
This happens sometimes with python package: it will import the module from the source files instead of the installed package.

@lucasew
Copy link
Contributor Author

lucasew commented Jan 3, 2025

It didn't work

BTW catboost seems to work. I think I will deliver this first and deal with the python package in another PR.

Copy link
Contributor

@GaetanLepage GaetanLepage left a comment

Choose a reason for hiding this comment

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

Sure, fine by me, let's merge this !

@GaetanLepage GaetanLepage merged commit 2707aa7 into NixOS:master Jan 3, 2025
21 of 23 checks passed
@emilazy
Copy link
Member

emilazy commented Jan 3, 2025

FWIW this uses CUDA 11 which is scheduled for removal from 25.05. It’s probably worth trying to bump it to CUDA 12 if there’s interest in keeping it working.

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

Successfully merging this pull request may close these issues.

3 participants