From unknown Tue Jun 17 22:28:10 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48388] [PATCH 0/3] Add xgboost. Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 12 May 2021 23:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48388 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48388@debbugs.gnu.org Cc: Vinicius Monego X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162086385728085 (code B ref -1); Wed, 12 May 2021 23:58:01 +0000 Received: (at submit) by debbugs.gnu.org; 12 May 2021 23:57:37 +0000 Received: from localhost ([127.0.0.1]:40876 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgyjQ-0007Iv-O7 for submit@debbugs.gnu.org; Wed, 12 May 2021 19:57:36 -0400 Received: from lists.gnu.org ([209.51.188.17]:39556) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgyjO-0007In-Tl for submit@debbugs.gnu.org; Wed, 12 May 2021 19:57:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgyjO-0000ay-Ks for guix-patches@gnu.org; Wed, 12 May 2021 19:57:34 -0400 Received: from mout02.posteo.de ([185.67.36.66]:52763) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgyjM-0000mZ-5X for guix-patches@gnu.org; Wed, 12 May 2021 19:57:34 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 1593C2400E5 for ; Thu, 13 May 2021 01:57:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1620863849; bh=Phpww3JIAHh31UtAOQoO/1bUMzlrRTaK2rxj3uYzDd0=; h=From:To:Cc:Subject:Date:From; b=mD8QiFHITlfVnYBwnMnuOAwofEuxoCCXScuSqx8+gMeduugNADtdE8CiOnuMoZb5I pTpd4BnrMwoJuu2MBy4R4Dw60dTw0bxQVwpJFUe1bP77+EwPYXKcp8M2a4NYdEfSrF HWCfwJNOH/56Tr59CLL0I4E3dBeMTdSmyvHZ0uwbHX7My6+mN9yn1OHoNp81yESPYQ PvhV69NzOwYb/FHB0CZIVb8+JystuWwy2lQNBed9IckCS80JTM6J2GamdUnfJN4JJu el/yNVNZONgwZYOhbEEx/hD6PId95UtRAKdzm/wlBOUbd/IgzkRdOH97YG1unJucC9 mzIEwluERVT6w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FgWtb25x1z6tm6; Thu, 13 May 2021 01:57:26 +0200 (CEST) From: Vinicius Monego Date: Wed, 12 May 2021 23:56:49 +0000 Message-Id: <20210512235649.516594-1-monego@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=185.67.36.66; envelope-from=monego@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) This patchset adds the binaries, C++ library and Python frontend for the XGBoost gradient boosting framework. I noticed r-xgboost in the packages, which compiles a bundled copy of xgboost. Ideally it would inherit from xgboost and build from there, but I do not work with R so I can't help with this. I also had to do some dirty hack in the python patch for reading version and using libxgboost from the xgboost package. Lmk is there is a better way to handle this. Vinicius Monego (3): gnu: Add dmlc-core. gnu: Add xgboost. gnu: Add python-xgboost. gnu/local.mk | 2 + gnu/packages/machine-learning.scm | 125 ++++++++++++++++++ ...xgboost-python-use-system-libxgboost.patch | 69 ++++++++++ .../xgboost-use-system-dmlc-core.patch | 35 +++++ 4 files changed, 231 insertions(+) create mode 100644 gnu/packages/patches/xgboost-python-use-system-libxgboost.patch create mode 100644 gnu/packages/patches/xgboost-use-system-dmlc-core.patch -- 2.31.1 From unknown Tue Jun 17 22:28:10 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48388] [PATCH 1/3] gnu: Add dmlc-core. References: <20210512235649.516594-1-monego@posteo.net> In-Reply-To: <20210512235649.516594-1-monego@posteo.net> Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 13 May 2021 00:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48388 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48388@debbugs.gnu.org Cc: Vinicius Monego Received: via spool by 48388-submit@debbugs.gnu.org id=B48388.162086396428297 (code B ref 48388); Thu, 13 May 2021 00:00:02 +0000 Received: (at 48388) by debbugs.gnu.org; 12 May 2021 23:59:24 +0000 Received: from localhost ([127.0.0.1]:40889 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgyl9-0007ML-RO for submit@debbugs.gnu.org; Wed, 12 May 2021 19:59:24 -0400 Received: from mout02.posteo.de ([185.67.36.66]:37747) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgyl8-0007M9-AO for 48388@debbugs.gnu.org; Wed, 12 May 2021 19:59:22 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 8474C2400E5 for <48388@debbugs.gnu.org>; Thu, 13 May 2021 01:59:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1620863956; bh=69WaDf0/HMG4guA2bJQNz/F2M8osnU2/ABRNoKtZVJA=; h=From:To:Cc:Subject:Date:From; b=FNVyLgl3H4W6TKmKkugFARZEC5C4VV6C+J5Qj2TlP1UaBAWv3xqpHc6Eqt7xV2I8T J/xn3GgsiNEx+dU8gaR0N3bCRo1dcYpxT1aTbRh1PVaunxrA2FNDLbi+de0fWtKT5A 8/yFPTJ+SHS9Jha4sXAvS1KoTuORqtp+5CR9VRfF/TX0vdMbMS7sWGMvMNsvl2Sc9l Pqgh6Xloc+BGmteHVv9JhswbE7fotElK/7bDyVMw2owRHtt57C1qT3+E8aXoeJVAVK 9KZuXos/RDThA3y97oUP3x4VA2ALA1WtjxHnac6al5JWQ7TYW4L5M8JEYnL/dQp0zS dRzZ680PmyXRw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FgWwf5R8xz6tm4; Thu, 13 May 2021 01:59:14 +0200 (CEST) From: Vinicius Monego Date: Wed, 12 May 2021 23:58:42 +0000 Message-Id: <20210512235844.516970-1-monego@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/machine-learning.scm (dmlc-core): New variable. --- gnu/packages/machine-learning.scm | 32 +++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 837ebbba67..9d6c5505f7 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -1927,6 +1927,38 @@ together building blocks and a subclassing API with an imperative style for advanced research.") (license license:asl2.0))) +(define-public dmlc-core + ;; Version 0.4 is too old for xgboost. + (let ((version "0.5") + (commit "f00e3ec7abc9f293a1b7061157b0a4e22a735cf5") + (revision "0")) + (package + (name "dmlc-core") + (version (git-version version revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dmlc/dmlc-core") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1x4ad1jhn84fywlk031fmv1kxyiscclmrqn9hhj8gz0mh7z9vcrh")))) + (build-system cmake-build-system) + (arguments + `(#:configure-flags + (list "-DGOOGLE_TEST=ON"))) + (native-inputs + `(("googletest" ,googletest) + ("python" ,python-wrapper))) + (home-page "https://github.com/dmlc/dmlc-core") + (synopsis "Common bricks library for machine learning") + (description + "DMLC-Core is the backbone library to support all DMLC projects, +offers the bricks to build efficient and scalable distributed machine +learning libraries.") + (license license:asl2.0)))) + (define-public python-iml (package (name "python-iml") -- 2.31.1 From unknown Tue Jun 17 22:28:10 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48388] [PATCH 2/3] gnu: Add xgboost. Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 13 May 2021 00:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48388 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48388@debbugs.gnu.org Cc: Vinicius Monego Received: via spool by 48388-submit@debbugs.gnu.org id=B48388.162086397528323 (code B ref 48388); Thu, 13 May 2021 00:00:02 +0000 Received: (at 48388) by debbugs.gnu.org; 12 May 2021 23:59:35 +0000 Received: from localhost ([127.0.0.1]:40892 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgylL-0007Mj-2g for submit@debbugs.gnu.org; Wed, 12 May 2021 19:59:35 -0400 Received: from mout01.posteo.de ([185.67.36.65]:55115) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgylI-0007MV-Nc for 48388@debbugs.gnu.org; Wed, 12 May 2021 19:59:33 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 7EB98240026 for <48388@debbugs.gnu.org>; Thu, 13 May 2021 01:59:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1620863966; bh=RElfYXUTPE2tdCZSEUR0bYB9Tnkabn8+IwOhKWrhM6A=; h=From:To:Cc:Subject:Date:From; b=neqJQd+3UfzxEcd6jfoyQ6tHg8eikFHENHMRIGttsAf/XB1eFWyPCQK93/gGv5Mze qEf4W6NI10hCZOTPOwSEnjDEMiRYJXBjMPpP/LOhkKvCzzvFEKEQb/s1DPYJ7RL3Oy e4QWdBMGvambYm97yEPsKiBV21AzYqOhEt4N64nDJq3Nxl5Bxw2pis0e2z0lth7uy/ Q/tkzVgUy9tjqL0PWAVdV2g8KxzwQE3Q3Zj0vN1OFd4cTXwc3WXiugf+zfeEf0XrOz pS9gmNC6yWjspBL2FQxmDKd/3FGKXNXEvL5eGJ8Z3IY20h9UTIna7mmjzL/Kt/cPRy 1qZMdCuGeQjKg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FgWwr5f2Kz6tm6; Thu, 13 May 2021 01:59:24 +0200 (CEST) From: Vinicius Monego Date: Wed, 12 May 2021 23:58:43 +0000 Message-Id: <20210512235844.516970-2-monego@posteo.net> In-Reply-To: <20210512235844.516970-1-monego@posteo.net> References: <20210512235844.516970-1-monego@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/machine-learning.scm (xgboost): New variable. --- gnu/local.mk | 2 + gnu/packages/machine-learning.scm | 33 +++++++++ ...xgboost-python-use-system-libxgboost.patch | 69 +++++++++++++++++++ .../xgboost-use-system-dmlc-core.patch | 35 ++++++++++ 4 files changed, 139 insertions(+) create mode 100644 gnu/packages/patches/xgboost-python-use-system-libxgboost.patch create mode 100644 gnu/packages/patches/xgboost-use-system-dmlc-core.patch diff --git a/gnu/local.mk b/gnu/local.mk index 37166bb2fc..e1d382c543 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1823,6 +1823,8 @@ dist_patch_DATA = \ %D%/packages/patches/xf86-video-voodoo-pcitag.patch \ %D%/packages/patches/xfce4-panel-plugins.patch \ %D%/packages/patches/xfce4-settings-defaults.patch \ + %D%/packages/patches/xgboost-python-use-system-libxgboost.patch \ + %D%/packages/patches/xgboost-use-system-dmlc-core.patch \ %D%/packages/patches/xmonad-dynamic-linking.patch \ %D%/packages/patches/xplanet-1.3.1-cxx11-eof.patch \ %D%/packages/patches/xplanet-1.3.1-libdisplay_DisplayOutput.cpp.patch \ diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 9d6c5505f7..fd10de427f 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -1959,6 +1959,39 @@ offers the bricks to build efficient and scalable distributed machine learning libraries.") (license license:asl2.0)))) +(define-public xgboost + (package + (name "xgboost") + (version "1.4.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dmlc/xgboost") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (patches (search-patches "xgboost-python-use-system-libxgboost.patch" + "xgboost-use-system-dmlc-core.patch")) + (sha256 + (base32 "0ixacmpcj844c09xigi1vd4rrckld84k32iarvhnvvm6yjih756y")))) + (build-system cmake-build-system) + (arguments + `(#:configure-flags (list "-DGOOGLE_TEST=ON"))) + (native-inputs + `(("googletest" ,googletest) + ("python" ,python-wrapper))) + (inputs + `(("dmlc-core" ,dmlc-core))) + (home-page "https://xgboost.ai/") + (synopsis "Gradient boosting (GBDT, GBRT or GBM) library in C++") + (description + "XGBoost is an optimized distributed gradient boosting library designed +to be highly efficient, flexible and portable. It implements machine learning +algorithms under the Gradient Boosting framework. XGBoost provides a parallel +tree boosting (also known as GBDT, GBM) that solve many data science problems +in a fast and accurate way.") + (license license:asl2.0))) + (define-public python-iml (package (name "python-iml") diff --git a/gnu/packages/patches/xgboost-python-use-system-libxgboost.patch b/gnu/packages/patches/xgboost-python-use-system-libxgboost.patch new file mode 100644 index 0000000000..992e6bb3fd --- /dev/null +++ b/gnu/packages/patches/xgboost-python-use-system-libxgboost.patch @@ -0,0 +1,69 @@ +From 768192b9c6700f0ae6b750c56b114d7022692a0b Mon Sep 17 00:00:00 2001 +From: Vinicius Monego +Date: Tue, 11 May 2021 19:30:55 -0300 +Subject: [PATCH] Python wrapper: use system libxgboost. + +--- +This patch was extended from the following Debian patch: https://sources.debian.org/src/xgboost/1.2.1-1/debian/patches/setup.py.patch/ + + python-package/setup.py | 4 ++-- + python-package/xgboost/__init__.py | 5 ++--- + python-package/xgboost/libpath.py | 5 +++++ + 3 files changed, 9 insertions(+), 5 deletions(-) + +diff --git a/python-package/setup.py b/python-package/setup.py +index a2feb766..b8b78429 100644 +--- a/python-package/setup.py ++++ b/python-package/setup.py +@@ -312,11 +312,11 @@ if __name__ == '__main__': + 'numpy', + 'scipy', + ], +- ext_modules=[CMakeExtension('libxgboost')], ++ # ext_modules=[CMakeExtension('libxgboost')], + cmdclass={ + 'build_ext': BuildExt, + 'sdist': Sdist, +- 'install_lib': InstallLib, ++ # 'install_lib': InstallLib, + 'install': Install + }, + extras_require={ +diff --git a/python-package/xgboost/__init__.py b/python-package/xgboost/__init__.py +index e0ff434d..658e84e6 100644 +--- a/python-package/xgboost/__init__.py ++++ b/python-package/xgboost/__init__.py +@@ -21,9 +21,8 @@ try: + except ImportError: + pass + +-VERSION_FILE = os.path.join(os.path.dirname(__file__), 'VERSION') +-with open(VERSION_FILE) as f: +- __version__ = f.read().strip() ++# This variable will be set during substitution. ++__version__ = '' + + __all__ = ['DMatrix', 'DeviceQuantileDMatrix', 'Booster', + 'train', 'cv', +diff --git a/python-package/xgboost/libpath.py b/python-package/xgboost/libpath.py +index f7a7d9cd..88d9d986 100644 +--- a/python-package/xgboost/libpath.py ++++ b/python-package/xgboost/libpath.py +@@ -19,9 +19,14 @@ def find_lib_path() -> List[str]: + lib_path + List of all found library path to xgboost + """ ++ ++ # This variable will be set during substitution. ++ XGBOOST_PATH = '' ++ + curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__))) + dll_path = [ + # normal, after installation `lib` is copied into Python package tree. ++ os.path.join(XGBOOST_PATH, 'lib'), + os.path.join(curr_path, 'lib'), + # editable installation, no copying is performed. + os.path.join(curr_path, os.path.pardir, os.path.pardir, 'lib'), +-- +2.31.1 + diff --git a/gnu/packages/patches/xgboost-use-system-dmlc-core.patch b/gnu/packages/patches/xgboost-use-system-dmlc-core.patch new file mode 100644 index 0000000000..6209ae1f10 --- /dev/null +++ b/gnu/packages/patches/xgboost-use-system-dmlc-core.patch @@ -0,0 +1,35 @@ +From 34167cc105e47589b86b6f62da76e0ab744002dd Mon Sep 17 00:00:00 2001 +From: Vinicius Monego +Date: Tue, 11 May 2021 19:35:30 -0300 +Subject: [PATCH] Use dmlc-core from Guix. + +--- +This patch is a subset from the following Debian patch: https://sources.debian.org/src/xgboost/1.2.1-1/debian/patches/cmake.patch/ + +Rabit is now developed as part of xgboost, so we don't build it separately. + + CMakeLists.txt | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6cc19fbd..3b42bc17 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -150,11 +150,9 @@ endif (USE_OPENMP) + + # dmlc-core + msvc_use_static_runtime() +-add_subdirectory(${xgboost_SOURCE_DIR}/dmlc-core) +-set_target_properties(dmlc PROPERTIES +- CXX_STANDARD 14 +- CXX_STANDARD_REQUIRED ON +- POSITION_INDEPENDENT_CODE ON) ++add_library(dmlc SHARED IMPORTED) ++find_library(DMLC_LIBRARY dmlc) ++set_property(TARGET dmlc PROPERTY IMPORTED_LOCATION "${DMLC_LIBRARY}") + if (MSVC) + target_compile_options(dmlc PRIVATE + -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE) +-- +2.31.1 + -- 2.31.1 From unknown Tue Jun 17 22:28:10 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48388] [PATCH 3/3] gnu: Add python-xgboost. Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 13 May 2021 00:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48388 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48388@debbugs.gnu.org Cc: Vinicius Monego Received: via spool by 48388-submit@debbugs.gnu.org id=B48388.162086398328342 (code B ref 48388); Thu, 13 May 2021 00:00:02 +0000 Received: (at 48388) by debbugs.gnu.org; 12 May 2021 23:59:43 +0000 Received: from localhost ([127.0.0.1]:40895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgylS-0007N4-JK for submit@debbugs.gnu.org; Wed, 12 May 2021 19:59:42 -0400 Received: from mout02.posteo.de ([185.67.36.66]:56795) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgylQ-0007Mk-EP for 48388@debbugs.gnu.org; Wed, 12 May 2021 19:59:41 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id B967D2400E5 for <48388@debbugs.gnu.org>; Thu, 13 May 2021 01:59:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1620863974; bh=Q2QSvtbR3k465/+kNKjA5fBdXSo2cgDx6VjPMpmhYIY=; h=From:To:Cc:Subject:Date:From; b=iVDlYDDraEyf94ECnTaLb6dxGI1lhx+41OJgBf3k86shAXY0k16mk9Zi8oWdEnlMw e2xxMUspYOol4R3ve/MoztturBnGkeMXMZLEvp1xepDe6tJOcBNahB2zWRbt57bUeT PvQpTBcGH36CWsLV3BuH9P6egeGIRNNNc0SQG52qwvJicJ1PO59bEsOu9Y0CbJZPRG rybmlGB59zRppMf3kA2vG/YCKd1jg0lt09blBn8eHbiK1mfPFW5CzBWFHVMi5J8K+o q2RXz/Mb/ky26Kos6C56NZOthqrZDBonMQuBt2UofNtBasaTeRxbN2/Qito+WZhO+q ABa3pqFqfoO+Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FgWx12nkzz6tm6; Thu, 13 May 2021 01:59:33 +0200 (CEST) From: Vinicius Monego Date: Wed, 12 May 2021 23:58:44 +0000 Message-Id: <20210512235844.516970-3-monego@posteo.net> In-Reply-To: <20210512235844.516970-1-monego@posteo.net> References: <20210512235844.516970-1-monego@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/machine-learning.scm (python-xgboost): New variable. --- gnu/packages/machine-learning.scm | 60 +++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index fd10de427f..f7bb01f274 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -1992,6 +1992,66 @@ tree boosting (also known as GBDT, GBM) that solve many data science problems in a fast and accurate way.") (license license:asl2.0))) +(define-public python-xgboost + (package + (inherit xgboost) + (name "python-xgboost") + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'preparations + (lambda* (#:key inputs #:allow-other-keys) + ;; Move python-package content to parent directory to silence + ;; some warnings about files not being found if we chdir. + (rename-file "python-package/xgboost" "xgboost") + (rename-file "python-package/README.rst" "README.rst") + (rename-file "python-package/setup.cfg" "setup.cfg") + (rename-file "python-package/setup.py" "setup.py") + + (with-directory-excursion "xgboost" + ;; Version is read from a VERSION file, but that file is not + ;; part of the installation. + (substitute* "__init__.py" + (("__version__ = ''") + (string-append "__version__ = " "'" + ,(package-version xgboost) "'"))) + ;; The Python wrapper expects libxgboost to be found in the + ;; same source from where the wrapper builds. This workaround + ;; allows libxgboost to be used from the xgboost package. + (substitute* "libpath.py" + (("XGBOOST_PATH = ''") + (string-append "XGBOOST_PATH = " + "'" (assoc-ref inputs "xgboost") "'")))) + #t)) + (replace 'check + ;; Python-specific tests are located in tests/python. + (lambda* (#:key inputs outputs #:allow-other-keys) + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "tests/python" + ;; FIXME: CLI tests fail with PermissionError. + "--ignore" "tests/python/test_cli.py" "-k" + (string-append + "not test_cli_regression_demo" + ;; The tests below open a network connection. + " and not test_model_compatibility" + " and not test_get_group" + " and not test_cv_no_shuffle" + " and not test_cv" + " and not test_training" + ;; "'['./runexp.sh']' returned non-zero exit status 1." + " and not test_cli_binary_classification"))))))) + (native-inputs + `(("python-pandas" ,python-pandas) + ("python-pytest" ,python-pytest) + ("python-scikit-learn" ,python-scikit-learn))) + (inputs + `(("xgboost" ,xgboost))) + (propagated-inputs + `(("python-numpy" ,python-numpy) + ("python-scipy" ,python-scipy))) + (synopsis "Python interface for the XGBoost library"))) + (define-public python-iml (package (name "python-iml") -- 2.31.1 From unknown Tue Jun 17 22:28:10 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48388] [PATCH v2 2/3] gnu: Add xgboost. References: <20210512235649.516594-1-monego@posteo.net> In-Reply-To: <20210512235649.516594-1-monego@posteo.net> Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 13 May 2021 15:30:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48388 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48388@debbugs.gnu.org Cc: Vinicius Monego Received: via spool by 48388-submit@debbugs.gnu.org id=B48388.162091979824725 (code B ref 48388); Thu, 13 May 2021 15:30:01 +0000 Received: (at 48388) by debbugs.gnu.org; 13 May 2021 15:29:58 +0000 Received: from localhost ([127.0.0.1]:44129 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhDHe-0006Qd-7p for submit@debbugs.gnu.org; Thu, 13 May 2021 11:29:58 -0400 Received: from mout01.posteo.de ([185.67.36.65]:37709) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhDHY-0006QJ-Ud for 48388@debbugs.gnu.org; Thu, 13 May 2021 11:29:52 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id AE9CF240028 for <48388@debbugs.gnu.org>; Thu, 13 May 2021 17:29:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1620919782; bh=0UDHA3OEHYrRaHc9HS6tInpd3VR8FZCRTbZ9AjtfKOM=; h=From:To:Cc:Subject:Date:From; b=HLmpVCdKJEe826H/YEp4QZNwGuQGsTTo7W+TdaOEYEzOLCfvR81GYChLi25l2aGyZ XXUIkp8jsEq0EYwf5y7zvObrRk9InGiEIgeUSmx1r82hSMWf0yWZ9HF561aeijj+LL ZXTQRufExM811PA1zkvBKz+a0EQ3sBdwy/O9h99/wx45l9f71Tdeu7ckI/RQXoGFwv 3QQCCMV2MDBxrWKE6GZ+kj2M0JvSsTJ7luLlu+wJJ8LI8UhED1p2iysEU7Zq5wxwVE XMAyQ4E6Sh7WImcLKpU45ngyZWh8hlIq0nhTQrgESn4c67dF9naCNvQqC0fS9NxPu9 k1y2OHVjL8riA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FgwZD4t5Gz9rxK; Thu, 13 May 2021 17:29:40 +0200 (CEST) From: Vinicius Monego Date: Thu, 13 May 2021 15:29:13 +0000 Message-Id: <20210513152914.573837-1-monego@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/machine-learning.scm (xgboost): New variable. * gnu/packages/patches/xgboost-python-use-system-libxgboost.patch, gnu/packages/patches/xgboost-use-system-dmlc-core.patch: New files. * gnu/local.mk (dist_PATCH_DATA): Add them. --- Changed commit message to add patch files. gnu/local.mk | 2 + gnu/packages/machine-learning.scm | 33 +++++++++ ...xgboost-python-use-system-libxgboost.patch | 69 +++++++++++++++++++ .../xgboost-use-system-dmlc-core.patch | 35 ++++++++++ 4 files changed, 139 insertions(+) create mode 100644 gnu/packages/patches/xgboost-python-use-system-libxgboost.patch create mode 100644 gnu/packages/patches/xgboost-use-system-dmlc-core.patch diff --git a/gnu/local.mk b/gnu/local.mk index 37166bb2fc..e1d382c543 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1823,6 +1823,8 @@ dist_patch_DATA = \ %D%/packages/patches/xf86-video-voodoo-pcitag.patch \ %D%/packages/patches/xfce4-panel-plugins.patch \ %D%/packages/patches/xfce4-settings-defaults.patch \ + %D%/packages/patches/xgboost-python-use-system-libxgboost.patch \ + %D%/packages/patches/xgboost-use-system-dmlc-core.patch \ %D%/packages/patches/xmonad-dynamic-linking.patch \ %D%/packages/patches/xplanet-1.3.1-cxx11-eof.patch \ %D%/packages/patches/xplanet-1.3.1-libdisplay_DisplayOutput.cpp.patch \ diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 9d6c5505f7..d81370797f 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -1959,6 +1959,39 @@ offers the bricks to build efficient and scalable distributed machine learning libraries.") (license license:asl2.0)))) +(define-public xgboost + (package + (name "xgboost") + (version "1.4.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dmlc/xgboost") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (patches (search-patches "xgboost-python-use-system-libxgboost.patch" + "xgboost-use-system-dmlc-core.patch")) + (sha256 + (base32 "0ixacmpcj844c09xigi1vd4rrckld84k32iarvhnvvm6yjih756y")))) + (build-system cmake-build-system) + (arguments + `(#:configure-flags (list "-DGOOGLE_TEST=ON"))) + (native-inputs + `(("googletest" ,googletest) + ("python" ,python-wrapper))) + (inputs + `(("dmlc-core" ,dmlc-core))) + (home-page "https://xgboost.ai/") + (synopsis "Gradient boosting (GBDT, GBRT or GBM) library in C++") + (description + "XGBoost is an optimized distributed gradient boosting library designed +to be highly efficient, flexible and portable. It implements machine learning +algorithms under the Gradient Boosting framework. XGBoost provides a parallel +tree boosting (also known as GBDT, GBM) that solve many data science problems +in a fast and accurate way.") + (license license:asl2.0))) + (define-public python-iml (package (name "python-iml") diff --git a/gnu/packages/patches/xgboost-python-use-system-libxgboost.patch b/gnu/packages/patches/xgboost-python-use-system-libxgboost.patch new file mode 100644 index 0000000000..992e6bb3fd --- /dev/null +++ b/gnu/packages/patches/xgboost-python-use-system-libxgboost.patch @@ -0,0 +1,69 @@ +From 768192b9c6700f0ae6b750c56b114d7022692a0b Mon Sep 17 00:00:00 2001 +From: Vinicius Monego +Date: Tue, 11 May 2021 19:30:55 -0300 +Subject: [PATCH] Python wrapper: use system libxgboost. + +--- +This patch was extended from the following Debian patch: https://sources.debian.org/src/xgboost/1.2.1-1/debian/patches/setup.py.patch/ + + python-package/setup.py | 4 ++-- + python-package/xgboost/__init__.py | 5 ++--- + python-package/xgboost/libpath.py | 5 +++++ + 3 files changed, 9 insertions(+), 5 deletions(-) + +diff --git a/python-package/setup.py b/python-package/setup.py +index a2feb766..b8b78429 100644 +--- a/python-package/setup.py ++++ b/python-package/setup.py +@@ -312,11 +312,11 @@ if __name__ == '__main__': + 'numpy', + 'scipy', + ], +- ext_modules=[CMakeExtension('libxgboost')], ++ # ext_modules=[CMakeExtension('libxgboost')], + cmdclass={ + 'build_ext': BuildExt, + 'sdist': Sdist, +- 'install_lib': InstallLib, ++ # 'install_lib': InstallLib, + 'install': Install + }, + extras_require={ +diff --git a/python-package/xgboost/__init__.py b/python-package/xgboost/__init__.py +index e0ff434d..658e84e6 100644 +--- a/python-package/xgboost/__init__.py ++++ b/python-package/xgboost/__init__.py +@@ -21,9 +21,8 @@ try: + except ImportError: + pass + +-VERSION_FILE = os.path.join(os.path.dirname(__file__), 'VERSION') +-with open(VERSION_FILE) as f: +- __version__ = f.read().strip() ++# This variable will be set during substitution. ++__version__ = '' + + __all__ = ['DMatrix', 'DeviceQuantileDMatrix', 'Booster', + 'train', 'cv', +diff --git a/python-package/xgboost/libpath.py b/python-package/xgboost/libpath.py +index f7a7d9cd..88d9d986 100644 +--- a/python-package/xgboost/libpath.py ++++ b/python-package/xgboost/libpath.py +@@ -19,9 +19,14 @@ def find_lib_path() -> List[str]: + lib_path + List of all found library path to xgboost + """ ++ ++ # This variable will be set during substitution. ++ XGBOOST_PATH = '' ++ + curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__))) + dll_path = [ + # normal, after installation `lib` is copied into Python package tree. ++ os.path.join(XGBOOST_PATH, 'lib'), + os.path.join(curr_path, 'lib'), + # editable installation, no copying is performed. + os.path.join(curr_path, os.path.pardir, os.path.pardir, 'lib'), +-- +2.31.1 + diff --git a/gnu/packages/patches/xgboost-use-system-dmlc-core.patch b/gnu/packages/patches/xgboost-use-system-dmlc-core.patch new file mode 100644 index 0000000000..6209ae1f10 --- /dev/null +++ b/gnu/packages/patches/xgboost-use-system-dmlc-core.patch @@ -0,0 +1,35 @@ +From 34167cc105e47589b86b6f62da76e0ab744002dd Mon Sep 17 00:00:00 2001 +From: Vinicius Monego +Date: Tue, 11 May 2021 19:35:30 -0300 +Subject: [PATCH] Use dmlc-core from Guix. + +--- +This patch is a subset from the following Debian patch: https://sources.debian.org/src/xgboost/1.2.1-1/debian/patches/cmake.patch/ + +Rabit is now developed as part of xgboost, so we don't build it separately. + + CMakeLists.txt | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6cc19fbd..3b42bc17 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -150,11 +150,9 @@ endif (USE_OPENMP) + + # dmlc-core + msvc_use_static_runtime() +-add_subdirectory(${xgboost_SOURCE_DIR}/dmlc-core) +-set_target_properties(dmlc PROPERTIES +- CXX_STANDARD 14 +- CXX_STANDARD_REQUIRED ON +- POSITION_INDEPENDENT_CODE ON) ++add_library(dmlc SHARED IMPORTED) ++find_library(DMLC_LIBRARY dmlc) ++set_property(TARGET dmlc PROPERTY IMPORTED_LOCATION "${DMLC_LIBRARY}") + if (MSVC) + target_compile_options(dmlc PRIVATE + -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE) +-- +2.31.1 + -- 2.31.1 From unknown Tue Jun 17 22:28:10 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48388] [PATCH v2 3/3] gnu: Add python-xgboost. Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 13 May 2021 15:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48388 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48388@debbugs.gnu.org Cc: Vinicius Monego Received: via spool by 48388-submit@debbugs.gnu.org id=B48388.162091980324794 (code B ref 48388); Thu, 13 May 2021 15:31:02 +0000 Received: (at 48388) by debbugs.gnu.org; 13 May 2021 15:30:03 +0000 Received: from localhost ([127.0.0.1]:44134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhDHn-0006Rp-43 for submit@debbugs.gnu.org; Thu, 13 May 2021 11:30:03 -0400 Received: from mout01.posteo.de ([185.67.36.65]:53811) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhDHk-0006Qf-75 for 48388@debbugs.gnu.org; Thu, 13 May 2021 11:30:01 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id A8148240027 for <48388@debbugs.gnu.org>; Thu, 13 May 2021 17:29:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1620919794; bh=iiz3by/8gf5WVlxfI4zF9AzCCkl4pIAgHbiRUwVMG+k=; h=From:To:Cc:Subject:Date:From; b=H9S3E/r5Rh8XjtoZ6CHd0jf9pMFXT1tnVpg/K967VjqpaBIaEUUlego1SHc+Mdl0y AhjaT9zGaGtO6zqkHMDQ/4XnOlrTJvcMQ9mTfPY3PzoP4cXSu7/DnqEBwE2uvTgNC/ MD41l6Tocky8aUOWIX8emeKDmH2nIFpWTJ4q7gjcmz+YtjqBdji69wjDYPgLPx2fE4 NEB05ub2x3EBXv5saMXDJw0ZDF8CM10YQ80WXjqpY272idhC9D6GRUHwBjfkSMFmkH dptAAjPMhIznWaSl0V/akiG+E/p9CJJNBj/0UNtQz0J8SnnSoHMxtzBZykosqmDW5G d3C8V2KM/DgXw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FgwZT2s1Jz9rxP; Thu, 13 May 2021 17:29:53 +0200 (CEST) From: Vinicius Monego Date: Thu, 13 May 2021 15:29:14 +0000 Message-Id: <20210513152914.573837-2-monego@posteo.net> In-Reply-To: <20210513152914.573837-1-monego@posteo.net> References: <20210513152914.573837-1-monego@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/machine-learning.scm (python-xgboost): New variable. --- Added (when tests?) in check phase to allow --without-tests. gnu/packages/machine-learning.scm | 62 +++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index d81370797f..ead47a534a 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -1992,6 +1992,68 @@ tree boosting (also known as GBDT, GBM) that solve many data science problems in a fast and accurate way.") (license license:asl2.0))) +(define-public python-xgboost + (package + (inherit xgboost) + (name "python-xgboost") + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'preparations + (lambda* (#:key inputs #:allow-other-keys) + ;; Move python-package content to parent directory to silence + ;; some warnings about files not being found if we chdir. + (rename-file "python-package/xgboost" "xgboost") + (rename-file "python-package/README.rst" "README.rst") + (rename-file "python-package/setup.cfg" "setup.cfg") + (rename-file "python-package/setup.py" "setup.py") + + (with-directory-excursion "xgboost" + ;; Version is read from a VERSION file, but that file is not + ;; part of the installation. + (substitute* "__init__.py" + (("__version__ = ''") + (string-append "__version__ = " "'" + ,(package-version xgboost) "'"))) + ;; The Python wrapper expects libxgboost to be found in the + ;; same source from where the wrapper builds. This workaround + ;; allows libxgboost to be used from the xgboost package. + (substitute* "libpath.py" + (("XGBOOST_PATH = ''") + (string-append "XGBOOST_PATH = " + "'" (assoc-ref inputs "xgboost") "'")))) + #t)) + (replace 'check + ;; Python-specific tests are located in tests/python. + (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (when tests? + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "tests/python" + ;; FIXME: CLI tests fail with PermissionError. + "--ignore" "tests/python/test_cli.py" "-k" + (string-append + "not test_cli_regression_demo" + ;; The tests below open a network connection. + " and not test_model_compatibility" + " and not test_get_group" + " and not test_cv_no_shuffle" + " and not test_cv" + " and not test_training" + ;; "'['./runexp.sh']' returned non-zero exit status 1" + " and not test_cli_binary_classification"))) + #t))))) + (native-inputs + `(("python-pandas" ,python-pandas) + ("python-pytest" ,python-pytest) + ("python-scikit-learn" ,python-scikit-learn))) + (inputs + `(("xgboost" ,xgboost))) + (propagated-inputs + `(("python-numpy" ,python-numpy) + ("python-scipy" ,python-scipy))) + (synopsis "Python interface for the XGBoost library"))) + (define-public python-iml (package (name "python-iml") -- 2.31.1 From unknown Tue Jun 17 22:28:10 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48388] [PATCH v3 2/3] gnu: Add xgboost. Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Jun 2021 17:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48388 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48388@debbugs.gnu.org Cc: Vinicius Monego Received: via spool by 48388-submit@debbugs.gnu.org id=B48388.162481539525354 (code B ref 48388); Sun, 27 Jun 2021 17:37:02 +0000 Received: (at 48388) by debbugs.gnu.org; 27 Jun 2021 17:36:35 +0000 Received: from localhost ([127.0.0.1]:50340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lxYhu-0006am-52 for submit@debbugs.gnu.org; Sun, 27 Jun 2021 13:36:34 -0400 Received: from mout02.posteo.de ([185.67.36.66]:36141) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lxYhs-0006aW-CR for 48388@debbugs.gnu.org; Sun, 27 Jun 2021 13:36:33 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id BAB642400FC for <48388@debbugs.gnu.org>; Sun, 27 Jun 2021 19:36:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1624815386; bh=S9mfeahNo5Hkic/abvFhNcrOY9vnZnye5McLefaiU0E=; h=From:To:Cc:Subject:Date:From; b=RErBS6aEXQrh0dcBeWmhhxA+VcbFPsVCubyzw0lgcwg65WS92h0m2os1IvYl29iXR QZrvkueJ9eOYwheFqCWZ0TsEfOWUd9r4DmN257Z6yhAU54/XmnELpX6KGlL42ID+zv VhKv8wkaRWGmlF3kSU+2MZqRPkkPCQrpAib31edTzrunBDdyCARupnQQf6rHdAL6FW uxiKRzshm5URjQWY4J2C80IsNMbSJ0hezj32l0p3hmykNrIkW3BpSjJWSb+B44Oclb GnxBLH9Gf5wzsfYcCNIr648zLtxleuBJtwVPK+hYU1FLiII3OAAVGmL/2krXfgbPks K9dktxbMNnrqg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4GCdFj3C68z6tmQ; Sun, 27 Jun 2021 19:36:25 +0200 (CEST) From: Vinicius Monego Date: Sun, 27 Jun 2021 17:30:46 +0000 Message-Id: <20210627173047.2576-2-monego@posteo.net> In-Reply-To: <20210627173047.2576-1-monego@posteo.net> References: <20210627173047.2576-1-monego@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/machine-learning.scm (xgboost): New variable. * gnu/packages/patches/xgboost-use-system-dmlc-core.patch: New patch. * gnu/local.mk (dist_patch_DATA): Add it. --- Removed the python patch, updated to 1.4.2 and removed "in C++" from synopsis. gnu/local.mk | 1 + gnu/packages/machine-learning.scm | 32 +++++++++++++++++ .../xgboost-use-system-dmlc-core.patch | 34 +++++++++++++++++++ 3 files changed, 67 insertions(+) create mode 100644 gnu/packages/patches/xgboost-use-system-dmlc-core.patch diff --git a/gnu/local.mk b/gnu/local.mk index f7ff9af997..19db9787dc 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1842,6 +1842,7 @@ dist_patch_DATA = \ %D%/packages/patches/xf86-video-voodoo-pcitag.patch \ %D%/packages/patches/xfce4-panel-plugins.patch \ %D%/packages/patches/xfce4-settings-defaults.patch \ + %D%/packages/patches/xgboost-use-system-dmlc-core.patch \ %D%/packages/patches/xmonad-dynamic-linking.patch \ %D%/packages/patches/xplanet-1.3.1-cxx11-eof.patch \ %D%/packages/patches/xplanet-1.3.1-libdisplay_DisplayOutput.cpp.patch \ diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 9d6c5505f7..bbdfba960e 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -1959,6 +1959,38 @@ offers the bricks to build efficient and scalable distributed machine learning libraries.") (license license:asl2.0)))) +(define-public xgboost + (package + (name "xgboost") + (version "1.4.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dmlc/xgboost") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (patches (search-patches "xgboost-use-system-dmlc-core.patch")) + (sha256 + (base32 "00liz816ahk9zj3jv3m2fqwlf6xxfbgvpmpl72iklx32vl192w5d")))) + (build-system cmake-build-system) + (arguments + `(#:configure-flags (list "-DGOOGLE_TEST=ON"))) + (native-inputs + `(("googletest" ,googletest) + ("python" ,python-wrapper))) + (inputs + `(("dmlc-core" ,dmlc-core))) + (home-page "https://xgboost.ai/") + (synopsis "Gradient boosting (GBDT, GBRT or GBM) library") + (description + "XGBoost is an optimized distributed gradient boosting library designed +to be highly efficient, flexible and portable. It implements machine learning +algorithms under the Gradient Boosting framework. XGBoost provides a parallel +tree boosting (also known as GBDT, GBM) that solve many data science problems +in a fast and accurate way.") + (license license:asl2.0))) + (define-public python-iml (package (name "python-iml") diff --git a/gnu/packages/patches/xgboost-use-system-dmlc-core.patch b/gnu/packages/patches/xgboost-use-system-dmlc-core.patch new file mode 100644 index 0000000000..c654694fec --- /dev/null +++ b/gnu/packages/patches/xgboost-use-system-dmlc-core.patch @@ -0,0 +1,34 @@ +From 34167cc105e47589b86b6f62da76e0ab744002dd Mon Sep 17 00:00:00 2001 +From: Vinicius Monego +Date: Tue, 11 May 2021 19:35:30 -0300 +Subject: [PATCH] Use dmlc-core from Guix. + +--- +This patch is a subset of the following Debian patch: https://sources.debian.org/src/xgboost/1.2.1-1/debian/patches/cmake.patch/ + +Rabit is now developed as part of xgboost, so we don't build it separately. + + CMakeLists.txt | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6cc19fbd..3b42bc17 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -150,11 +150,9 @@ endif (USE_OPENMP) + + # dmlc-core + msvc_use_static_runtime() +-add_subdirectory(${xgboost_SOURCE_DIR}/dmlc-core) +-set_target_properties(dmlc PROPERTIES +- CXX_STANDARD 14 +- CXX_STANDARD_REQUIRED ON +- POSITION_INDEPENDENT_CODE ON) ++add_library(dmlc SHARED IMPORTED) ++find_library(DMLC_LIBRARY dmlc) ++set_property(TARGET dmlc PROPERTY IMPORTED_LOCATION "${DMLC_LIBRARY}") + if (MSVC) + target_compile_options(dmlc PRIVATE + -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE) +-- +2.31.1 -- 2.32.0 From unknown Tue Jun 17 22:28:10 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48388] [PATCH v3 1/3] gnu: Add dmlc-core. References: <20210512235649.516594-1-monego@posteo.net> In-Reply-To: <20210512235649.516594-1-monego@posteo.net> Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Jun 2021 17:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48388 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48388@debbugs.gnu.org Cc: Vinicius Monego Received: via spool by 48388-submit@debbugs.gnu.org id=B48388.162481539925374 (code B ref 48388); Sun, 27 Jun 2021 17:37:02 +0000 Received: (at 48388) by debbugs.gnu.org; 27 Jun 2021 17:36:39 +0000 Received: from localhost ([127.0.0.1]:50343 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lxYhy-0006bA-SE for submit@debbugs.gnu.org; Sun, 27 Jun 2021 13:36:39 -0400 Received: from mout02.posteo.de ([185.67.36.66]:52549) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lxYhr-0006aR-Ss for 48388@debbugs.gnu.org; Sun, 27 Jun 2021 13:36:34 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 59A312400E5 for <48388@debbugs.gnu.org>; Sun, 27 Jun 2021 19:36:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1624815385; bh=3VEFdUTVMGkO4BIIzxeH+UgUiIz30B/8A+mvqKR9yKg=; h=From:To:Cc:Subject:Date:From; b=rNsVPSPl8wQ17pdAHiKWLhaU70sSPHESKJ7NZ7iOZvAZFfE+h2XEq7zMr2Onb6Zfg nKpLi+QqVZORTxrbsbXQ1iZCeJ04y2gBm76vsPFxvOAL+eTD3UyvbZrucq7TlygzSJ Ic4MWxaP9fhuftlG5rPOedlMv1grH4LSSr161+PkrWrNM0I781Fh/yImuPysecQREM ZgInd8I+UCPquqP8G5WMIcIZZnY3ZK6e7gl9H3UK4f7gfPkqUwrwiXW5+FpdPE5/uB Sei6pxs3+Il+QshIjeH/qCVzd0SvAn1OjiBGZOsceY1umOofgoWetpm3QZXTupIV1f GXnENN8gxjfcQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4GCdFg5tvNz6tmW; Sun, 27 Jun 2021 19:36:23 +0200 (CEST) From: Vinicius Monego Date: Sun, 27 Jun 2021 17:30:45 +0000 Message-Id: <20210627173047.2576-1-monego@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/machine-learning.scm (dmlc-core): New variable. --- No changes. gnu/packages/machine-learning.scm | 32 +++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 837ebbba67..9d6c5505f7 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -1927,6 +1927,38 @@ together building blocks and a subclassing API with an imperative style for advanced research.") (license license:asl2.0))) +(define-public dmlc-core + ;; Version 0.4 is too old for xgboost. + (let ((version "0.5") + (commit "f00e3ec7abc9f293a1b7061157b0a4e22a735cf5") + (revision "0")) + (package + (name "dmlc-core") + (version (git-version version revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dmlc/dmlc-core") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1x4ad1jhn84fywlk031fmv1kxyiscclmrqn9hhj8gz0mh7z9vcrh")))) + (build-system cmake-build-system) + (arguments + `(#:configure-flags + (list "-DGOOGLE_TEST=ON"))) + (native-inputs + `(("googletest" ,googletest) + ("python" ,python-wrapper))) + (home-page "https://github.com/dmlc/dmlc-core") + (synopsis "Common bricks library for machine learning") + (description + "DMLC-Core is the backbone library to support all DMLC projects, +offers the bricks to build efficient and scalable distributed machine +learning libraries.") + (license license:asl2.0)))) + (define-public python-iml (package (name "python-iml") -- 2.32.0 From unknown Tue Jun 17 22:28:10 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48388] [PATCH v3 3/3] gnu: Add python-xgboost. Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Jun 2021 17:37:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48388 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48388@debbugs.gnu.org Cc: Vinicius Monego Received: via spool by 48388-submit@debbugs.gnu.org id=B48388.162481540425384 (code B ref 48388); Sun, 27 Jun 2021 17:37:03 +0000 Received: (at 48388) by debbugs.gnu.org; 27 Jun 2021 17:36:44 +0000 Received: from localhost ([127.0.0.1]:50345 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lxYhz-0006bD-Dy for submit@debbugs.gnu.org; Sun, 27 Jun 2021 13:36:44 -0400 Received: from mout02.posteo.de ([185.67.36.66]:42911) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lxYhu-0006aY-2V for 48388@debbugs.gnu.org; Sun, 27 Jun 2021 13:36:35 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 66DF52400FD for <48388@debbugs.gnu.org>; Sun, 27 Jun 2021 19:36:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1624815388; bh=l8xRl94sU+5iQaP0BOrvGFzCFFa7SN8eVqWyShHmSnw=; h=From:To:Cc:Subject:Date:From; b=eR51EcEvwOw7UdjS59/zZmEv9aLdfhE86xJDlAEKBB5NxdCRzrRlIK5FrOD7qExQi HSnqYFvonIS8EXQ04zhquNbkUGcPGPJ5MEOTu62iqQ3chvmihfGO1iRSNWc8YoQMXp SIdUIbTtyOYiI1Dgy2U7wP196iHWTtv4HLlUGjl3PUw1tFXnURJ2leKhQnROw3aYNF r6dh5u5wNKORVMLBwaTlGTGmkMBKWfIgR2Yx9kkZaYpXnTSr6esw/8OG87wFUE/SvR y7j5PffMVB4izKlSZ442aOAM+wfntT2GlPYRNVS6v52/gvTjqVZTFNH+WcO71gDt0g AxhvRnnDJF07A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4GCdFl0PHkz6tmJ; Sun, 27 Jun 2021 19:36:26 +0200 (CEST) From: Vinicius Monego Date: Sun, 27 Jun 2021 17:30:47 +0000 Message-Id: <20210627173047.2576-3-monego@posteo.net> In-Reply-To: <20210627173047.2576-1-monego@posteo.net> References: <20210627173047.2576-1-monego@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/machine-learning.scm (python-xgboost): New variable. * gnu/packages/patches/python-xgboost-use-system-libxgboost.patch: New patch. * gnu/local.mk (dist_patch_DATA): Add it. --- Changed source to inherit from xgboost. Added phase after 'install to add a VERSION file and symlink libxgboost, so it can be found at runtime. This change allowed to greatly simplify the patch. Also removed #t from phases. If this patchset is good enough now, I will do the same changes to LightGBM: http://issues.guix.gnu.org/48785 gnu/local.mk | 1 + gnu/packages/machine-learning.scm | 66 +++++++++++++++++++ ...python-xgboost-use-system-libxgboost.patch | 18 +++++ 3 files changed, 85 insertions(+) create mode 100644 gnu/packages/patches/python-xgboost-use-system-libxgboost.patch diff --git a/gnu/local.mk b/gnu/local.mk index 19db9787dc..821fd390a4 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1632,6 +1632,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-unittest2-python3-compat.patch \ %D%/packages/patches/python-unittest2-remove-argparse.patch \ %D%/packages/patches/python-waitress-fix-tests.patch \ + %D%/packages/patches/python-xgboost-use-system-libxgboost.patch \ %D%/packages/patches/pypy3-7.3.1-fix-tests.patch \ %D%/packages/patches/qemu-build-info-manual.patch \ %D%/packages/patches/qemu-CVE-2021-20203.patch \ diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index bbdfba960e..69b96ffd61 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -1991,6 +1991,72 @@ tree boosting (also known as GBDT, GBM) that solve many data science problems in a fast and accurate way.") (license license:asl2.0))) +(define-public python-xgboost + (package + (inherit xgboost) + (name "python-xgboost") + (source + (origin + (inherit (package-source xgboost)) + (patches (search-patches "python-xgboost-use-system-libxgboost.patch")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'preparations + (lambda* (#:key inputs #:allow-other-keys) + ;; Move python-package content to parent directory to silence + ;; some warnings about files not being found if we chdir. + (rename-file "python-package/xgboost" "xgboost") + (rename-file "python-package/README.rst" "README.rst") + (rename-file "python-package/setup.cfg" "setup.cfg") + (rename-file "python-package/setup.py" "setup.py"))) + (add-after 'install 'install-version-and-libxgboost + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (pylib (string-append out "/lib/python" + ,(version-major+minor + (package-version python)) + "/site-packages")) + (xgbdir (string-append pylib "/xgboost")) + (version-file (string-append xgbdir "/VERSION")) + (libxgboost (string-append (assoc-ref inputs "xgboost") + "/lib/libxgboost.so"))) + (with-output-to-file version-file + (lambda () + (display ,(package-version xgboost)))) + (mkdir-p (string-append xgbdir "/lib")) + (symlink libxgboost (string-append xgbdir "/lib" + "/libxgboost.so"))))) + (replace 'check + ;; Python-specific tests are located in tests/python. + (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (when tests? + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "tests/python" + ;; FIXME: CLI tests fail with PermissionError. + "--ignore" "tests/python/test_cli.py" "-k" + (string-append + "not test_cli_regression_demo" + ;; The tests below open a network connection. + " and not test_model_compatibility" + " and not test_get_group" + " and not test_cv_no_shuffle" + " and not test_cv" + " and not test_training" + ;; "'['./runexp.sh']' returned non-zero exit status 1" + " and not test_cli_binary_classification")))))))) + (native-inputs + `(("python-pandas" ,python-pandas) + ("python-pytest" ,python-pytest) + ("python-scikit-learn" ,python-scikit-learn))) + (inputs + `(("xgboost" ,xgboost))) + (propagated-inputs + `(("python-numpy" ,python-numpy) + ("python-scipy" ,python-scipy))) + (synopsis "Python interface for the XGBoost library"))) + (define-public python-iml (package (name "python-iml") diff --git a/gnu/packages/patches/python-xgboost-use-system-libxgboost.patch b/gnu/packages/patches/python-xgboost-use-system-libxgboost.patch new file mode 100644 index 0000000000..ce82309afd --- /dev/null +++ b/gnu/packages/patches/python-xgboost-use-system-libxgboost.patch @@ -0,0 +1,18 @@ +This patch was imported from Debian: https://sources.debian.org/src/xgboost/1.2.1-1/debian/patches/setup.py.patch/ + +Description: the libxgboost.so has been installed by another package already +Forwarded: no need +--- a/python-package/setup.py ++++ b/python-package/setup.py +@@ -286,10 +286,8 @@ + 'numpy', + 'scipy', + ], +- ext_modules=[CMakeExtension('libxgboost')], + cmdclass={ + 'build_ext': BuildExt, + 'sdist': Sdist, +- 'install_lib': InstallLib, + 'install': Install + }, + extras_require={ \ No newline at end of file -- 2.32.0 From unknown Tue Jun 17 22:28:10 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48388] [PATCH v4 3/3] gnu: Add python-xgboost. References: <20210512235649.516594-1-monego@posteo.net> In-Reply-To: <20210512235649.516594-1-monego@posteo.net> Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Jun 2021 23:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48388 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48388@debbugs.gnu.org Cc: Vinicius Monego Received: via spool by 48388-submit@debbugs.gnu.org id=B48388.162483556624603 (code B ref 48388); Sun, 27 Jun 2021 23:13:01 +0000 Received: (at 48388) by debbugs.gnu.org; 27 Jun 2021 23:12:46 +0000 Received: from localhost ([127.0.0.1]:50464 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lxdxF-0006Ol-Uh for submit@debbugs.gnu.org; Sun, 27 Jun 2021 19:12:46 -0400 Received: from mout02.posteo.de ([185.67.36.66]:43647) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lxdxD-0006OW-GN for 48388@debbugs.gnu.org; Sun, 27 Jun 2021 19:12:45 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 927B72400E5 for <48388@debbugs.gnu.org>; Mon, 28 Jun 2021 01:12:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1624835556; bh=IDTpxDDMrpUUvwuHsz9J1z7B1YeYHD+zaD4Cw0xMyiw=; h=From:To:Cc:Subject:Date:From; b=Wxe2kyJHNT+sJq+hohhpA/LbsQYq/lu2NLOkdCLbe0Y0txlyvqihBBQNj8BA7Wb8z e//Wn3mX7x/SquT4YtZdzQ5gvVI1EjOIU6zs1fUKQx7fgym+9TIFt14wk+23xiBEnA V9n4jeiVsvZC5W6NdWoDzakJj91voxjxE2oGJ0M0cJiDVzNZFFxKGGLQMlDqtZMLZ0 K00eZyJFhtkBoAAh1YiAZAQxzQIoFlaY8tqA+KIxTTunPZg/scaHU0v0dzPG00OmBa fQGtYeTH9/kWP9RcT7ApbePmVE/qsKqORodJW3qFSdHterY816wL4xCgBJ8dfmkDCZ Vpwf/0enBivWg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4GCmjZ5Jl5z6tmF; Mon, 28 Jun 2021 01:12:34 +0200 (CEST) From: Vinicius Monego Date: Sun, 27 Jun 2021 23:11:56 +0000 Message-Id: <20210627231156.25391-1-monego@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/machine-learning.scm (python-xgboost): New variable. --- Replaced the patch file with substitutions in 'preparations and changed the lambda arguments to _. gnu/packages/machine-learning.scm | 67 +++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 726d491868..b8d79821e0 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -1991,6 +1991,73 @@ tree boosting (also known as GBDT, GBM) that solve many data science problems in a fast and accurate way.") (license license:asl2.0))) +(define-public python-xgboost + (package + (inherit xgboost) + (name "python-xgboost") + (source (package-source xgboost)) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'preparations + (lambda _ + ;; Move python-package content to parent directory to silence + ;; some warnings about files not being found if we chdir. + (rename-file "python-package/xgboost" "xgboost") + (rename-file "python-package/README.rst" "README.rst") + (rename-file "python-package/setup.cfg" "setup.cfg") + (rename-file "python-package/setup.py" "setup.py") + ;; Skip rebuilding libxgboost.so. + (substitute* "setup.py" + (("ext_modules=\\[CMakeExtension\\('libxgboost'\\)\\],") "") + (("'install_lib': InstallLib,") "")))) + (add-after 'install 'install-version-and-libxgboost + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (pylib (string-append out "/lib/python" + ,(version-major+minor + (package-version python)) + "/site-packages")) + (xgbdir (string-append pylib "/xgboost")) + (version-file (string-append xgbdir "/VERSION")) + (libxgboost (string-append (assoc-ref inputs "xgboost") + "/lib/libxgboost.so"))) + (with-output-to-file version-file + (lambda () + (display ,(package-version xgboost)))) + (mkdir-p (string-append xgbdir "/lib")) + (symlink libxgboost (string-append xgbdir "/lib" + "/libxgboost.so"))))) + (replace 'check + ;; Python-specific tests are located in tests/python. + (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (when tests? + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "tests/python" + ;; FIXME: CLI tests fail with PermissionError. + "--ignore" "tests/python/test_cli.py" "-k" + (string-append + "not test_cli_regression_demo" + ;; The tests below open a network connection. + " and not test_model_compatibility" + " and not test_get_group" + " and not test_cv_no_shuffle" + " and not test_cv" + " and not test_training" + ;; "'['./runexp.sh']' returned non-zero exit status 1" + " and not test_cli_binary_classification")))))))) + (native-inputs + `(("python-pandas" ,python-pandas) + ("python-pytest" ,python-pytest) + ("python-scikit-learn" ,python-scikit-learn))) + (inputs + `(("xgboost" ,xgboost))) + (propagated-inputs + `(("python-numpy" ,python-numpy) + ("python-scipy" ,python-scipy))) + (synopsis "Python interface for the XGBoost library"))) + (define-public python-iml (package (name "python-iml") -- 2.32.0 From unknown Tue Jun 17 22:28:10 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48388] [PATCH v5 1/3] gnu: Add dmlc-core. References: <20210512235649.516594-1-monego@posteo.net> In-Reply-To: <20210512235649.516594-1-monego@posteo.net> Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Sep 2021 19:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48388 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48388@debbugs.gnu.org Cc: Vinicius Monego Received: via spool by 48388-submit@debbugs.gnu.org id=B48388.163259864016199 (code B ref 48388); Sat, 25 Sep 2021 19:38:01 +0000 Received: (at 48388) by debbugs.gnu.org; 25 Sep 2021 19:37:20 +0000 Received: from localhost ([127.0.0.1]:34806 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUDU8-0004DC-IN for submit@debbugs.gnu.org; Sat, 25 Sep 2021 15:37:20 -0400 Received: from mout01.posteo.de ([185.67.36.65]:56003) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUDU5-0004Cw-FJ for 48388@debbugs.gnu.org; Sat, 25 Sep 2021 15:37:18 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 2B82F240026 for <48388@debbugs.gnu.org>; Sat, 25 Sep 2021 21:37:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1632598631; bh=8Gm0EMhC29mMhe3gIJCvK8RJ3Gyx/pjw22T/EJEXCdw=; h=From:To:Cc:Subject:Date:From; b=AFcEmTK5mDH7TdacWzJ72HylOJ2IA/k6tJJS7OivDCMYmJnzj4YzRT//Z35mZalg6 9fDo3zPXWuHNOcHSXdwa+0LrWHM/ic6aFn/rGHL2ADHRLOYe4nlt+Fcx4RbKqyFsfY OGZEsetjy9iaB8+bZK7JaDwxkt+LjyatDT97MiPG7EUXnixl/lv6I0j6LgurZoraJX 7622ZdEztFZqekey7bdND/nk1ebVRIYjgXTd5M3LWdWATga4JVGjlGP4xqjV8KBUeW XrZEzMGeDnBZ0KCklKmEhiANsn2HlHudJZU4/BOcSXpy1tDNEH9OjifPktouyMW0pU 7hQH6+ISragJA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4HGzgV0Q9fz9rxF; Sat, 25 Sep 2021 21:37:09 +0200 (CEST) From: Vinicius Monego Date: Sat, 25 Sep 2021 19:36:49 +0000 Message-Id: <20210925193651.155981-1-monego@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/machine-learning.scm (dmlc-core): New variable. --- Checked out from v0.5 tag instead of a commit. gnu/packages/machine-learning.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 9b5d4c1743..a4768211a0 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -2310,6 +2310,34 @@ learning models. This package provides the \"lite\" variant for mobile devices.") (license license:asl2.0))) +(define-public dmlc-core + (package + (name "dmlc-core") + (version "0.5") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dmlc/dmlc-core") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1x4ad1jhn84fywlk031fmv1kxyiscclmrqn9hhj8gz0mh7z9vcrh")))) + (build-system cmake-build-system) + (arguments + `(#:configure-flags + (list "-DGOOGLE_TEST=ON"))) + (native-inputs + `(("googletest" ,googletest) + ("python" ,python-wrapper))) + (home-page "https://github.com/dmlc/dmlc-core") + (synopsis "Common bricks library for machine learning") + (description + "DMLC-Core is the backbone library to support all DMLC projects, +offers the bricks to build efficient and scalable distributed machine +learning libraries.") + (license license:asl2.0))) + (define-public python-iml (package (name "python-iml") -- 2.30.2 From unknown Tue Jun 17 22:28:10 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48388] [PATCH v5 2/3] gnu: Add xgboost. Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Sep 2021 19:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48388 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48388@debbugs.gnu.org Cc: Vinicius Monego Received: via spool by 48388-submit@debbugs.gnu.org id=B48388.163259864516215 (code B ref 48388); Sat, 25 Sep 2021 19:38:01 +0000 Received: (at 48388) by debbugs.gnu.org; 25 Sep 2021 19:37:25 +0000 Received: from localhost ([127.0.0.1]:34810 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUDUC-0004DT-Pp for submit@debbugs.gnu.org; Sat, 25 Sep 2021 15:37:25 -0400 Received: from mout02.posteo.de ([185.67.36.66]:44643) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUDU9-0004D2-V0 for 48388@debbugs.gnu.org; Sat, 25 Sep 2021 15:37:22 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id C4498240104 for <48388@debbugs.gnu.org>; Sat, 25 Sep 2021 21:37:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1632598635; bh=xnMoUZ8vJTV2dOAgopDJf8GN6iHrCij0cUzeZYvOOMo=; h=From:To:Cc:Subject:Date:From; b=eXSIByJ6aGJHe16QWWEC+is99r2sE0HvrSs7/SIwnSxBw81SNAhZ7nCcI+optIlLx lzE9snRFhPImW078Zj6XrX97Vdk/vfGO/QyU7KBLrkyRpsXoylIrEGa2TQsoEmso+2 K2oQnfmJHQLpevcV9paWT7RbMN8l9ubw3dfLABzvCpage+LUqLNcSIaOqxbWmNasN4 W5k0QkK1sByff9s8m23Yq/HIaS2+JbXoxv9DR/mlhzCgXeBxpiXcLoYL/lhkAlnix2 kGqSY/9mIixsCrltOZDnI0OHxnzhe4Mz9clfVEBjXi27eS0fmICoGaQ90BVaI//CJJ dFsWq9N2mfmuw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4HGzgZ3wRSz6tm4; Sat, 25 Sep 2021 21:37:13 +0200 (CEST) From: Vinicius Monego Date: Sat, 25 Sep 2021 19:36:50 +0000 Message-Id: <20210925193651.155981-2-monego@posteo.net> In-Reply-To: <20210925193651.155981-1-monego@posteo.net> References: <20210925193651.155981-1-monego@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/machine-learning.scm (xgboost): New variable. * gnu/packages/patches/xgboost-use-system-dmlc-core.patch: New patch. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/machine-learning.scm | 32 +++++++++++++++++ .../xgboost-use-system-dmlc-core.patch | 34 +++++++++++++++++++ 3 files changed, 67 insertions(+) create mode 100644 gnu/packages/patches/xgboost-use-system-dmlc-core.patch diff --git a/gnu/local.mk b/gnu/local.mk index 7d706f6f6e..22fc393f0e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1888,6 +1888,7 @@ dist_patch_DATA = \ %D%/packages/patches/xf86-video-voodoo-pcitag.patch \ %D%/packages/patches/xfce4-panel-plugins.patch \ %D%/packages/patches/xfce4-settings-defaults.patch \ + %D%/packages/patches/xgboost-use-system-dmlc-core.patch \ %D%/packages/patches/xmonad-dynamic-linking.patch \ %D%/packages/patches/xnnpack-system-libraries.patch \ %D%/packages/patches/xplanet-1.3.1-cxx11-eof.patch \ diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index a4768211a0..454088b1a5 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -2338,6 +2338,38 @@ offers the bricks to build efficient and scalable distributed machine learning libraries.") (license license:asl2.0))) +(define-public xgboost + (package + (name "xgboost") + (version "1.4.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dmlc/xgboost") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (patches (search-patches "xgboost-use-system-dmlc-core.patch")) + (sha256 + (base32 "00liz816ahk9zj3jv3m2fqwlf6xxfbgvpmpl72iklx32vl192w5d")))) + (build-system cmake-build-system) + (arguments + `(#:configure-flags (list "-DGOOGLE_TEST=ON"))) + (native-inputs + `(("googletest" ,googletest) + ("python" ,python-wrapper))) + (inputs + `(("dmlc-core" ,dmlc-core))) + (home-page "https://xgboost.ai/") + (synopsis "Gradient boosting (GBDT, GBRT or GBM) library") + (description + "XGBoost is an optimized distributed gradient boosting library designed +to be highly efficient, flexible and portable. It implements machine learning +algorithms under the Gradient Boosting framework. XGBoost provides a parallel +tree boosting (also known as GBDT, GBM) that solve many data science problems +in a fast and accurate way.") + (license license:asl2.0))) + (define-public python-iml (package (name "python-iml") diff --git a/gnu/packages/patches/xgboost-use-system-dmlc-core.patch b/gnu/packages/patches/xgboost-use-system-dmlc-core.patch new file mode 100644 index 0000000000..c654694fec --- /dev/null +++ b/gnu/packages/patches/xgboost-use-system-dmlc-core.patch @@ -0,0 +1,34 @@ +From 34167cc105e47589b86b6f62da76e0ab744002dd Mon Sep 17 00:00:00 2001 +From: Vinicius Monego +Date: Tue, 11 May 2021 19:35:30 -0300 +Subject: [PATCH] Use dmlc-core from Guix. + +--- +This patch is a subset of the following Debian patch: https://sources.debian.org/src/xgboost/1.2.1-1/debian/patches/cmake.patch/ + +Rabit is now developed as part of xgboost, so we don't build it separately. + + CMakeLists.txt | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6cc19fbd..3b42bc17 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -150,11 +150,9 @@ endif (USE_OPENMP) + + # dmlc-core + msvc_use_static_runtime() +-add_subdirectory(${xgboost_SOURCE_DIR}/dmlc-core) +-set_target_properties(dmlc PROPERTIES +- CXX_STANDARD 14 +- CXX_STANDARD_REQUIRED ON +- POSITION_INDEPENDENT_CODE ON) ++add_library(dmlc SHARED IMPORTED) ++find_library(DMLC_LIBRARY dmlc) ++set_property(TARGET dmlc PROPERTY IMPORTED_LOCATION "${DMLC_LIBRARY}") + if (MSVC) + target_compile_options(dmlc PRIVATE + -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE) +-- +2.31.1 -- 2.30.2 From unknown Tue Jun 17 22:28:10 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48388] [PATCH v5 3/3] gnu: Add python-xgboost. Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Sep 2021 19:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48388 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48388@debbugs.gnu.org Cc: Vinicius Monego Received: via spool by 48388-submit@debbugs.gnu.org id=B48388.163259865716241 (code B ref 48388); Sat, 25 Sep 2021 19:38:02 +0000 Received: (at 48388) by debbugs.gnu.org; 25 Sep 2021 19:37:37 +0000 Received: from localhost ([127.0.0.1]:34814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUDUP-0004Ds-7n for submit@debbugs.gnu.org; Sat, 25 Sep 2021 15:37:37 -0400 Received: from mout01.posteo.de ([185.67.36.65]:33705) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUDUM-0004De-Py for 48388@debbugs.gnu.org; Sat, 25 Sep 2021 15:37:36 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 371B324002B for <48388@debbugs.gnu.org>; Sat, 25 Sep 2021 21:37:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1632598649; bh=kyxvv8Pr7r+uYqDvOawQkesQ2kER/FH2DuWhfduva+c=; h=From:To:Cc:Subject:Date:From; b=H0CG86xWm0iFCg58siyXpginLrg0qN3wmjUYEpZEwbDtRHy4W3oX/XcoDZ+vetcvY 0lUxNUhy/RseovarurF1PdgxTXBxrYzInD4WSHbb3+yl5mnEYSq0ylFSDPbfExzr4K /fkAG+wTBR1GBnbt0VUcHOWNo9f+uwjzrgrNA16o/bfLbKXmiSfPdCvBEsIVw945dC Co/ULGp7sBhmZ7tYghs26GWU72gfSeAwvVgpdAG9QvGy9py+pdvb/IO2UMdKS6ETLU vDEHUV5kgAKQCOOmSVlwOOTssDi9z8uPOIMJ1mbRD0rKay0yikRXXJQ4AwNdQXKSuC gPQNnfddLMWTA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4HGzgf4nxDz9rxN; Sat, 25 Sep 2021 21:37:18 +0200 (CEST) From: Vinicius Monego Date: Sat, 25 Sep 2021 19:36:51 +0000 Message-Id: <20210925193651.155981-3-monego@posteo.net> In-Reply-To: <20210925193651.155981-1-monego@posteo.net> References: <20210925193651.155981-1-monego@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/machine-learning.scm (python-xgboost): New variable. --- Skipped a test that fails in Pandas 1.3.0. gnu/packages/machine-learning.scm | 69 +++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 454088b1a5..5e17b09e89 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -2370,6 +2370,75 @@ tree boosting (also known as GBDT, GBM) that solve many data science problems in a fast and accurate way.") (license license:asl2.0))) +(define-public python-xgboost + (package + (inherit xgboost) + (name "python-xgboost") + (source (package-source xgboost)) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'preparations + (lambda _ + ;; Move python-package content to parent directory to silence + ;; some warnings about files not being found if we chdir. + (rename-file "python-package/xgboost" "xgboost") + (rename-file "python-package/README.rst" "README.rst") + (rename-file "python-package/setup.cfg" "setup.cfg") + (rename-file "python-package/setup.py" "setup.py") + ;; Skip rebuilding libxgboost.so. + (substitute* "setup.py" + (("ext_modules=\\[CMakeExtension\\('libxgboost'\\)\\],") "") + (("'install_lib': InstallLib,") "")))) + (add-after 'install 'install-version-and-libxgboost + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (pylib (string-append out "/lib/python" + ,(version-major+minor + (package-version python)) + "/site-packages")) + (xgbdir (string-append pylib "/xgboost")) + (version-file (string-append xgbdir "/VERSION")) + (libxgboost (string-append (assoc-ref inputs "xgboost") + "/lib/libxgboost.so"))) + (with-output-to-file version-file + (lambda () + (display ,(package-version xgboost)))) + (mkdir-p (string-append xgbdir "/lib")) + (symlink libxgboost (string-append xgbdir "/lib" + "/libxgboost.so"))))) + (replace 'check + ;; Python-specific tests are located in tests/python. + (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (when tests? + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "tests/python" + ;; FIXME: CLI tests fail with PermissionError. + "--ignore" "tests/python/test_cli.py" "-k" + (string-append + "not test_cli_regression_demo" + ;; The tests below open a network connection. + " and not test_model_compatibility" + " and not test_get_group" + " and not test_cv_no_shuffle" + " and not test_cv" + " and not test_training" + ;; FIXME: May pass in the next version. + " and not test_pandas" + ;; "'['./runexp.sh']' returned non-zero exit status 1" + " and not test_cli_binary_classification")))))))) + (native-inputs + `(("python-pandas" ,python-pandas) + ("python-pytest" ,python-pytest) + ("python-scikit-learn" ,python-scikit-learn))) + (inputs + `(("xgboost" ,xgboost))) + (propagated-inputs + `(("python-numpy" ,python-numpy) + ("python-scipy" ,python-scipy))) + (synopsis "Python interface for the XGBoost library"))) + (define-public python-iml (package (name "python-iml") -- 2.30.2 From unknown Tue Jun 17 22:28:10 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Vinicius Monego Subject: bug#48388: closed (Re: [bug#48388] [PATCH v5 1/3] gnu: Add dmlc-core.) Message-ID: References: <20210512235649.516594-1-monego@posteo.net> X-Gnu-PR-Message: they-closed 48388 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 48388@debbugs.gnu.org Date: Sat, 25 Sep 2021 20:15:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1632600902-19971-1" This is a multi-part message in MIME format... ------------=_1632600902-19971-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #48388: [PATCH 0/3] Add xgboost. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 48388@debbugs.gnu.org. --=20 48388: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D48388 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1632600902-19971-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 48388-done) by debbugs.gnu.org; 25 Sep 2021 20:14:49 +0000 Received: from localhost ([127.0.0.1]:34864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUE4P-0005Ba-0Z for submit@debbugs.gnu.org; Sat, 25 Sep 2021 16:14:49 -0400 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:46443) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUE4J-0005BH-Ab for 48388-done@debbugs.gnu.org; Sat, 25 Sep 2021 16:14:47 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 0CDC33200974; Sat, 25 Sep 2021 16:14:36 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sat, 25 Sep 2021 16:14:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=mesmtp; bh=hQIzN6fx+enANddNNlCwukF4 n+iVLgwLeZFPSIxxis4=; b=a3CpMJ3Ect/iucFMn3PFRoGd/PrPT3mdmJJwQtpj npNkCFa1Z+ZjOMQMCRGWmW4vCU62mmc4mlNNsjtQ90Z+FlsnqiO44B0Ugm12J9ef Rt/7Eg4hdBTQWdz3RM1uFdND1fP0UkwV4KLF1uVWuC3vpSLTPCWFAmFjHj+WdTMP xrk= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=hQIzN6 fx+enANddNNlCwukF4n+iVLgwLeZFPSIxxis4=; b=bLGWvaVVZjN+q/HxgraBQt QsVSAvQ1wFsn3DCqK8365N3QlYEqF5oNC3POqYdk4FL93ZFNL49TBuzyxn70kBLh xAr9WrtGHtZHSUls0wuXQ/OvlJy4Gv5Bb2LWE4ojLIOtY7N7PVIy6pM6+2gXlJCm rf3S4jJnsatGbquCZGLEECOySEZ2OQLMsHkcl2rfSgv9hbEMTm2IrqqlzkrZps33 kB0p1GWBCqKnjt6HH969QIi8H5EwDApdslA5PF1JAvYYVbJSdHep1MUzkN20u5gf fxD1682V/DtB+4XQDAyqmFEsGfR3f4vk41d5f+/enO6rTj53ogZ1lbxCGrlF1g3w == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudejfedgudeggecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepnfgvohcu hfgrmhhulhgrrhhiuceolhgvohesfhgrmhhulhgrrhhirdhnrghmvgeqnecuggftrfgrth htvghrnhepueekkedtffdvtddugeejgedtvefhueefiedvjeeitdeigedtveejvdejheff vefgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheplh gvohesfhgrmhhulhgrrhhirdhnrghmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 25 Sep 2021 16:14:36 -0400 (EDT) Date: Sat, 25 Sep 2021 16:14:34 -0400 From: Leo Famulari To: Vinicius Monego Subject: Re: [bug#48388] [PATCH v5 1/3] gnu: Add dmlc-core. Message-ID: References: <20210512235649.516594-1-monego@posteo.net> <20210925193651.155981-1-monego@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210925193651.155981-1-monego@posteo.net> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48388-done Cc: 48388-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Sat, Sep 25, 2021 at 07:36:49PM +0000, Vinicius Monego wrote: > * gnu/packages/machine-learning.scm (dmlc-core): New variable. Thanks! I pushed v5 of this patch series as commit 40a6d8eb7de42248c886c447a299256853054912 ------------=_1632600902-19971-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 12 May 2021 23:57:37 +0000 Received: from localhost ([127.0.0.1]:40876 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgyjQ-0007Iv-O7 for submit@debbugs.gnu.org; Wed, 12 May 2021 19:57:36 -0400 Received: from lists.gnu.org ([209.51.188.17]:39556) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgyjO-0007In-Tl for submit@debbugs.gnu.org; Wed, 12 May 2021 19:57:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgyjO-0000ay-Ks for guix-patches@gnu.org; Wed, 12 May 2021 19:57:34 -0400 Received: from mout02.posteo.de ([185.67.36.66]:52763) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgyjM-0000mZ-5X for guix-patches@gnu.org; Wed, 12 May 2021 19:57:34 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 1593C2400E5 for ; Thu, 13 May 2021 01:57:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1620863849; bh=Phpww3JIAHh31UtAOQoO/1bUMzlrRTaK2rxj3uYzDd0=; h=From:To:Cc:Subject:Date:From; b=mD8QiFHITlfVnYBwnMnuOAwofEuxoCCXScuSqx8+gMeduugNADtdE8CiOnuMoZb5I pTpd4BnrMwoJuu2MBy4R4Dw60dTw0bxQVwpJFUe1bP77+EwPYXKcp8M2a4NYdEfSrF HWCfwJNOH/56Tr59CLL0I4E3dBeMTdSmyvHZ0uwbHX7My6+mN9yn1OHoNp81yESPYQ PvhV69NzOwYb/FHB0CZIVb8+JystuWwy2lQNBed9IckCS80JTM6J2GamdUnfJN4JJu el/yNVNZONgwZYOhbEEx/hD6PId95UtRAKdzm/wlBOUbd/IgzkRdOH97YG1unJucC9 mzIEwluERVT6w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FgWtb25x1z6tm6; Thu, 13 May 2021 01:57:26 +0200 (CEST) From: Vinicius Monego To: guix-patches@gnu.org Subject: [PATCH 0/3] Add xgboost. Date: Wed, 12 May 2021 23:56:49 +0000 Message-Id: <20210512235649.516594-1-monego@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=185.67.36.66; envelope-from=monego@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Vinicius Monego X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) This patchset adds the binaries, C++ library and Python frontend for the XGBoost gradient boosting framework. I noticed r-xgboost in the packages, which compiles a bundled copy of xgboost. Ideally it would inherit from xgboost and build from there, but I do not work with R so I can't help with this. I also had to do some dirty hack in the python patch for reading version and using libxgboost from the xgboost package. Lmk is there is a better way to handle this. Vinicius Monego (3): gnu: Add dmlc-core. gnu: Add xgboost. gnu: Add python-xgboost. gnu/local.mk | 2 + gnu/packages/machine-learning.scm | 125 ++++++++++++++++++ ...xgboost-python-use-system-libxgboost.patch | 69 ++++++++++ .../xgboost-use-system-dmlc-core.patch | 35 +++++ 4 files changed, 231 insertions(+) create mode 100644 gnu/packages/patches/xgboost-python-use-system-libxgboost.patch create mode 100644 gnu/packages/patches/xgboost-use-system-dmlc-core.patch -- 2.31.1 ------------=_1632600902-19971-1--