-
Notifications
You must be signed in to change notification settings - Fork 33
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
Follow the Optuna convention #189
Conversation
I modified your code, so could you take a look if you are fine with these changes? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @nabenabe0928, I think these changes make a lot of sense! I have some mostly minor comments.
package/samplers/cmamae/example.py
Outdated
"""Returns an objective followed by two measures.""" | ||
x = trial.suggest_float("x", -10, 10) | ||
y = trial.suggest_float("y", -10, 10) | ||
return x**2 + y**2, x, y | ||
trial.set_user_attr("x", x) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would set the measure names to be m0
and m1
rather than x
and y
so that it is more clear that measure names need not be the same as the parameters. For example, we could easily have:
trial.set_user_attr("m0", 2 * x)
trial.set_user_attr("m1", x + y)
package/samplers/cmamae/README.md
Outdated
"""Returns an objective followed by two measures.""" | ||
x = trial.suggest_float("x", -10, 10) | ||
y = trial.suggest_float("y", -10, 10) | ||
return x**2 + y**2, x, y | ||
trial.set_user_attr("x", x) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as in example.py
@btjanaka |
@nabenabe0928 It looks good to me! Thank you again! |
@gen740 Could you review this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Contributor Agreements
Please read the contributor agreements and if you agree, please click the checkbox below.
Motivation
Let Pyribs follow the Optuna convention.