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

Add PED-ANOVA as the first option for importance evaluator #811

Merged
merged 4 commits into from
Feb 22, 2024

Conversation

nabenabe0928
Copy link
Collaborator

@nabenabe0928 nabenabe0928 commented Feb 22, 2024

Contributor License Agreement

This repository (optuna-dashboard) and Goptuna share common code.
This pull request may therefore be ported to Goptuna.
Make sure that you understand the consequences concerning licenses and check the box below if you accept the term before creating this pull request.

  • I agree this patch may be ported to Goptuna by other Goptuna contributors.

Reference Issues/PRs

This PR aims to add PED-ANOVA, a quick f-ANOVA calculation algorithm, to the first choice of the importance calculation of Optuna Dashboard to enhance UX.

For PED-ANOVA, please check the following PR:

What does this implement/fix? Explain your changes.

This PR introduces PED-ANOVA to Optuna Dashboard if the Optuna version in the environment is 3.6 or later.
By using PED-ANOVA, the visualization becomes very quick, so users will not experience very lagged dashboard behavior anymore due to the importance evaluation.

The current Optuna Dashboard would not give anything after several minutes when n_trials is huge (e.g., n_trails > 10000).

image

Meanwhile, if we use PED-ANOVA, Optuna Dashboard gives the importance plot in a few seconds even with n_trails > 10000.

image

Copy link

codecov bot commented Feb 22, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (8f39413) 69.53% compared to head (3efee74) 69.53%.
Report is 6 commits behind head on main.

Files Patch % Lines
optuna_dashboard/_importance.py 71.42% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #811   +/-   ##
=======================================
  Coverage   69.53%   69.53%           
=======================================
  Files          35       35           
  Lines        2360     2367    +7     
=======================================
+ Hits         1641     1646    +5     
- Misses        719      721    +2     

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

Comment on lines 34 to 36
except Exception as e:
_logger.warning(f"Skipping to use PedAnovaImportanceEvaluator due to {e}.")
PedAnovaImportanceEvaluator = None # type: ignore
Copy link
Member

@c-bata c-bata Feb 22, 2024

Choose a reason for hiding this comment

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

Suggested change
except Exception as e:
_logger.warning(f"Skipping to use PedAnovaImportanceEvaluator due to {e}.")
PedAnovaImportanceEvaluator = None # type: ignore

[nit] I would say these lines can be removed since PedAnovaImportanceEvaluator is a pure Python module.

Copy link
Member

@c-bata c-bata 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 pull request. Changes look almost good to me. I will approve this PR after passing CI.

@nabenabe0928 nabenabe0928 force-pushed the feat/replace-fanova-with-ped-anova branch from 51aba76 to 3efee74 Compare February 22, 2024 07:52
@nabenabe0928
Copy link
Collaborator Author

@c-bata Thank you for your review, I addressed your suggestion and removed the error in CI.

Copy link
Member

@c-bata c-bata left a comment

Choose a reason for hiding this comment

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

LGTM!

@c-bata c-bata merged commit 8d1ae04 into optuna:main Feb 22, 2024
15 checks passed
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.

2 participants