Skip to content

Prefer math.log with base argument in HyperbandPruner.#1182

Closed
hvy wants to merge 1 commit intooptuna:masterfrom
hvy:fix-hb-log-base
Closed

Prefer math.log with base argument in HyperbandPruner.#1182
hvy wants to merge 1 commit intooptuna:masterfrom
hvy:fix-hb-log-base

Conversation

@hvy
Copy link
Copy Markdown
Member

@hvy hvy commented Apr 29, 2020

Motivation

Simple is better than complex. (It's also faster as it's implemented in C, https://github.com/python/cpython/blob/master/Modules/mathmodule.c#L2347.)

Description of the changes

Make use of the second argument in math.log for a non-trivial base.

@hvy hvy added code-fix Change that does not change the behavior, such as code refactoring. optuna.pruners Related to the `optuna.pruners` submodule. This is automatically labeled by github-actions. labels Apr 29, 2020
@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #1182 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1182   +/-   ##
=======================================
  Coverage   91.02%   91.02%           
=======================================
  Files         142      142           
  Lines       12276    12276           
=======================================
  Hits        11174    11174           
  Misses       1102     1102           
Impacted Files Coverage Δ
optuna/pruners/hyperband.py 86.95% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3fe0ab7...a82a37b. Read the comment docs.

@hvy
Copy link
Copy Markdown
Member Author

hvy commented Apr 30, 2020

Let me close this PR as it most likely will be included in #1188.

@hvy hvy closed this Apr 30, 2020
@hvy hvy deleted the fix-hb-log-base branch April 30, 2020 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-fix Change that does not change the behavior, such as code refactoring. optuna.pruners Related to the `optuna.pruners` submodule. This is automatically labeled by github-actions.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants