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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stabilize create_trial #3196

Merged
merged 5 commits into from Dec 22, 2021
Merged

Conversation

himkt
Copy link
Member

@himkt himkt commented Dec 20, 2021

馃敆 #2956

We now stabilize create_trial.

@himkt himkt changed the title Stabilize create_trial Stabilize create_trial Dec 20, 2021
@github-actions github-actions bot added the optuna.trial Related to the `optuna.trial` submodule. This is automatically labeled by github-actions. label Dec 20, 2021
@@ -183,7 +183,7 @@ def _create_trial(mo_trial: "multi_objective.trial.FrozenMultiObjectiveTrial") -
warnings.simplefilter("ignore", ExperimentalWarning)
trial = create_trial(
state=mo_trial.state,
values=mo_trial.values,
values=mo_trial.values, # type: ignore
Copy link
Member Author

@himkt himkt Dec 20, 2021

Choose a reason for hiding this comment

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

FrozenMultiObjectiveTrial.values is not Optional[Sequence[float]]. I simply ignore this mismatch because optuna.multi_objective is entirely deprecated.

self.values = tuple(trial.intermediate_values.get(i) for i in range(n_objectives))

@codecov-commenter
Copy link

Codecov Report

Merging #3196 (d996c52) into master (c4791fc) will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3196      +/-   ##
==========================================
- Coverage   91.22%   91.22%   -0.01%     
==========================================
  Files         146      146              
  Lines       11916    11914       -2     
==========================================
- Hits        10870    10868       -2     
  Misses       1046     1046              
Impacted Files Coverage 螖
optuna/multi_objective/samplers/_motpe.py 100.00% <酶> (酶)
optuna/trial/_frozen.py 97.57% <酶> (-0.03%) 猬囷笍

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 c4791fc...d996c52. Read the comment docs.

@HideakiImamura HideakiImamura added code-fix Change that does not change the behavior, such as code refactoring. v3 Issue/PR for Optuna version 3. labels Dec 20, 2021
@HideakiImamura HideakiImamura self-assigned this Dec 20, 2021
Copy link
Member

@HideakiImamura HideakiImamura left a comment

Choose a reason for hiding this comment

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

Looks very good!

@HideakiImamura
Copy link
Member

Let me merge this PR with my one approval since this is a light PR.

@HideakiImamura HideakiImamura merged commit bd8ebb9 into optuna:master Dec 22, 2021
@HideakiImamura HideakiImamura added this to the v3.0.0-a1 milestone Dec 22, 2021
@HideakiImamura HideakiImamura mentioned this pull request Dec 22, 2021
1 task
@himkt himkt deleted the stabilize/create-trial branch December 22, 2021 15:38
@himkt himkt added feature Change that does not break compatibility, but affects the public interfaces. and removed code-fix Change that does not change the behavior, such as code refactoring. labels Feb 4, 2022
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. optuna.trial Related to the `optuna.trial` submodule. This is automatically labeled by github-actions. v3 Issue/PR for Optuna version 3.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants