Skip to content

1.7.5 no openmp cpucache #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 128 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
7cf58a2
Make 1.7.0rc1. (#8365)
trivialfis Oct 20, 2022
463313d
Remove cleanup script in R package. (#8370)
trivialfis Oct 20, 2022
153d995
Fix building XGBoost with libomp 15 (#8384) (#8387)
hcho3 Oct 26, 2022
aa30ce1
[backport][pyspark] Improve tutorial on enabling GPU support. (#8385)…
trivialfis Oct 26, 2022
e17f701
[backport][doc] Cleanup outdated documents for GPU. [skip ci] (#8378)…
trivialfis Oct 26, 2022
3f92970
[backport] Fix CUDA async stream. (#8380) (#8392)
trivialfis Oct 26, 2022
e43cd60
[backport] Type fix for WebAssembly. (#8369) (#8394)
trivialfis Oct 26, 2022
4bc59ef
Release 1.7
hcho3 Oct 31, 2022
5b76acc
Add back xgboost.rabit for backwards compatibility (#8408) (#8411)
hcho3 Nov 2, 2022
534c940
Release 1.7.1 (#8413)
hcho3 Nov 3, 2022
9ff0c08
Fix 1.7.1 version file. (#8427)
trivialfis Nov 5, 2022
a347cd5
[backport] [R] Fix CRAN test notes. (#8428) (#8440)
trivialfis Nov 8, 2022
1136a7e
Fix CRAN note on cleanup. (#8447)
trivialfis Nov 9, 2022
9372370
Work with newer thrust and libcudacxx (#8432)
robertmaynard Nov 10, 2022
db14e3f
Support null value in CUDA array interface. (#8486) (#8499)
hcho3 Nov 30, 2022
67b657d
SO_DOMAIN do not support on IBM i, using getsockname instead (#8437) …
hcho3 Nov 30, 2022
850b531
[backport] [doc] Fix outdated document [skip ci] (#8527) (#8553)
trivialfis Dec 6, 2022
58bc225
[backport] [CI] Fix github action mismatched glibcxx. (#8551) (#8552)
trivialfis Dec 6, 2022
60a8c8e
[pyspark] sort qid for SparkRanker (#8497) (#8555)
trivialfis Dec 6, 2022
59c54e3
[pyspark] Make QDM optional based on cuDF check (#8471) (#8556)
trivialfis Dec 6, 2022
a980e10
Properly await async method client.wait_for_workers (#8558) (#8567)
trivialfis Dec 7, 2022
62ed8b5
Bump release version to 1.7.2. (#8569)
trivialfis Dec 8, 2022
575fba6
[backport] [CI] Fix CI with updated dependencies. (#8631) (#8635)
trivialfis Jan 5, 2023
83a078b
[backport] Fix sklearn test that calls a removed field (#8579) (#8636)
trivialfis Jan 5, 2023
162b48a
[backport] [CI] Disable gtest with RMM (#8620) (#8640)
trivialfis Jan 5, 2023
1a834b2
Fix linalg iterator. (#8603) (#8639)
trivialfis Jan 5, 2023
067b704
[backport] Fix inference with categorical feature. (#8591) (#8602) (…
trivialfis Jan 5, 2023
a2085bf
[backport] Fix loading GPU pickle with a CPU-only xgboost distributio…
trivialfis Jan 5, 2023
899e4c8
[backport] Do not return internal value for `get_params`. (#8634) (#8…
trivialfis Jan 5, 2023
dd58c2a
Bump version to 1.7.3. (#8646)
trivialfis Jan 6, 2023
ccf43d4
Bump R package version to 1.7.3. (#8649)
trivialfis Jan 6, 2023
e803d06
[backport] [R] Remove unused assert definition. (#8526) (#8668)
trivialfis Jan 12, 2023
10bb0a7
[backport] [CI] Skip pyspark sparse tests. (#8675) (#8678)
trivialfis Jan 13, 2023
e5bef4f
[backport] Fix threads in DMatrix slice. (#8667) (#8679)
trivialfis Jan 14, 2023
021e6a8
[backport] [R] Get CXX flags from R CMD config. (#8669) (#8680)
trivialfis Jan 14, 2023
76bdca0
[R] Fix threads used to create DMatrix in predict. (#8681) (#8682)
trivialfis Jan 14, 2023
68d8633
[backport] [R] fix OpenMP detection on macOS (#8684) (#8732)
trivialfis Jan 29, 2023
2f22f8d
[backport] Make sure input numpy array is aligned. (#8690) (#8696) (#…
trivialfis Feb 6, 2023
df984f9
[backport] Fix different number of features in gpu_hist evaluator. (#…
trivialfis Feb 9, 2023
60303db
[backport] Fix GPU L1 error. (#8749) (#8770)
trivialfis Feb 9, 2023
08a547f
[backport] Fix feature types param (#8772) (#8801)
trivialfis Feb 14, 2023
f15a6d2
[backport] Fix ranking with quantile dmatrix and group weight. (#8762…
trivialfis Feb 14, 2023
c22f6db
[backport] Fix CPU bin compression with categorical data. (#8809) (#8…
trivialfis Feb 15, 2023
36ad160
Bump version to 1.7.4. (#8805)
trivialfis Feb 15, 2023
b9f79dc
version config, this auto-changed during steps I followed
yoquinjo Mar 17, 2023
e2f04dd
Changes in branch
yoquinjo Mar 21, 2023
0924937
python 3
yoquinjo Mar 21, 2023
a980b9a
fix pom
yoquinjo Mar 21, 2023
434bff4
indent
yoquinjo Mar 21, 2023
3dcf1f2
remove template from function
yoquinjo Mar 21, 2023
754158e
Revert "remove template from function"
yoquinjo Mar 21, 2023
4fea48c
Changes to inplace predict
yoquinjo Mar 21, 2023
b5297da
changes to c method
yoquinjo Mar 21, 2023
3ffd646
remove x
yoquinjo Mar 21, 2023
d7867d4
try renaming for rows and columns
yoquinjo Mar 21, 2023
7278f79
Remove template from coreImpl
yoquinjo Mar 21, 2023
c9facbd
InplacePredict instead of a dupe
yoquinjo Mar 21, 2023
70609e6
Copy some lines from python-c api
yoquinjo Mar 22, 2023
4311294
remove nullptr
yoquinjo Mar 22, 2023
1568ebc
Try making a dMatrix in api
yoquinjo Mar 22, 2023
85f6ce0
Revert "Try making a dMatrix in api"
yoquinjo Mar 22, 2023
fa71168
another dMatrix attempt
yoquinjo Mar 22, 2023
bd41c9b
Revert "another dMatrix attempt"
yoquinjo Mar 22, 2023
c869a14
First try at getting dMatrix logic into changes
yoquinjo Mar 23, 2023
163bfca
missing comma
yoquinjo Mar 23, 2023
14f2243
Checkstyle failure
yoquinjo Mar 23, 2023
66ca8c3
c h e c k s t y l e
yoquinjo Mar 23, 2023
e995228
Convert long to handle
yoquinjo Mar 23, 2023
b3796b7
a dMatrix for testing
yoquinjo Mar 23, 2023
737b293
some more changes to test
yoquinjo Mar 23, 2023
66f0d8c
Changes to tests
yoquinjo Mar 23, 2023
3e98f14
comment out for testing
yoquinjo Mar 23, 2023
a367ca2
uncomment for test, pass dMatrix through Booster.java
yoquinjo Mar 23, 2023
74c4376
maybe log something
yoquinjo Mar 23, 2023
eb4cd9a
See if we can log what the type for proxy is
yoquinjo Mar 23, 2023
abd64ff
dereference for logging
yoquinjo Mar 23, 2023
7dfa3c0
No more check, do it live
yoquinjo Mar 23, 2023
ad5972d
time to break the cpu predictor
yoquinjo Mar 23, 2023
489c337
Put checks back in, change check in c_api
yoquinjo Mar 24, 2023
710dae5
missing semicolon
yoquinjo Mar 24, 2023
3e37688
change error logging
yoquinjo Mar 24, 2023
688fc73
More null checks
yoquinjo Mar 24, 2023
2e6df6f
exit on entering ifs
yoquinjo Mar 24, 2023
2f81ff3
dMatrix Handle null check and more statments
yoquinjo Mar 24, 2023
c92d2df
try only one path
yoquinjo Mar 24, 2023
2aa500b
Try a different way of creating the proxy
yoquinjo Mar 24, 2023
95f2386
Logging in cpu predictor
yoquinjo Mar 24, 2023
ba50e6e
[backport] [CI] Require C++17 + CMake 3.18; Use CUDA 11.8 in CI (#885…
trivialfis Mar 25, 2023
4be75d8
[backport] Fix scope of feature set pointers (#8850) (#8972)
trivialfis Mar 26, 2023
a1c2091
[backport] Update c++ requirement to 17 for the R package. (#8860) (#…
trivialfis Mar 27, 2023
f5f03df
[backport] Update dmlc-core to get C++17 deprecation warning (#8855) …
trivialfis Mar 27, 2023
2b8cca6
Print result of p_m.get()
yoquinjo Mar 27, 2023
9e79c2e
Try some stuff with DMatrix
yoquinjo Mar 27, 2023
7968bca
Set dense data
yoquinjo Mar 27, 2023
d9dd5c4
uncomment stuff, more logging
yoquinjo Mar 27, 2023
9a3214b
change some variables and things
yoquinjo Mar 27, 2023
823c92f
Dense adapter changes
yoquinjo Mar 27, 2023
5a08ff8
proxy to stuff
yoquinjo Mar 27, 2023
a173763
change how proxy is cast in cpu predictor
yoquinjo Mar 27, 2023
6372805
More logging
yoquinjo Mar 27, 2023
148e29e
undo static cast
yoquinjo Mar 27, 2023
f6a2508
comment out some logging
yoquinjo Mar 27, 2023
e31c53d
another missed logging message
yoquinjo Mar 27, 2023
365da0b
[backport] [doc] Add missing document for pyspark ranker. (#8692) (#8…
trivialfis Mar 29, 2023
1baebe2
[backport] [CI] Fix Windows wheel to be compatible with Poetry (#8991…
trivialfis Mar 29, 2023
b8c6b86
Bump version to 1.7.5. (#8994)
trivialfis Mar 29, 2023
5609102
Remove need to pass DMatrix
yoquinjo Mar 29, 2023
b343f89
Remove redundant line
yoquinjo Mar 29, 2023
c4d6d52
missed param
yoquinjo Mar 29, 2023
a0a7d9d
increment our version
yoquinjo Mar 29, 2023
5cd4015
[backport] Fill column size. (#8997)
trivialfis Mar 30, 2023
21d95f3
[backport] [doc][R] Update link. (#8998) (#9001)
trivialfis Mar 30, 2023
a770841
Merge branch '1.7.1-sovrn-upgrade-changes' into 1.7.5-sovrn-upgrade
yoquinjo Apr 13, 2023
1539100
Cleaning up XGBoosterInplacePredict
sriggin May 3, 2023
aea9cd3
Further de-newification
sriggin May 4, 2023
a96c3b9
More clean-up
sriggin May 4, 2023
ab5bc5e
Update all the poms, even the unused ones
yoquinjo May 8, 2023
6182244
One missed pom
yoquinjo May 8, 2023
78f5290
pom change git didn't pick up
yoquinjo May 8, 2023
8754e06
Merge pull request #6 from sovrn/sean-fixes
sriggin May 9, 2023
19f0446
EXDS-242: Stop creating unused DMatrix
Oct 23, 2023
fdc4eeb
disable openmp; build with debug info
sejanick Nov 15, 2023
1fdd8c4
fix some of the pom files and see if the java build gets further
sejanick Nov 16, 2023
143698a
fix the rest of the poms too
sejanick Nov 16, 2023
cee5282
another pom version fix
sejanick Nov 16, 2023
bb5039c
chore: cache cfs cpu count result
ByteSizedJoe Jan 29, 2025
6a69e93
chore: fixes, add dockerfile for build
ByteSizedJoe Jan 30, 2025
de4256a
chore: version
ByteSizedJoe Jan 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,18 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: 'true'
- name: Install system packages
run: |
sudo apt-get install -y --no-install-recommends ninja-build
- uses: conda-incubator/setup-miniconda@v2
- uses: mamba-org/provision-with-micromamba@f347426e5745fe3dfc13ec5baf20496990d0281f # v14
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: test
cache-downloads: true
cache-env: true
environment-name: cpp_test
environment-file: tests/ci_build/conda_env/cpp_test.yml
- name: Display Conda env
shell: bash -l {0}
run: |
conda info
conda list

- name: Build and install XGBoost static library
shell: bash -l {0}
run: |
Expand All @@ -109,6 +108,7 @@ jobs:
cd ..
rm -rf ./build
popd

- name: Build and install XGBoost shared library
shell: bash -l {0}
run: |
Expand Down
108 changes: 69 additions & 39 deletions .github/workflows/python_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,46 @@ jobs:
run: |
python tests/ci_build/lint_python.py --format=0 --type-check=0 --pylint=1

python-sdist-test-on-Linux:
# Mismatched glibcxx version between system and conda forge.
runs-on: ${{ matrix.os }}
name: Test installing XGBoost Python source package on ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # v2.5.0
with:
submodules: 'true'
- uses: mamba-org/provision-with-micromamba@f347426e5745fe3dfc13ec5baf20496990d0281f # v14
with:
cache-downloads: true
cache-env: false
environment-name: sdist_test
environment-file: tests/ci_build/conda_env/sdist_test.yml
- name: Display Conda env
shell: bash -l {0}
run: |
conda info
conda list
- name: Build and install XGBoost
shell: bash -l {0}
run: |
cd python-package
python --version
python setup.py sdist
pip install -v ./dist/xgboost-*.tar.gz
cd ..
python -c 'import xgboost'

python-sdist-test:
# Use system toolchain instead of conda toolchain for macos and windows.
# MacOS has linker error if clang++ from conda-forge is used
runs-on: ${{ matrix.os }}
name: Test installing XGBoost Python source package on ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-11, windows-latest]
os: [macos-11, windows-latest]
python-version: ["3.8"]
steps:
- uses: actions/checkout@v2
Expand All @@ -56,11 +90,7 @@ jobs:
if: matrix.os == 'macos-11'
run: |
brew install ninja libomp
- name: Install Ubuntu system dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install -y --no-install-recommends ninja-build
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@35d1405e78aa3f784fe3ce9a2eb378d5eeb62169 # v2.1.1
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
Expand All @@ -80,61 +110,65 @@ jobs:
cd ..
python -c 'import xgboost'

python-tests-on-win:
python-tests-on-macos:
name: Test XGBoost Python package on ${{ matrix.config.os }}
runs-on: ${{ matrix.config.os }}
timeout-minutes: 60
strategy:
matrix:
config:
- {os: windows-latest, python-version: '3.8'}
- {os: macos-11}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # v2.5.0
with:
submodules: 'true'

- uses: conda-incubator/setup-miniconda@v2
- uses: mamba-org/provision-with-micromamba@f347426e5745fe3dfc13ec5baf20496990d0281f # v14
with:
auto-update-conda: true
python-version: ${{ matrix.config.python-version }}
activate-environment: win64_env
environment-file: tests/ci_build/conda_env/win64_cpu_test.yml
cache-downloads: true
cache-env: false
environment-name: macos_test
environment-file: tests/ci_build/conda_env/macos_cpu_test.yml

- name: Display Conda env
shell: bash -l {0}
run: |
conda info
conda list

- name: Build XGBoost on Windows
- name: Build XGBoost on macos
shell: bash -l {0}
run: |
mkdir build_msvc
cd build_msvc
cmake .. -G"Visual Studio 17 2022" -DCMAKE_CONFIGURATION_TYPES="Release" -A x64 -DGOOGLE_TEST=ON -DUSE_DMLC_GTEST=ON
cmake --build . --config Release --parallel $(nproc)
brew install ninja

mkdir build
cd build
# Set prefix, to use OpenMP library from Conda env
# See https://github.com/dmlc/xgboost/issues/7039#issuecomment-1025038228
# to learn why we don't use libomp from Homebrew.
cmake .. -GNinja -DCMAKE_PREFIX_PATH=$CONDA_PREFIX
ninja

- name: Install Python package
shell: bash -l {0}
run: |
cd python-package
python --version
python setup.py bdist_wheel --universal
pip install ./dist/*.whl
python setup.py install

- name: Test Python package
shell: bash -l {0}
run: |
pytest -s -v ./tests/python
pytest -s -v -rxXs --durations=0 ./tests/python

python-tests-on-macos:
python-tests-on-win:
name: Test XGBoost Python package on ${{ matrix.config.os }}
runs-on: ${{ matrix.config.os }}
timeout-minutes: 90
strategy:
matrix:
config:
- {os: macos-11, python-version "3.8" }
- {os: windows-latest, python-version: '3.8'}

steps:
- uses: actions/checkout@v2
Expand All @@ -145,36 +179,32 @@ jobs:
with:
auto-update-conda: true
python-version: ${{ matrix.config.python-version }}
activate-environment: macos_test
environment-file: tests/ci_build/conda_env/macos_cpu_test.yml
activate-environment: win64_env
environment-file: tests/ci_build/conda_env/win64_cpu_test.yml

- name: Display Conda env
shell: bash -l {0}
run: |
conda info
conda list

- name: Build XGBoost on macos
- name: Build XGBoost on Windows
shell: bash -l {0}
run: |
brew install ninja

mkdir build
cd build
# Set prefix, to use OpenMP library from Conda env
# See https://github.com/dmlc/xgboost/issues/7039#issuecomment-1025038228
# to learn why we don't use libomp from Homebrew.
cmake .. -GNinja -DGOOGLE_TEST=ON -DUSE_DMLC_GTEST=ON -DCMAKE_PREFIX_PATH=$CONDA_PREFIX
ninja
mkdir build_msvc
cd build_msvc
cmake .. -G"Visual Studio 17 2022" -DCMAKE_CONFIGURATION_TYPES="Release" -A x64 -DGOOGLE_TEST=ON -DUSE_DMLC_GTEST=ON
cmake --build . --config Release --parallel $(nproc)

- name: Install Python package
shell: bash -l {0}
run: |
cd python-package
python --version
python setup.py install
python setup.py bdist_wheel --universal
pip install ./dist/*.whl

- name: Test Python package
shell: bash -l {0}
run: |
pytest -s -v ./tests/python
pytest -s -v -rxXs --durations=0 ./tests/python
6 changes: 6 additions & 0 deletions .github/workflows/r_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on: [push, pull_request]
env:
R_PACKAGES: c('XML', 'data.table', 'ggplot2', 'DiagrammeR', 'Ckmeans.1d.dp', 'vcd', 'testthat', 'lintr', 'knitr', 'rmarkdown', 'e1071', 'cplm', 'devtools', 'float', 'titanic')
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
_R_CHECK_EXAMPLE_TIMING_CPU_TO_ELAPSED_THRESHOLD_: 2.5

permissions:
contents: read # to fetch code (actions/checkout)
Expand Down Expand Up @@ -68,6 +69,7 @@ jobs:
- {os: windows-latest, r: 'release', compiler: 'mingw', build: 'cmake'}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
_R_CHECK_EXAMPLE_TIMING_CPU_TO_ELAPSED_THRESHOLD_: 2.5
RSPM: ${{ matrix.config.rspm }}

steps:
Expand Down Expand Up @@ -121,6 +123,10 @@ jobs:
config:
- {r: 'release'}

env:
_R_CHECK_EXAMPLE_TIMING_CPU_TO_ELAPSED_THRESHOLD_: 2.5
MAKE: "make -j$(nproc)"

steps:
- uses: actions/checkout@v2
with:
Expand Down
29 changes: 21 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
project(xgboost LANGUAGES CXX C VERSION 1.7.0)
cmake_minimum_required(VERSION 3.18 FATAL_ERROR)
project(xgboost LANGUAGES CXX C VERSION 1.7.5)
include(cmake/Utils.cmake)
list(APPEND CMAKE_MODULE_PATH "${xgboost_SOURCE_DIR}/cmake/modules")
cmake_policy(SET CMP0022 NEW)
Expand Down Expand Up @@ -27,7 +27,7 @@ set_default_configuration_release()
#-- Options
## User options
option(BUILD_C_DOC "Build documentation for C APIs using Doxygen." OFF)
option(USE_OPENMP "Build with OpenMP support." ON)
option(USE_OPENMP "Build with OpenMP support." OFF)
option(BUILD_STATIC_LIB "Build static library" OFF)
option(FORCE_SHARED_CRT "Build with dynamic CRT on Windows (/MD)" OFF)
option(RABIT_BUILD_MPI "Build MPI" OFF)
Expand Down Expand Up @@ -168,11 +168,24 @@ find_package(Threads REQUIRED)

if (USE_OPENMP)
if (APPLE)
# Require CMake 3.16+ on Mac OSX, as previous versions of CMake had trouble locating
# OpenMP on Mac. See https://github.com/dmlc/xgboost/pull/5146#issuecomment-568312706
cmake_minimum_required(VERSION 3.16)
endif (APPLE)
find_package(OpenMP REQUIRED)
find_package(OpenMP)
if (NOT OpenMP_FOUND)
# Try again with extra path info; required for libomp 15+ from Homebrew
execute_process(COMMAND brew --prefix libomp
OUTPUT_VARIABLE HOMEBREW_LIBOMP_PREFIX
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(OpenMP_C_FLAGS
"-Xpreprocessor -fopenmp -I${HOMEBREW_LIBOMP_PREFIX}/include")
set(OpenMP_CXX_FLAGS
"-Xpreprocessor -fopenmp -I${HOMEBREW_LIBOMP_PREFIX}/include")
set(OpenMP_C_LIB_NAMES omp)
set(OpenMP_CXX_LIB_NAMES omp)
set(OpenMP_omp_LIBRARY ${HOMEBREW_LIBOMP_PREFIX}/lib/libomp.dylib)
find_package(OpenMP REQUIRED)
endif ()
else ()
find_package(OpenMP REQUIRED)
endif ()
endif (USE_OPENMP)
#Add for IBM i
if (${CMAKE_SYSTEM_NAME} MATCHES "OS400")
Expand Down
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM azul/zulu-openjdk:8-latest
RUN apt-get -y update && \
apt-get install -y build-essential cmake python3 git neovim maven python-is-python3 curl
ENTRYPOINT ["/bin/bash"]
2 changes: 1 addition & 1 deletion R-package/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ if (USE_OPENMP)
endif (USE_OPENMP)
set_target_properties(
xgboost-r PROPERTIES
CXX_STANDARD 14
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
POSITION_INDEPENDENT_CODE ON)

Expand Down
9 changes: 5 additions & 4 deletions R-package/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: xgboost
Type: Package
Title: Extreme Gradient Boosting
Version: 1.7.0.1
Date: 2022-10-18
Version: 1.7.5.1
Date: 2023-03-29
Authors@R: c(
person("Tianqi", "Chen", role = c("aut"),
email = "[email protected]"),
Expand Down Expand Up @@ -66,5 +66,6 @@ Imports:
methods,
data.table (>= 1.9.6),
jsonlite (>= 1.0),
RoxygenNote: 7.1.1
SystemRequirements: GNU make, C++14
RoxygenNote: 7.2.3
Encoding: UTF-8
SystemRequirements: GNU make, C++17
4 changes: 2 additions & 2 deletions R-package/LICENSE
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Copyright (c) 2014 by Tianqi Chen and Contributors
Copyright (c) 2014-2023, Tianqi Chen and XBGoost Contributors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
Expand Down
12 changes: 7 additions & 5 deletions R-package/R/callbacks.R
Original file line number Diff line number Diff line change
Expand Up @@ -544,9 +544,11 @@ cb.cv.predict <- function(save_models = FALSE) {
#'
#' @return
#' Results are stored in the \code{coefs} element of the closure.
#' The \code{\link{xgb.gblinear.history}} convenience function provides an easy way to access it.
#' The \code{\link{xgb.gblinear.history}} convenience function provides an easy
#' way to access it.
#' With \code{xgb.train}, it is either a dense of a sparse matrix.
#' While with \code{xgb.cv}, it is a list (an element per each fold) of such matrices.
#' While with \code{xgb.cv}, it is a list (an element per each fold) of such
#' matrices.
#'
#' @seealso
#' \code{\link{callbacks}}, \code{\link{xgb.gblinear.history}}.
Expand All @@ -558,7 +560,7 @@ cb.cv.predict <- function(save_models = FALSE) {
#' # without considering the 2nd order interactions:
#' x <- model.matrix(Species ~ .^2, iris)[,-1]
#' colnames(x)
#' dtrain <- xgb.DMatrix(scale(x), label = 1*(iris$Species == "versicolor"))
#' dtrain <- xgb.DMatrix(scale(x), label = 1*(iris$Species == "versicolor"), nthread = 2)
#' param <- list(booster = "gblinear", objective = "reg:logistic", eval_metric = "auc",
#' lambda = 0.0003, alpha = 0.0003, nthread = 2)
#' # For 'shotgun', which is a default linear updater, using high eta values may result in
Expand All @@ -583,14 +585,14 @@ cb.cv.predict <- function(save_models = FALSE) {
#'
#' # For xgb.cv:
#' bst <- xgb.cv(param, dtrain, nfold = 5, nrounds = 100, eta = 0.8,
#' callbacks = list(cb.gblinear.history()))
#' callbacks = list(cb.gblinear.history()))
#' # coefficients in the CV fold #3
#' matplot(xgb.gblinear.history(bst)[[3]], type = 'l')
#'
#'
#' #### Multiclass classification:
#' #
#' dtrain <- xgb.DMatrix(scale(x), label = as.numeric(iris$Species) - 1)
#' dtrain <- xgb.DMatrix(scale(x), label = as.numeric(iris$Species) - 1, nthread = 2)
#' param <- list(booster = "gblinear", objective = "multi:softprob", num_class = 3,
#' lambda = 0.0003, alpha = 0.0003, nthread = 2)
#' # For the default linear updater 'shotgun' it sometimes is helpful
Expand Down
3 changes: 2 additions & 1 deletion R-package/R/xgb.Booster.R
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,9 @@ predict.xgb.Booster <- function(object, newdata, missing = NA, outputmargin = FA
predleaf = FALSE, predcontrib = FALSE, approxcontrib = FALSE, predinteraction = FALSE,
reshape = FALSE, training = FALSE, iterationrange = NULL, strict_shape = FALSE, ...) {
object <- xgb.Booster.complete(object, saveraw = FALSE)

if (!inherits(newdata, "xgb.DMatrix"))
newdata <- xgb.DMatrix(newdata, missing = missing)
newdata <- xgb.DMatrix(newdata, missing = missing, nthread = NVL(object$params[["nthread"]], -1))
if (!is.null(object[["feature_names"]]) &&
!is.null(colnames(newdata)) &&
!identical(object[["feature_names"]], colnames(newdata)))
Expand Down
Loading
Loading