"R-package/vscode:/vscode.git/clone" did not exist on "99ac1ef815f7c6e8b9cafb591182f4408d758a3c"
Unverified Commit 7a8c4e52 authored by Guolin Ke's avatar Guolin Ke Committed by GitHub
Browse files

fix bug in reset config for dataset (#2453)

* Update feature_histogram.hpp

* Update feature_histogram.hpp
parent 70fc45b0
......@@ -748,6 +748,7 @@ class HistogramPool {
OMP_LOOP_EX_END();
}
OMP_THROW_EX();
train_data_ = train_data;
}
void ResetConfig(const Config* config) {
......@@ -755,6 +756,8 @@ class HistogramPool {
#pragma omp parallel for schedule(static, 512) if (size >= 1024)
for (int i = 0; i < size; ++i) {
feature_metas_[i].config = config;
feature_metas_[i].monotone_type = train_data_->FeatureMonotone(i);
feature_metas_[i].penalty = train_data_->FeaturePenalte(i);
}
}
/*!
......@@ -823,6 +826,7 @@ class HistogramPool {
std::vector<int> inverse_mapper_;
std::vector<int> last_used_time_;
int cur_time_ = 0;
const Dataset* train_data_;
};
} // namespace LightGBM
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment