Skip to content

Commit

Permalink
Merge pull request #6269 from rapidsai/branch-25.02
Browse files Browse the repository at this point in the history
Forward-merge branch-25.02 into branch-25.04
  • Loading branch information
GPUtester authored Jan 28, 2025
2 parents 0226b37 + 25a9c4b commit 6e62e7e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion cpp/src/fil/fil.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2024, NVIDIA CORPORATION.
* Copyright (c) 2019-2025, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -391,6 +391,14 @@ struct dense_forest<dense_node<real_t>> : forest<real_t> {
{
this->init_common(h, cat_sets, vector_leaf, params);
if (this->algo_ == algo_t::NAIVE) this->algo_ = algo_t::BATCH_TREE_REORG;
/* The following line is added to disable BATCH_TREE_REORG mode. Currently
* there is a bug in the implementation of this mode which causes a batch
* of trees to be marked as complete before every tree has reached a leaf
* node. At best, this results in a crash due to a bad memory access, but
* it can also silently impact the final output of the model. No issue has
* been logged for this workaround because we will be migrating to the new
* FIL codebase which is not impacted by this bug. */
if (this->algo_ == algo_t::BATCH_TREE_REORG) { this->algo_ = algo_t::TREE_REORG; }

int num_nodes = forest_num_nodes(this->num_trees_, this->depth_);
nodes_.resize(num_nodes, h.get_stream());
Expand Down
4 changes: 2 additions & 2 deletions python/cuml/cuml/benchmark/bench_helper_funcs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019-2024, NVIDIA CORPORATION.
# Copyright (c) 2019-2025, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -142,7 +142,7 @@ def _build_fil_classifier(m, data, args, tmpdir):
num_rounds = args["num_rounds"]
n_feature = data[0].shape[1]
train_size = data[0].shape[0]
model_name = f"xgb_{max_depth}_{num_rounds}_{n_feature}_{train_size}.model"
model_name = f"xgb_{max_depth}_{num_rounds}_{n_feature}_{train_size}.ubj"
model_path = os.path.join(tmpdir, model_name)
bst = xgb.train(params, dtrain, num_rounds)
bst.save_model(model_path)
Expand Down

0 comments on commit 6e62e7e

Please sign in to comment.