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

fix EBTS bug where gen returned less than n total weight #3316

Closed
wants to merge 1 commit into from

Conversation

sdaulton
Copy link
Contributor

@sdaulton sdaulton commented Feb 6, 2025

Summary:
This could happen if enought weights were zero here than the length of weights became less than n: https://www.internalfb.com/code/fbsource/[b9c286a9f21709eb4c964c3c24bb629b2b218c86]/fbcode/ax/models/discrete/thompson.py?lines=109-113.

The AlmostEqual is needed to deal with numerical precision (e.g. 9.0000000002)

Reviewed By: danielcohenlive

Differential Revision: D69253157

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Feb 6, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D69253157

sdaulton added a commit to sdaulton/Ax-1 that referenced this pull request Feb 6, 2025
Summary:

This could happen if enought `weights` were zero here than the length of `weights` became less than `n`: https://www.internalfb.com/code/fbsource/[b9c286a9f21709eb4c964c3c24bb629b2b218c86]/fbcode/ax/models/discrete/thompson.py?lines=109-113.

The `AlmostEqual` is needed to deal with numerical precision (e.g. 9.0000000002)

Reviewed By: danielcohenlive

Differential Revision: D69253157
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D69253157

@codecov-commenter
Copy link

codecov-commenter commented Feb 6, 2025

Codecov Report

Attention: Patch coverage is 89.47368% with 2 lines in your changes missing coverage. Please review.

Project coverage is 95.70%. Comparing base (d5b2e22) to head (292917d).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
ax/utils/testing/core_stubs.py 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3316      +/-   ##
==========================================
- Coverage   95.74%   95.70%   -0.05%     
==========================================
  Files         533      533              
  Lines       52516    52537      +21     
==========================================
- Hits        50280    50278       -2     
- Misses       2236     2259      +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

sdaulton added a commit to sdaulton/Ax-1 that referenced this pull request Feb 6, 2025
Summary:

This could happen if enought `weights` were zero here than the length of `weights` became less than `n`: https://www.internalfb.com/code/fbsource/[b9c286a9f21709eb4c964c3c24bb629b2b218c86]/fbcode/ax/models/discrete/thompson.py?lines=109-113.

The `AlmostEqual` is needed to deal with numerical precision (e.g. 9.0000000002)

This also makes `batch_size` optional in `BenchmarkMethod`. A `batch_size` of `None`, means the batch size from the initial trial is used. For bandits, this means the cardinality of the search space becomes the batch size after the factorial node.

Differential Revision: D69253157
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D69253157

sdaulton added a commit to sdaulton/Ax-1 that referenced this pull request Feb 7, 2025
Summary:

This could happen if enought `weights` were zero here than the length of `weights` became less than `n`: https://www.internalfb.com/code/fbsource/[b9c286a9f21709eb4c964c3c24bb629b2b218c86]/fbcode/ax/models/discrete/thompson.py?lines=109-113.

The `AlmostEqual` is needed to deal with numerical precision (e.g. 9.0000000002)

This also makes `batch_size` optional in `BenchmarkMethod`. A `batch_size` of `None`, means the batch size from the initial trial is used. For bandits, this means the cardinality of the search space becomes the batch size after the factorial node.

Differential Revision: D69253157
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D69253157

sdaulton added a commit to sdaulton/Ax-1 that referenced this pull request Feb 7, 2025
Summary:

This could happen if enought `weights` were zero here than the length of `weights` became less than `n`: https://www.internalfb.com/code/fbsource/[b9c286a9f21709eb4c964c3c24bb629b2b218c86]/fbcode/ax/models/discrete/thompson.py?lines=109-113.

The `AlmostEqual` is needed to deal with numerical precision (e.g. 9.0000000002)

This also makes `batch_size` optional in `BenchmarkMethod`. A `batch_size` of `None`, means the batch size from the initial trial is used. For bandits, this means the cardinality of the search space becomes the batch size after the factorial node.

Reviewed By: mgarrard

Differential Revision: D69253157
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D69253157

sdaulton added a commit to sdaulton/Ax-1 that referenced this pull request Feb 10, 2025
Summary:

This could happen if enought `weights` were zero here than the length of `weights` became less than `n`: https://www.internalfb.com/code/fbsource/[b9c286a9f21709eb4c964c3c24bb629b2b218c86]/fbcode/ax/models/discrete/thompson.py?lines=109-113.

The `AlmostEqual` is needed to deal with numerical precision (e.g. 9.0000000002)

This also makes `batch_size` optional in `BenchmarkMethod`. A `batch_size` of `None`, means the batch size from the initial trial is used. For bandits, this means the cardinality of the search space becomes the batch size after the factorial node.

Reviewed By: mgarrard, esantorella

Differential Revision: D69253157
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D69253157

sdaulton added a commit to sdaulton/Ax-1 that referenced this pull request Feb 10, 2025
Summary:

This could happen if enought `weights` were zero here than the length of `weights` became less than `n`: https://www.internalfb.com/code/fbsource/[b9c286a9f21709eb4c964c3c24bb629b2b218c86]/fbcode/ax/models/discrete/thompson.py?lines=109-113.

The `AlmostEqual` is needed to deal with numerical precision (e.g. 9.0000000002)

This also makes `batch_size` optional in `BenchmarkMethod`. A `batch_size` of `None`, means the batch size from the initial trial is used. For bandits, this means the cardinality of the search space becomes the batch size after the factorial node.

Reviewed By: mgarrard, esantorella

Differential Revision: D69253157
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D69253157

Summary:

This could happen if enought `weights` were zero here than the length of `weights` became less than `n`: https://www.internalfb.com/code/fbsource/[b9c286a9f21709eb4c964c3c24bb629b2b218c86]/fbcode/ax/models/discrete/thompson.py?lines=109-113.

The `AlmostEqual` is needed to deal with numerical precision (e.g. 9.0000000002)

This also makes `batch_size` optional in `BenchmarkMethod`. A `batch_size` of `None`, means the batch size from the initial trial is used. For bandits, this means the cardinality of the search space becomes the batch size after the factorial node.

Reviewed By: mgarrard, esantorella

Differential Revision: D69253157
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D69253157

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 0809eb3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants