Skip to content

[python-package] add test for early stopping via params in cv() - #7504

Open
GopiChoudhary19 wants to merge 1 commit into
lightgbm-org:mainfrom
GopiChoudhary19:python-package/test-cv-early-stopping-via-params
Open

GopiChoudhary19 wants to merge 1 commit into
lightgbm-org:mainfrom
GopiChoudhary19:python-package/test-cv-early-stopping-via-params

Conversation

@GopiChoudhary19

@GopiChoudhary19 GopiChoudhary19 commented Oct 25, 2026 •

Copy link
Copy Markdown

it contributes to #7031 , the checklist item "engine.cv(): adding early_stopping() based on the presence of early_stopping_round in params". it runs lgb.cv() with early_stopping_round: 2 and metric that never improves. It checks that training stops after the first iteration. it then runs again without the parameter and checks that all 10 rounds are kept. Alias handling is covered too(early_stopping_round and n_iter_no_change). I ran the new test, and the existing early-stopping and test_cv test, against current main, and they pass.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants