Skip to content

Add support for validation sets and callbacks on lgbm learner#251

Merged
diastoff1 merged 1 commit into
masterfrom
lgbm-callback-2
Apr 22, 2026
Merged

Add support for validation sets and callbacks on lgbm learner#251
diastoff1 merged 1 commit into
masterfrom
lgbm-callback-2

Conversation

@vitorsrg

@vitorsrg vitorsrg commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

Status

READY

Todo list

  • Documentation
  • Tests added and passed

Background context

The lgbm_regression_learner did not support validation sets or callbacks, limiting the ability to use early stopping and monitor training progress — features already available in the classification counterpart (lgbm_classification_learner).

Continuation of #249 given dependencies unblocked resolution by #250

Description of the changes proposed in the pull request

  • Add valid_dfs and callbacks parameters to lgbm_regression_learner, matching the interface of lgbm_classification_learner
  • When valid_dfs is provided, create LightGBM validation datasets (with proper feature names and weights) for early-stopping support
  • Pass callbacks through to lgbm.train for iteration-level hooks (e.g. lgbm.early_stopping, lgbm.log_evaluation)
  • Update docstring to document the new parameters and fix an incorrect description of the target column
  • Bumped coverage so it's compatible with newer versions of numba

Where should the reviewer start?

src/fklearn/training/regression.py — the changes to lgbm_regression_learner

@vitorsrg vitorsrg requested a review from a team as a code owner April 22, 2026 07:48
@vitorsrg vitorsrg changed the title Lgbm callback 2 Add support for validation sets and callbacks on lgbm learner Apr 22, 2026
gppeixoto
gppeixoto previously approved these changes Apr 22, 2026
@diastoff1 diastoff1 merged commit 4af19f2 into master Apr 22, 2026
13 checks passed
@diastoff1 diastoff1 deleted the lgbm-callback-2 branch April 22, 2026 19:04
@vitorsrg vitorsrg mentioned this pull request Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants