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

suggest_float with step in multi_objective #1205

Merged
merged 4 commits into from
May 4, 2020
Merged

suggest_float with step in multi_objective #1205

merged 4 commits into from
May 4, 2020

Conversation

nzw0301
Copy link
Member

@nzw0301 nzw0301 commented May 4, 2020

Motivation

suggest_float can take step argument but it cannot be available in multi_objective.

Description of the changes

Add step argument suggest_float and its tests commented by @himkt in #1203 (comment).

It also contains minor fix in the test file.

Copy link
Member

@himkt himkt 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 quick response, it basically looks good to me.
I put one comment.

@@ -42,14 +42,16 @@ def __init__(self, trial: Trial):
# See also: https://github.com/optuna/optuna/pull/1054/files#r407982636
self._n_objectives = multi_objective.study.MultiObjectiveStudy(trial.study).n_objectives

def suggest_float(self, name: str, low: float, high: float, *, log: bool = False) -> float:
def suggest_float(
self, name: str, low: float, high: float, *, log: bool = False, step: Optional[float] = None
Copy link
Member

Choose a reason for hiding this comment

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

Please apply black by black --line-length 99 optuna/multi_objective/trial.py.
https://circleci.com/gh/optuna/optuna/39429

Copy link
Member

@himkt himkt 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.

Copy link
Member

@sile sile left a comment

Choose a reason for hiding this comment

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

Thanks!

@sile sile added the feature Change that does not break compatibility, but affects the public interfaces. label May 4, 2020
@sile sile added this to the v1.4.0 milestone May 4, 2020
@sile sile merged commit dbdba52 into optuna:master May 4, 2020
@nzw0301 nzw0301 deleted the float-with-step-multi-objetive branch May 4, 2020 14:38
@nzw0301
Copy link
Member Author

nzw0301 commented May 4, 2020

Thank you for reviewing my PR!

@sile sile mentioned this pull request Jun 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Change that does not break compatibility, but affects the public interfaces.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants