Skip to content

prohibit use of regression_l1 objective with linear trees - #6859

Merged
StrikerRUS merged 2 commits into
masterfrom
fix/linear-tree-params
Apr 17, 2025
Merged

StrikerRUS merged 2 commits into
masterfrom
fix/linear-tree-params

Conversation

@jameslamb

Copy link
Copy Markdown
Member

From the very first PR where @btrotta introduced linear trees here (#3299), it was never intended that they'd be used with the L1 loss. However, that's been technically possible the entire time because of a typo here:

https://github.com/microsoft/LightGBM/blob/6437645c4a0c17046be59e4f57d09952e2e0185f/src/io/config.cpp#L431-L433

This fixes that typo, and adds a test ensuring that LightGBM raises the expected errors when using unsupported parameters with linear trees.

Notes for Reviewers

This bug was caught by the newest version of crates-ci/typos... pretty cool to see a spellchecker catching a real bug!!! (cc @borchero )

This PR also updates other pre-commit hooks to their latest versions (though they didn't catch any new issues).

@jameslamb jameslamb added the fix label Mar 11, 2025
@jameslamb jameslamb changed the title WIP: prohibit use of regression_l1 objective with linear trees prohibit use of regression_l1 objective with linear trees Mar 11, 2025
@jameslamb
jameslamb marked this pull request as ready for review March 11, 2025 04:09

@StrikerRUS StrikerRUS left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, thank you!

@StrikerRUS
StrikerRUS merged commit 18c11f8 into master Apr 17, 2025
@StrikerRUS
StrikerRUS deleted the fix/linear-tree-params branch April 17, 2025 10:00
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically locked since there has not been any recent activity since it was closed.
To start a new related discussion, open a new issue at https://github.com/lightgbm-org/LightGBM/issues including a reference to this.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants