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

[R-package] Handling NULL objective when booster prints, adding tests #6850

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

walkerjameschris
Copy link

@walkerjameschris walkerjameschris commented Feb 28, 2025

Fix for #6848

This PR fixes an issue where lgb.train() creates a booster, the booster is printed, and no objective is specified. This led to an error due to a NULL value. I have handled this by extracting the default objective (looks to be l2) and printing that in the event a built-in or custom objective is not provided.

…s out of method tests, creating unique tests for different method situations
@walkerjameschris walkerjameschris changed the title Handling NULL objective when booster prints, adding a test for this case, dividing other method tests [R-package] Handling NULL objective when booster prints, adding a tests Feb 28, 2025
@walkerjameschris walkerjameschris changed the title [R-package] Handling NULL objective when booster prints, adding a tests [R-package] Handling NULL objective when booster prints, adding tests Mar 1, 2025
@jameslamb jameslamb added the fix label Mar 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants