mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-26 06:18:07 -05:00
gnu: xgboost: Update to 1.5.2.
* gnu/packages/machine-learning.scm (xgboost, python-xgboost): Update to 1.5.2. (python-xgboost)[arguments]: Enable previously failing test. * gnu/packages/patches/xgboost-use-system-dmlc-core.patch: Update patch. Signed-off-by: Ricardo Wurmus <rekado@elephly.net>
This commit is contained in:
parent
98e74d520a
commit
c30fa177f3
2 changed files with 30 additions and 31 deletions
|
@ -15,7 +15,7 @@
|
||||||
;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
|
;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
|
||||||
;;; Copyright © 2020 Konrad Hinsen <konrad.hinsen@fastmail.net>
|
;;; Copyright © 2020 Konrad Hinsen <konrad.hinsen@fastmail.net>
|
||||||
;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
|
;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
|
||||||
;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
|
;;; Copyright © 2020, 2021, 2022 Vinicius Monego <monego@posteo.net>
|
||||||
;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
|
@ -2490,7 +2490,7 @@ (define-public dmlc-core
|
||||||
(define-public xgboost
|
(define-public xgboost
|
||||||
(package
|
(package
|
||||||
(name "xgboost")
|
(name "xgboost")
|
||||||
(version "1.4.2")
|
(version "1.5.2")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
|
@ -2500,7 +2500,7 @@ (define-public xgboost
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(patches (search-patches "xgboost-use-system-dmlc-core.patch"))
|
(patches (search-patches "xgboost-use-system-dmlc-core.patch"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "00liz816ahk9zj3jv3m2fqwlf6xxfbgvpmpl72iklx32vl192w5d"))))
|
(base32 "0qx04y7cz8z7qv6bk9q7d7ba9b7xzj53l83l2x9ykdwhzacc3dn0"))))
|
||||||
(build-system cmake-build-system)
|
(build-system cmake-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:configure-flags (list "-DGOOGLE_TEST=ON")))
|
`(#:configure-flags (list "-DGOOGLE_TEST=ON")))
|
||||||
|
@ -2573,8 +2573,6 @@ (define-public python-xgboost
|
||||||
" and not test_cv_no_shuffle"
|
" and not test_cv_no_shuffle"
|
||||||
" and not test_cv"
|
" and not test_cv"
|
||||||
" and not test_training"
|
" and not test_training"
|
||||||
;; FIXME: May pass in the next version.
|
|
||||||
" and not test_pandas"
|
|
||||||
;; "'['./runexp.sh']' returned non-zero exit status 1"
|
;; "'['./runexp.sh']' returned non-zero exit status 1"
|
||||||
" and not test_cli_binary_classification"))))))))
|
" and not test_cli_binary_classification"))))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
|
|
|
@ -1,34 +1,35 @@
|
||||||
From 34167cc105e47589b86b6f62da76e0ab744002dd Mon Sep 17 00:00:00 2001
|
# This patch was imported from Debian: https://sources.debian.org/src/xgboost/1.5.1-1/debian/patches/cmake-dmlc-core.patch/
|
||||||
From: Vinicius Monego <monego@posteo.net>
|
|
||||||
Date: Tue, 11 May 2021 19:35:30 -0300
|
|
||||||
Subject: [PATCH] Use dmlc-core from Guix.
|
|
||||||
|
|
||||||
---
|
Index: xgboost/CMakeLists.txt
|
||||||
This patch is a subset of the following Debian patch: https://sources.debian.org/src/xgboost/1.2.1-1/debian/patches/cmake.patch/
|
===================================================================
|
||||||
|
--- xgboost.orig/CMakeLists.txt
|
||||||
Rabit is now developed as part of xgboost, so we don't build it separately.
|
+++ xgboost/CMakeLists.txt
|
||||||
|
@@ -164,7 +164,9 @@ endif (USE_NCCL)
|
||||||
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
|
# dmlc-core
|
||||||
msvc_use_static_runtime()
|
msvc_use_static_runtime()
|
||||||
-add_subdirectory(${xgboost_SOURCE_DIR}/dmlc-core)
|
-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)
|
+add_library(dmlc SHARED IMPORTED)
|
||||||
+find_library(DMLC_LIBRARY dmlc)
|
+find_library(DMLC_LIBRARY dmlc)
|
||||||
+set_property(TARGET dmlc PROPERTY IMPORTED_LOCATION "${DMLC_LIBRARY}")
|
+set_property(TARGET dmlc PROPERTY IMPORTED_LOCATION "${DMLC_LIBRARY}")
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
target_compile_options(dmlc PRIVATE
|
if (TARGET dmlc_unit_tests)
|
||||||
-D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE)
|
@@ -222,7 +224,7 @@ set_target_properties(runxgboost PROPERT
|
||||||
--
|
#-- End CLI for xgboost
|
||||||
2.31.1
|
|
||||||
|
# Common setup for all targets
|
||||||
|
-foreach(target xgboost objxgboost dmlc runxgboost)
|
||||||
|
+foreach(target xgboost objxgboost runxgboost)
|
||||||
|
xgboost_target_properties(${target})
|
||||||
|
xgboost_target_link_libraries(${target})
|
||||||
|
xgboost_target_defs(${target})
|
||||||
|
@@ -273,7 +275,7 @@ install(DIRECTORY ${xgboost_SOURCE_DIR}/
|
||||||
|
#
|
||||||
|
# https://github.com/dmlc/xgboost/issues/6085
|
||||||
|
if (BUILD_STATIC_LIB)
|
||||||
|
- set(INSTALL_TARGETS xgboost runxgboost objxgboost dmlc)
|
||||||
|
+ set(INSTALL_TARGETS xgboost runxgboost objxgboost)
|
||||||
|
else (BUILD_STATIC_LIB)
|
||||||
|
set(INSTALL_TARGETS xgboost runxgboost)
|
||||||
|
endif (BUILD_STATIC_LIB)
|
||||||
|
|
Loading…
Reference in a new issue