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

Replace lightgbm with PyTorch-based example to remove lightgbm dependency in visualization tutorial #5257

Conversation

nzw0301
Copy link
Member

@nzw0301 nzw0301 commented Feb 19, 2024

Motivation

Resolve #5255

Description of the changes

  1. Replace the existing example using lightgbm with PyTorch since Optuna is a part of PyTorch ecosystem.
    The newly added PyTorch example comes from the multi-objective tutorial page: Multi-objective Optimization with Optuna. I've removed a few hyperparameters so as not to make the figure less clear due to overlapping text.
  2. Revert the removal of two sections by Migrate LightGBM integration #5249

…m dependency.

The example of pytorch script comes from the multi-objective tutorial page: Multi-objective Optimization with Optuna
@nzw0301 nzw0301 added the document Documentation related. label Feb 19, 2024
@nabenabe0928
Copy link
Collaborator

@y0z Could you review this PR?

Copy link

codecov bot commented Feb 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1bcda7a) 89.23% compared to head (359b5bc) 89.38%.
Report is 42 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5257      +/-   ##
==========================================
+ Coverage   89.23%   89.38%   +0.15%     
==========================================
  Files         206      209       +3     
  Lines       12944    13119     +175     
==========================================
+ Hits        11550    11727     +177     
+ Misses       1394     1392       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@y0z y0z 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 your contribution.
LGTM!

NIT: Although coincidentally, in the example, the first trial achieves the best accuracy. To better demonstrate the optimization history plot, another random seed involving best-value updates might be preferable.

image

@nzw0301
Copy link
Member Author

nzw0301 commented Feb 20, 2024

@y0z Thank you for your review and suggestion. How about this plot that I used a different random seed?

newplot

@y0z
Copy link
Member

y0z commented Feb 20, 2024

@nzw0301

Thank you for your update!
The new plot looks good to me 👏

Copy link
Collaborator

@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, LGTM!

@nabenabe0928 nabenabe0928 merged commit 52e2f5d into optuna:master Feb 20, 2024
20 checks passed
@nabenabe0928 nabenabe0928 added this to the v3.6.0 milestone Feb 20, 2024
@nzw0301 nzw0301 deleted the replace-lightgbm-with-pytorch-for-visualisation-tutorial branch February 20, 2024 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
document Documentation related.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New tutorial for visualization
3 participants