Unable to reproduce results before and after a study is deepcopied
See original GitHub issueThe behavior is different between 0.19.0 and 1.x.x.
Environment
- Python version: 3.6.5
- OS: Windows 10
Examples
import copy
import optuna
def objective(trial):
x = trial.suggest_uniform('x', -10, 10)
return (x - 2) ** 2
study = optuna.create_study(sampler=optuna.samplers.TPESampler(seed=0))
study.optimize(objective, n_trials=1)
study = optuna.create_study(sampler=optuna.samplers.TPESampler(seed=0))
study = copy.deepcopy(study)
study.optimize(objective, n_trials=1)
Logs
v0.19.0
[I 2020-02-12 02:37:41,933] Finished trial#0 resulted in value: 1.0480229520791995. Current best value is 1.0480229520791995 with parameters: {'x': 0.9762700785464951}.
[I 2020-02-12 02:37:41,990] Finished trial#0 resulted in value: 1.0480229520791995. Current best value is 1.0480229520791995 with parameters: {'x': 0.9762700785464951}.
v1.0.0
[I 2020-02-12 02:38:44,010] Finished trial#0 resulted in value: 1.0480229520791995. Current best value is 1.0480229520791995 with parameters: {'x': 0.9762700785464951}.
[I 2020-02-12 02:38:44,067] Finished trial#0 resulted in value: 46.90638356377688. Current best value is 46.90638356377688 with parameters: {'x': 8.848823516763801}.
v1.1.0
[I 2020-02-12 02:39:39,168] Finished trial#0 resulted in value: 1.0480229520791995. Current best value is 1.0480229520791995 with parameters: {'x': 0.9762700785464951}.
[I 2020-02-12 02:39:39,226] Finished trial#0 resulted in value: 2.756825098011473. Current best value is 2.756825098011473 with parameters: {'x': 3.6603689644207016}.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Why can't I reproduce the experiments in the original paper that ...
I wrote some python code to reproduce this paper's purported results. My code very efficiently optimizes simple smooth functions like bowls, ...
Read more >What Happens When Someone Fails to Reproduce ... - Enago
If you weren't the Principal Investigator (PI) on the study, did your PI get adequate time to review the project before releasing the...
Read more >Why does deepcopy fail when copying a complex object
So the idea is create a full copy of the original object in a new class with the added members. orig_obj = SomeSqlObject.get_root()...
Read more >optuna.study. - trials - Read the Docs
Enqueue a trial with given parameter values. get_trials ([deepcopy, states]). Return all trials in the study. optimize (func[, n_trials, timeout, n_jobs, .
Read more >ReCrash: Making Software Failures Reproducible by ...
It is very hard to fix a software failure without being able to reproduce ... Reproducing failures (in Java, these often result from...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Y-oHr-N Since this problem seems to have been solved by #968, I’ll close this issue. Feel free to reopen it if you still have any problems.
This issue has not seen any recent activity.