summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorVinicius Monego <monego@posteo.net>2024-03-27 12:15:17 -0300
committerVinicius Monego <monego@posteo.net>2024-04-06 08:00:58 -0300
commit35afdc3b5c97f6cccc9f7030d65c007f075b43b1 (patch)
tree8c7947d7761e7158b020f7689c75fecf81c2ad62 /gnu
parent33d8c6904a58e46413b87cda063b91ddb48f8c57 (diff)
downloadguix-35afdc3b5c97f6cccc9f7030d65c007f075b43b1.tar.gz
gnu: xgboost: Update to 1.7.6.
* gnu/packages/machine-learning.scm (xgboost, python-xgboost): Update to
1.7.6.
(python-xgboost)[arguments]: Remove #:test-flags and disable tests.
* gnu/packages/patches/xgboost-use-system-dmlc-core.patch: Update patch.

Change-Id: Ib0eb015f72150ef82ce386eda26749e25f816e95
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/machine-learning.scm39
-rw-r--r--gnu/packages/patches/xgboost-use-system-dmlc-core.patch14
2 files changed, 10 insertions, 43 deletions
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 47989b129f..4e54ca3350 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -3510,7 +3510,7 @@ learning libraries.")
 (define-public xgboost
   (package
     (name "xgboost")
-    (version "1.5.2")
+    (version "1.7.6")
     (source
      (origin
        (method git-fetch)
@@ -3520,7 +3520,7 @@ learning libraries.")
        (file-name (git-file-name name version))
        (patches (search-patches "xgboost-use-system-dmlc-core.patch"))
        (sha256
-        (base32 "0qx04y7cz8z7qv6bk9q7d7ba9b7xzj53l83l2x9ykdwhzacc3dn0"))))
+        (base32 "16fbm5y3hn6ccflmbdlmn7krrdq7c0az3mxd8j1d23s9ky8niw05"))))
     (build-system cmake-build-system)
     (arguments
      `(#:configure-flags (list "-DGOOGLE_TEST=ON")))
@@ -3547,40 +3547,7 @@ in a fast and accurate way.")
     (build-system pyproject-build-system)
     (arguments
      (list
-      #:test-flags
-      '(list "tests/python"
-             ;; FIXME: CLI tests fail with PermissionError.
-             "--ignore" "tests/python/test_cli.py"
-             "-k"
-             (string-append
-              "not test_cli_regression_demo"
-              ;; These tests use the Boston dataset that has been
-              ;; removed from scipy.
-              " and not test_sklearn_demo"
-              " and not test_sklearn_parallel_demo"
-              " and not test_predict_shape"
-              " and not test_num_parallel_tree"
-              " and not test_boston_housing_regression"
-              " and not test_boston_housing_rf_regression"
-              " and not test_parameter_tuning"
-              " and not test_regression_with_custom_objective"
-              " and not test_RFECV"
-              ;; Pandas incompatibility? Says:
-              ;; '_CalibratedClassifier' object has no attribute
-              ;; 'base_estimator'
-              " and not test_pandas_input"
-              ;; Accuracy problems?
-              " and not test_exact"
-              " and not test_approx"
-              " and not test_hist"
-              ;; 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"))
+      #:tests? #f ; all tests require network access
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'unpack 'preparations
diff --git a/gnu/packages/patches/xgboost-use-system-dmlc-core.patch b/gnu/packages/patches/xgboost-use-system-dmlc-core.patch
index 6b2a1651a5..cbc0feed1c 100644
--- a/gnu/packages/patches/xgboost-use-system-dmlc-core.patch
+++ b/gnu/packages/patches/xgboost-use-system-dmlc-core.patch
@@ -1,13 +1,13 @@
-# This patch was imported from Debian: https://sources.debian.org/src/xgboost/1.5.1-1/debian/patches/cmake-dmlc-core.patch/
+# This patch was imported from Debian: https://sources.debian.org/patches/xgboost/1.7.4-1/cmake-dmlc-core.patch/
 
 Index: xgboost/CMakeLists.txt
 ===================================================================
 --- xgboost.orig/CMakeLists.txt
 +++ xgboost/CMakeLists.txt
-@@ -164,7 +164,9 @@ endif (USE_NCCL)
- 
- # dmlc-core
- msvc_use_static_runtime()
+@@ -205,7 +205,9 @@ msvc_use_static_runtime()
+ if (FORCE_SHARED_CRT)
+   set(DMLC_FORCE_SHARED_CRT ON)
+ endif ()
 -add_subdirectory(${xgboost_SOURCE_DIR}/dmlc-core)
 +add_library(dmlc SHARED IMPORTED)
 +find_library(DMLC_LIBRARY dmlc)
@@ -15,7 +15,7 @@ Index: xgboost/CMakeLists.txt
  
  if (MSVC)
    if (TARGET dmlc_unit_tests)
-@@ -222,7 +224,7 @@ set_target_properties(runxgboost PROPERT
+@@ -267,7 +269,7 @@ set_target_properties(runxgboost PROPERT
  #-- End CLI for xgboost
  
  # Common setup for all targets
@@ -24,7 +24,7 @@ Index: xgboost/CMakeLists.txt
    xgboost_target_properties(${target})
    xgboost_target_link_libraries(${target})
    xgboost_target_defs(${target})
-@@ -273,7 +275,7 @@ install(DIRECTORY ${xgboost_SOURCE_DIR}/
+@@ -318,7 +320,7 @@ install(DIRECTORY ${xgboost_SOURCE_DIR}/
  #
  # https://github.com/dmlc/xgboost/issues/6085
  if (BUILD_STATIC_LIB)