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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert to default inf max_trials and pool-size of 1 #659

Merged
merged 7 commits into from
Sep 14, 2021

Conversation

bouthilx
Copy link
Member

[Fixes #644]

Why:

The new default behavior is confusing for users. It is also difficult to
determine a good default max_trials, so having not enough or to many
trials sampled by default at the start of HPO can be annoying for many
users. Using inf by default and iterating with pool-size may be the best
alternative.

Now that we have a support for n-workers, the argument pool-size we
previously deprecated actually make sense. By default, pool-size
should be equal to number of workers. We have n-workers set to 1 by
default, so by default we are back to previous behavior; sampling 1
trial at a time, until max_trials.

How:

The producer now takes a pool size as argument when producing. The same
applies to ExperimentClient.suggest() and ExperimentClient.workon(). The
pool size is used to sample multiple trials at a time and increase I/O
efficiency.

The producer now keeps track of number of new trials so that
if multiple workers are producing new trials with a non-seed algorithm
(hence they produce different trials and there are no conflicts leading
to backoff) they will stop if they generated together up to pool_size
trials.

Note:

Pool-size is moved to to worker configuration instead. Since pool-size
relates to n-workers, which is part of worker configuration, having
pool-size in worker configuration makes more sense.

Why:

The new default behavior is confusing for users. It is also difficult to
determine a good default max_trials, so having not enough or to many
trials sampled by default at the start of HPO can be annoying for many
users. Using inf by default and iterating with pool-size may be the best
alternative.

Now that we have a support for n-workers, the argument pool-size we
previously deprecated actually make sense. By default, pool-size
should be equal to number of workers. We have n-workers set to 1 by
default, so by default we are back to previous behavior; sampling 1
trial at a time, until max_trials.

How:

The producer now takes a pool size as argument when producing. The same
applies to ExperimentClient.suggest() and ExperimentClient.workon(). The
pool size is used to sample multiple trials at a time and increase I/O
efficiency.

The producer now keeps track of number of new trials so that
if multiple workers are producing new trials with a non-seed algorithm
(hence they produce different trials and there are no conflicts leading
to backoff) they will stop if they generated together up to `pool_size`
trials.

Note:

Pool-size is moved to to worker configuration instead. Since pool-size
relates to n-workers, which is part of worker configuration, having
pool-size in worker configuration makes more sense.
Why:

There was a bug in the tests. The functions to generate trials would
generate more than requested because of the new behavior of producer
attempting to produce all trials at once, once the value of `max_trials`
was conflicting with the number of trials requested to the trial
generating function for tests (`orion.testing.evc.generate_trials`).

Fortunately the bug in the tests did not seem to miss any bugs in the
code they were testing.

How:

Adjust the expected numbers based on the corrected behiavor. The numbers
make indeed more sense now.
@bouthilx bouthilx added the enhancement Improves a feature or non-functional aspects (e.g., optimization, prettify, technical debt) label Sep 10, 2021
@bouthilx bouthilx added this to the v0.1.17 milestone Sep 10, 2021
@bouthilx bouthilx added this to In progress in Release v0.1.17 via automation Sep 10, 2021
docs/src/user/config.rst Outdated Show resolved Hide resolved
@donglinjy
Copy link
Collaborator

The new behavior does make more sense to me.

Release v0.1.17 automation moved this from In progress to Reviewer approved Sep 14, 2021
Co-authored-by: Lin Dong <michaeltunglin@gmail.com>
@bouthilx
Copy link
Member Author

Thanks @donglinjy for the review!

@bouthilx bouthilx merged commit 10383b2 into Epistimio:develop Sep 14, 2021
Release v0.1.17 automation moved this from Reviewer approved to Done Sep 14, 2021
@bouthilx bouthilx deleted the feature/back_to_pool_size branch September 14, 2021 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improves a feature or non-functional aspects (e.g., optimization, prettify, technical debt)
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Revert to default max_trials inf and pool-size 1
2 participants