Skip to content

Commit 817e13d

Browse files
authored
Merge branch 'dmlc:release_3.0.0' into release_3.0.0
2 parents c8a5974 + aae009b commit 817e13d

File tree

13 files changed

+42
-46
lines changed

13 files changed

+42
-46
lines changed

R-package/DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Package: xgboost
22
Type: Package
33
Title: Extreme Gradient Boosting
44
Version: 3.0.0.1
5-
Date: 2025-02-26
5+
Date: 2025-03-14
66
Authors@R: c(
77
person("Tianqi", "Chen", role = c("aut"),
88
email = "[email protected]"),

jvm-packages/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>ml.dmlc</groupId>
88
<artifactId>xgboost-jvm_2.12</artifactId>
9-
<version>3.0.0-RC1</version>
9+
<version>3.0.0</version>
1010
<packaging>pom</packaging>
1111
<name>XGBoost JVM Package</name>
1212
<description>JVM Package for XGBoost</description>

jvm-packages/xgboost4j-example/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
<parent>
77
<groupId>ml.dmlc</groupId>
88
<artifactId>xgboost-jvm_2.12</artifactId>
9-
<version>3.0.0-RC1</version>
9+
<version>3.0.0</version>
1010
</parent>
1111
<name>xgboost4j-example</name>
1212
<artifactId>xgboost4j-example_2.12</artifactId>
13-
<version>3.0.0-RC1</version>
13+
<version>3.0.0</version>
1414
<packaging>jar</packaging>
1515
<build>
1616
<plugins>

jvm-packages/xgboost4j-flink/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
<parent>
77
<groupId>ml.dmlc</groupId>
88
<artifactId>xgboost-jvm_2.12</artifactId>
9-
<version>3.0.0-RC1</version>
9+
<version>3.0.0</version>
1010
</parent>
1111

1212
<name>xgboost4j-flink</name>
1313
<artifactId>xgboost4j-flink_2.12</artifactId>
14-
<version>3.0.0-RC1</version>
14+
<version>3.0.0</version>
1515
<properties>
1616
<flink-ml.version>2.2.0</flink-ml.version>
1717
</properties>

jvm-packages/xgboost4j-spark-gpu/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>ml.dmlc</groupId>
88
<artifactId>xgboost-jvm_2.12</artifactId>
9-
<version>3.0.0-RC1</version>
9+
<version>3.0.0</version>
1010
</parent>
1111
<name>xgboost4j-spark-gpu</name>
1212
<artifactId>xgboost4j-spark-gpu_2.12</artifactId>

jvm-packages/xgboost4j-spark/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>ml.dmlc</groupId>
88
<artifactId>xgboost-jvm_2.12</artifactId>
9-
<version>3.0.0-RC1</version>
9+
<version>3.0.0</version>
1010
</parent>
1111
<name>xgboost4j-spark</name>
1212
<artifactId>xgboost4j-spark_2.12</artifactId>

jvm-packages/xgboost4j/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
<parent>
77
<groupId>ml.dmlc</groupId>
88
<artifactId>xgboost-jvm_2.12</artifactId>
9-
<version>3.0.0-RC1</version>
9+
<version>3.0.0</version>
1010
</parent>
1111
<name>xgboost4j</name>
1212
<artifactId>xgboost4j_2.12</artifactId>
13-
<version>3.0.0-RC1</version>
13+
<version>3.0.0</version>
1414
<packaging>jar</packaging>
1515

1616
<dependencies>

dev/release-artifacts.py renamed to ops/script/release_artifacts.py

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,39 +5,30 @@
55
"""
66

77
import argparse
8-
import os
98
import shutil
109
import subprocess
1110
import tarfile
1211
import tempfile
1312
from pathlib import Path
14-
from typing import Any, Dict, List, Optional, Tuple, Union
13+
from typing import Dict, List, Optional, Tuple
1514
from urllib.request import urlretrieve
1615

1716
import tqdm
1817
from packaging import version
18+
from pypi_variants import make_pyproject
1919
from sh.contrib import git
20+
from test_utils import PY_PACKAGE
21+
from test_utils import ROOT as root_path
22+
from test_utils import DirectoryExcursion
2023

2124
# S3 bucket hosting the release artifacts
2225
S3_BUCKET_URL = "https://s3-us-west-2.amazonaws.com/xgboost-nightly-builds"
23-
ROOT = Path(__file__).absolute().parent.parent
24-
DIST = ROOT / "python-package" / "dist"
26+
DIST = Path(PY_PACKAGE) / "dist"
27+
ROOT = Path(root_path)
2528

2629
pbar = None
2730

2831

29-
class DirectoryExcursion:
30-
def __init__(self, path: Path) -> None:
31-
self.path = path
32-
self.curdir = Path.cwd().resolve()
33-
34-
def __enter__(self) -> None:
35-
os.chdir(self.path)
36-
37-
def __exit__(self, *args: Any) -> None:
38-
os.chdir(self.curdir)
39-
40-
4132
def show_progress(block_num: int, block_size: int, total_size: int) -> None:
4233
"""Show file download progress."""
4334
global pbar
@@ -118,16 +109,24 @@ def make_python_sdist(
118109
dist_dir = outdir / "dist"
119110
dist_dir.mkdir(exist_ok=True)
120111

121-
# Apply patch to remove NCCL dependency
122-
# Save the original content of pyproject.toml so that we can restore it later
112+
# Build sdist for `xgboost-cpu`.
123113
with DirectoryExcursion(ROOT):
124-
with open("python-package/pyproject.toml", "r") as f:
125-
orig_pyproj_lines = f.read()
126-
with open("ops/patch/remove_nccl_dep.patch", "r") as f:
127-
patch_lines = f.read()
128-
subprocess.run(
129-
["patch", "-p0"], input=patch_lines, check=True, text=True, encoding="utf-8"
114+
make_pyproject("cpu")
115+
with DirectoryExcursion(ROOT / "python-package"):
116+
subprocess.run(["python", "-m", "build", "--sdist"], check=True)
117+
sdist_name = (
118+
f"xgboost_cpu-{release}{rc}{rc_ver}.tar.gz"
119+
if rc
120+
else f"xgboost_cpu-{release}.tar.gz"
130121
)
122+
src = DIST / sdist_name
123+
subprocess.run(["twine", "check", str(src)], check=True)
124+
dest = dist_dir / sdist_name
125+
shutil.move(src, dest)
126+
127+
# Build sdist for `xgboost`.
128+
with DirectoryExcursion(ROOT):
129+
make_pyproject("default")
131130

132131
with DirectoryExcursion(ROOT / "python-package"):
133132
subprocess.run(["python", "-m", "build", "--sdist"], check=True)
@@ -141,10 +140,6 @@ def make_python_sdist(
141140
dest = dist_dir / sdist_name
142141
shutil.move(src, dest)
143142

144-
with DirectoryExcursion(ROOT):
145-
with open("python-package/pyproject.toml", "w") as f:
146-
f.write(orig_pyproj_lines)
147-
148143

149144
def download_python_wheels(branch: str, commit_hash: str, outdir: Path) -> None:
150145
"""Download all Python binary wheels for the specified branch."""
@@ -318,6 +313,7 @@ def main(args: argparse.Namespace) -> None:
318313
rc_ver: Optional[int] = None
319314
else:
320315
# RC release
316+
assert release_parsed.pre is not None
321317
rc, rc_ver = release_parsed.pre
322318
if rc != "rc":
323319
raise ValueError(

python-package/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ authors = [
1515
{ name = "Hyunsu Cho", email = "[email protected]" },
1616
{ name = "Jiaming Yuan", email = "[email protected]" }
1717
]
18-
version = "3.0.0rc1"
18+
version = "3.0.0"
1919
requires-python = ">=3.10"
2020
license = { text = "Apache-2.0" }
2121
classifiers = [

python-package/pyproject.toml.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ authors = [
1414
{ name = "Hyunsu Cho", email = "[email protected]" },
1515
{ name = "Jiaming Yuan", email = "[email protected]" }
1616
]
17-
version = "3.0.0-dev"
17+
version = "3.0.0"
1818
requires-python = ">=3.10"
1919
license = { text = "Apache-2.0" }
2020
classifiers = [

python-package/xgboost/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.0rc1
1+
3.0.0

src/data/sparse_page_dmatrix.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ BatchSet<SparsePage> SparsePageDMatrix::GetRowBatches() {
105105
}
106106

107107
BatchSet<CSCPage> SparsePageDMatrix::GetColumnBatches(Context const *ctx) {
108-
auto id = MakeCache(this, ".col.page", on_host_, cache_prefix_, &cache_info_);
108+
auto id = MakeCache(this, ".col.page", false, cache_prefix_, &cache_info_);
109109
CHECK_NE(this->Info().num_col_, 0);
110110
this->InitializeSparsePage(ctx);
111111
if (!column_source_) {
@@ -119,7 +119,7 @@ BatchSet<CSCPage> SparsePageDMatrix::GetColumnBatches(Context const *ctx) {
119119
}
120120

121121
BatchSet<SortedCSCPage> SparsePageDMatrix::GetSortedColumnBatches(Context const *ctx) {
122-
auto id = MakeCache(this, ".sorted.col.page", on_host_, cache_prefix_, &cache_info_);
122+
auto id = MakeCache(this, ".sorted.col.page", false, cache_prefix_, &cache_info_);
123123
CHECK_NE(this->Info().num_col_, 0);
124124
this->InitializeSparsePage(ctx);
125125
if (!sorted_column_source_) {
@@ -138,11 +138,11 @@ BatchSet<GHistIndexMatrix> SparsePageDMatrix::GetGradientIndex(Context const *ct
138138
CHECK_GE(param.max_bin, 2);
139139
}
140140
detail::CheckEmpty(batch_param_, param);
141-
auto id = MakeCache(this, ".gradient_index.page", on_host_, cache_prefix_, &cache_info_);
141+
auto id = MakeCache(this, ".gradient_index.page", false, cache_prefix_, &cache_info_);
142142
if (!cache_info_.at(id)->written || detail::RegenGHist(batch_param_, param)) {
143143
this->InitializeSparsePage(ctx);
144144
cache_info_.erase(id);
145-
id = MakeCache(this, ".gradient_index.page", on_host_, cache_prefix_, &cache_info_);
145+
id = MakeCache(this, ".gradient_index.page", false, cache_prefix_, &cache_info_);
146146
LOG(INFO) << "Generating new Gradient Index.";
147147
// Use sorted sketch for approx.
148148
auto sorted_sketch = param.regen;

src/tree/fit_stump.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ void FitStump(Context const* ctx, MetaInfo const& info, linalg::Matrix<GradientP
7474
out->Reshape(n_targets);
7575

7676
gpair.SetDevice(ctx->Device());
77-
auto gpair_t = gpair.View(ctx->Device());
77+
auto gpair_t = gpair.View(ctx->Device().IsSycl() ? DeviceOrd::CPU() : ctx->Device());
7878
ctx->IsCUDA() ? cuda_impl::FitStump(ctx, info, gpair_t, out->View(ctx->Device()))
7979
: cpu_impl::FitStump(ctx, info, gpair_t, out->HostView());
8080
}

0 commit comments

Comments
 (0)