Skip to content

Accept custom objective in LightGBMTuner#203

Merged
nabenabe0928 merged 15 commits intooptuna:mainfrom
sawa3030:fix/accept-custom-objective-in-lgbm-tuner
Feb 21, 2025
Merged

Accept custom objective in LightGBMTuner#203
nabenabe0928 merged 15 commits intooptuna:mainfrom
sawa3030:fix/accept-custom-objective-in-lgbm-tuner

Conversation

@sawa3030
Copy link
Copy Markdown
Collaborator

@sawa3030 sawa3030 commented Feb 6, 2025

Motivation

Description of the changes

  • Introduce a new member variable _custom_objective to store the actual custom objective function.
  • Update the objective parameter to store the function name when a custom objective is provided, ensuring compatibility with serialization.
  • Add test cases to verify that custom objectives work as expected.

@y0z y0z added the enhancement Change that does not break compatibility and not affect public interfaces, but improves performance. label Feb 12, 2025
@y0z
Copy link
Copy Markdown
Member

y0z commented Feb 12, 2025

@nabenabe0928 Could you review this PR?

@nabenabe0928
Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown
Contributor

@nabenabe0928 nabenabe0928 left a comment

Choose a reason for hiding this comment

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

Thank you for the PR, I left some comments!
I will check the unit tests later")

sawa3030 and others added 2 commits February 13, 2025 17:32
Co-authored-by: Shuhei Watanabe <47781922+nabenabe0928@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@nabenabe0928 nabenabe0928 left a comment

Choose a reason for hiding this comment

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

I left some minor comments:)

sawa3030 and others added 5 commits February 17, 2025 10:13
Co-authored-by: Shuhei Watanabe <47781922+nabenabe0928@users.noreply.github.com>
Co-authored-by: Shuhei Watanabe <47781922+nabenabe0928@users.noreply.github.com>
Co-authored-by: Shuhei Watanabe <47781922+nabenabe0928@users.noreply.github.com>
Co-authored-by: Shuhei Watanabe <47781922+nabenabe0928@users.noreply.github.com>
Co-authored-by: Shuhei Watanabe <47781922+nabenabe0928@users.noreply.github.com>
@nabenabe0928
Copy link
Copy Markdown
Contributor

@sawa3030
As #205 fixes the CI, it must be merged before this PR.

@nabenabe0928
Copy link
Copy Markdown
Contributor

@pmandiola

I forgot to mention you, but we are working on the issue now in this PR!
Please feel free to leave any comments so that we can include your commits !

@HideakiImamura
Copy link
Copy Markdown
Member

@sawa3030 #207 has been merged. Could you merge the main branch?

Copy link
Copy Markdown
Contributor

@nabenabe0928 nabenabe0928 left a comment

Choose a reason for hiding this comment

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

LGTM

@nabenabe0928 nabenabe0928 merged commit 37ee83d into optuna:main Feb 21, 2025
30 checks passed
@c-bata c-bata added this to the v4.3.0 milestone Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Change that does not break compatibility and not affect public interfaces, but improves performance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants