Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@eddiebergman
Copy link
Contributor

Previously I wanted to change the default behavior of begin() as was done in #237 as by default it was doing hidden functionality of catching errors silently and attaching them to the report generated. However this new default behavior of not implicitly doing this without being specified by the user would require a deprecation cycle and give annoying warnings.

When considering the base case of what begin would do, is that it would only have the functionality of profile("trial"), i.e. it was a preset profile block we required the user to do.

# New proposed default behavior of `begin()` would make these two equivalent

with trial.begin():
   # ...
   
with trial.profile("trial"):
   # ...

In the interest of keeping things simple and requiring the user to know and do less, I believe it easier to simply remove the begin() block, making writing eval functions less strict.

As an effect of this, if some optimizer requires knowing how long a trial took, there is no codified way we can know this and so a parameter was added to the integrated optimizers. We can reconsider this if it becomes problematic.

@eddiebergman eddiebergman added ux Something to make user experience better deprication Something was deprecated labels Jan 28, 2024
@eddiebergman eddiebergman merged commit da0b6a9 into main Jan 28, 2024
@eddiebergman eddiebergman deleted the refactor-deprecate-trial-begin branch January 28, 2024 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deprication Something was deprecated ux Something to make user experience better

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants