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

lightgbm v4.6.0 #70

Merged
merged 9 commits into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 0 additions & 17 deletions recipe/boost_shared.diff

This file was deleted.

12 changes: 6 additions & 6 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{% set version = "4.5.0" %}
{% set version = "4.6.0" %}

package:
name: liblightgbm
version: {{ version }}

source:
url: https://pypi.org/packages/source/l/lightgbm/lightgbm-{{ version }}.tar.gz
sha256: e1cd7baf0318d4e308a26575a63a4635f08df866ad3622a9d8e3d71d9637a1ba
sha256: cb1c59720eb569389c0ba74d14f52351b573af489f230032a1c9f314f8bab7fe
patches:
- boost_shared.diff
- patches/0001-boost-shared.patch
# Taken from https://github.com/microsoft/LightGBM/blob/v4.5.0/build-python.sh#L308-L316
# except that we don't copy lib_lightgbm.so to SP_DIR
- use_precompiled.diff
- patches/0002-use-precompiled.patch

build:
number: 4
number: 0
string: cuda_h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version != "None"]
string: cpu_h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version == "None"]
# CUDA is not supported in windows
Expand Down Expand Up @@ -80,7 +80,7 @@ outputs:
- dask >=2.0.0
- pandas >=0.24.0
- pyarrow >=6.0.1
- scikit-learn !=0.22.0
- scikit-learn >=0.24.2
Copy link
Member Author

Choose a reason for hiding this comment

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

test:
files:
- python_run_test.py
Expand Down
11 changes: 11 additions & 0 deletions recipe/patches/0001-boost-shared.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -191,7 +191,7 @@ if(USE_GPU)
include_directories(${OpenCL_INCLUDE_DIRS})
message(STATUS "OpenCL include directory: " ${OpenCL_INCLUDE_DIRS})
if(WIN32)
- set(Boost_USE_STATIC_LIBS ON)
+ set(Boost_USE_STATIC_LIBS OFF)
endif()
find_package(Boost 1.56.0 COMPONENTS filesystem system REQUIRED)
if(WIN32)
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
diff --git a/lightgbm/libpath.py b/lightgbm/libpath.py
index a55e736..0ee2c7f 100644
index 0e6b8425..a6f843c0 100644
--- a/lightgbm/libpath.py
+++ b/lightgbm/libpath.py
@@ -4,6 +4,7 @@
@@ -6,6 +6,7 @@ from os import environ
from pathlib import Path
from platform import system
from typing import List
+import sys

__all__: List[str] = []

@@ -16,15 +17,14 @@ def find_lib_path() -> List[str]:
@@ -18,15 +19,14 @@ def _find_lib_path() -> List[str]:
lib_path: list of str
List of all found library paths to LightGBM.
"""
Expand All @@ -31,32 +31,32 @@ index a55e736..0ee2c7f 100644
dll_path = [p / "lib_lightgbm.dll" for p in dll_path]
elif system() == "Darwin":
dll_path = [p / "lib_lightgbm.dylib" for p in dll_path]
diff --git a/pyproject.toml b/pyproject.toml
index 6234464..74de135 100644
diff --git a//pyproject.toml b/pyproject.toml
index fa281078..3e35059f 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -54,35 +54,11 @@ documentation = "https://lightgbm.readthedocs.io/en/latest/"
@@ -55,35 +55,11 @@ documentation = "https://lightgbm.readthedocs.io/en/latest/"
repository = "https://github.com/microsoft/LightGBM.git"
changelog = "https://github.com/microsoft/LightGBM/releases"

-# start:build-system
[build-system]
-
-requires = ["scikit-build-core>=0.9.3"]
-requires = ["scikit-build-core>=0.10.1"]
-build-backend = "scikit_build_core.build"
-
-# based on https://github.com/scikit-build/scikit-build-core#configuration
-[tool.scikit-build]
-
-cmake.version = ">=3.18"
-cmake.version = "CMakeLists.txt"
-ninja.version = ">=1.11"
-ninja.make-fallback = true
-cmake.args = [
- "-D__BUILD_FOR_PYTHON:BOOL=ON"
-]
-cmake.verbose = false
-build.verbose = false
-cmake.build-type = "Release"
-cmake.targets = ["_lightgbm"]
-build.targets = ["_lightgbm"]
-# stripping binaries should be turned back on once this is fixed:
-# https://github.com/jameslamb/pydistcheck/issues/235
-install.strip = false
Expand All @@ -65,13 +65,13 @@ index 6234464..74de135 100644
-wheel.py-api = "py3"
-experimental = false
-strict-config = false
-minimum-version = "0.9.3"
-minimum-version = "build-system.requires"
-
-# end:build-system
+requires = ["setuptools"]
+build-backend = "setuptools.build_meta"
+[tool.setuptools.packages]
+find = {}

[tool.isort]
include_trailing_comma = true
[tool.mypy]
disallow_untyped_defs = true