question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enable `objective(study.best_trial)`

See original GitHub issue

I find it useful to be able to re-run trials to investigate them further, e.g. with more debugging/data reporting enabled. I thought that it would be natural if I could manually run a trial from a study e.g. by:

my_objective(my_study.best_trial, more_reporting=True)

but given that the objective function calls various suggest_* methods, I get AttributeError: 'FrozenTrial' object has no attribute 'suggest_int'. And instead I need to do:

my_objective(optuna.trial.FixedTrial(my_study.best_trial.params, my_study.best_trial.number), more_reporting=True)

Making my_objective(my_study.best_trial) work would be a small, but useful improvement in my workflow.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
nzw0301commented, Jun 30, 2020

@keisuke-umezawa Thank you for your reply! But I’m a little bit busy and not good health condition this July, so I create PR for this issue if this issue’s priority is not so high… Is it okay?

1reaction
HideakiImamuracommented, Aug 3, 2020

Let me close this issue because this feature has been introduced in #1503.

Read more comments on GitHub >

github_iconTop Results From Across the Web

optuna.study. - trials - Read the Docs
This object provides interfaces to run a new Trial , access trials' history, set/get user-defined ... Return parameters of the best trial in...
Read more >
Blood Pressure After Endovascular Stroke Therapy-II (BEST-II)
The purpose of this trial is to evaluate the safety of lower BP management strategies in patients who are successfully treated with endovascular...
Read more >
The BEST Trial: Biomarkers for Evaluating Spine Treatments
This Lower Back Pain and Pain study at UCSD is now recruiting people ages 18 years ... The primary objective of this trial...
Read more >
Hands-On Python Guide to Optuna - A New Hyperparameter ...
In Optuna, we use the study object to manage optimization. ... objective function:",study.best_value) # To get the best trial: print("Return ...
Read more >
Bacpac | Home
About the study · The BEST trial includes 4 proven treatments for chronic low back pain, but they do not always work equally...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found