refactor(trial): Remove begin()
#238
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.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.