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

Avoid duplicates in RandomSearch #361

Merged
merged 1 commit into from
Mar 18, 2020

Conversation

bouthilx
Copy link
Member

Why:

The filtering of duplicates in RandomSearch is a lot more efficient than
relying on the database with DuplicateKeyErrors. There will still be
race conditions leading to this error, but filtering upfront in
RandomSearch reduces significantly the number of registration failures
and lead to better workload balance between the workers. Without this
fix, some workers end up always updating their algo and trying to sample
the next point but loose all race conditions.

How:

Use _trial_info to filter out duplicates while sampling points...

@bouthilx bouthilx requested a review from Delaunay March 18, 2020 01:45
@bouthilx
Copy link
Member Author

Why:

The filtering of duplicates in RandomSearch is a lot more efficient than
relying on the database with DuplicateKeyErrors. There will still be
race conditions leading to this error, but filtering upfront in
RandomSearch reduces significantly the number of registration failures
and lead to better workload balance between the workers. Without this
fix, some workers end up always updating their algo and trying to sample
the next point but loose all race conditions.

How:

Use _trial_info to filter out duplicates while sampling points...
@bouthilx bouthilx force-pushed the fix/balance_workload branch from f3464bd to fc9a477 Compare March 18, 2020 01:48
@codecov-io
Copy link

Codecov Report

Merging #361 into develop will increase coverage by 0.09%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #361      +/-   ##
===========================================
+ Coverage    45.54%   45.64%   +0.09%     
===========================================
  Files           67       67              
  Lines        12192    12214      +22     
  Branches       316      317       +1     
===========================================
+ Hits          5553     5575      +22     
  Misses        6614     6614              
  Partials        25       25
Impacted Files Coverage Δ
tests/unittests/algo/test_random.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c378510...fc9a477. Read the comment docs.

@bouthilx bouthilx merged commit e7e2b23 into Epistimio:develop Mar 18, 2020
This was referenced Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants