Skip to content
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

Add support to specifying position using position_column parameter #6825

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
fix some lint errors
  • Loading branch information
NProkoptsev committed Feb 16, 2025
commit 556c6512553e55f682e44e00dfb207df1c8d4aee
2 changes: 1 addition & 1 deletion include/LightGBM/c_api.h
Original file line number Diff line number Diff line change
@@ -249,7 +249,7 @@ LIGHTGBM_C_EXPORT int LGBM_DatasetPushRowsWithMetadata(DatasetHandle dataset,
const float* weight,
const double* init_score,
const int32_t* query,
const int32_t* position,
const int32_t* position,
int32_t tid);

/*!
5 changes: 1 addition & 4 deletions include/LightGBM/dataset.h
Original file line number Diff line number Diff line change
@@ -255,12 +255,9 @@ class Metadata {
if (!positions_.empty()) {
size_t max = *std::max_element(positions_.begin(), positions_.end());
return max + 1;
}
else
{
} else {
return 0;
}

}

/*!
1 change: 0 additions & 1 deletion src/io/metadata.cpp
Original file line number Diff line number Diff line change
@@ -266,7 +266,6 @@ void Metadata::CheckOrPartition(data_size_t num_all_data, const std::vector<data
num_init_score_ = 0;
Log::Fatal("Initial score size doesn't match data size");
}

} else {
if (!queries_.empty()) {
Log::Fatal("Cannot used query_id for distributed training");
Loading
Oops, something went wrong.