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

BoxDecomposition cleanup #1490

Closed
wants to merge 1 commit into from

Conversation

esantorella
Copy link
Member

Summary:

  • Change compute_hypervolume so that each BoxDecomposition subclass uses shared logic for the no-data case
  • [debatable] When Y is None, functions of Y like box_decomp._neg_Y are None rather than being unset attributes, so we do "if self._neg_Y is None" rather than catching an AttributeError. This makes catching type errors easier since otherwise Pyre is unhappy about references to the potentially-uninitialized attribute.
  • Took out unnecessary "register_buffer" calls (this happens automatically with torch.nn.Module.setattr)

Differential Revision: D41172490

@facebook-github-bot facebook-github-bot added CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported labels Nov 10, 2022
@facebook-github-bot
Copy link
Contributor

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

@codecov
Copy link

codecov bot commented Nov 10, 2022

Codecov Report

Merging #1490 (b8f5d26) into main (7613cd2) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main     #1490   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          134       134           
  Lines        12402     12407    +5     
=========================================
+ Hits         12402     12407    +5     
Impacted Files Coverage Δ
..._objective/box_decompositions/box_decomposition.py 100.00% <100.00%> (ø)
...ls/multi_objective/box_decompositions/dominated.py 100.00% <100.00%> (ø)
...ulti_objective/box_decompositions/non_dominated.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@facebook-github-bot
Copy link
Contributor

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

esantorella added a commit to esantorella/botorch that referenced this pull request Nov 10, 2022
Summary:
Pull Request resolved: pytorch#1490

- Change `compute_hypervolume` so that each BoxDecomposition subclass uses shared logic for the no-data case
- [debatable] When `Y` is `None`, functions of Y like `box_decomp._neg_Y` are `None` rather than being unset attributes, so we do "if self._neg_Y is None" rather than catching an AttributeError. This makes catching type errors easier since otherwise Pyre is unhappy about references to the potentially-uninitialized attribute.
- Took out unnecessary "register_buffer" calls (this happens automatically with `torch.nn.Module.setattr`)

Differential Revision: D41172490

fbshipit-source-id: 01e3e159846b5b6cbd77763bdec00ee5d86aa50d
esantorella added a commit to esantorella/botorch that referenced this pull request Nov 11, 2022
Summary:
Pull Request resolved: pytorch#1490

- Change `compute_hypervolume` so that each BoxDecomposition subclass uses shared logic for the no-data case
- [debatable] When `Y` is `None`, functions of Y like `box_decomp._neg_Y` are `None` rather than being unset attributes, so we do "if self._neg_Y is None" rather than catching an AttributeError. This makes catching type errors easier since otherwise Pyre is unhappy about references to the potentially-uninitialized attribute.
- Took out unnecessary "register_buffer" calls (this happens automatically with `torch.nn.Module.setattr`)

Differential Revision: D41172490

fbshipit-source-id: 356485c84b2d6bc85b20ed34b7247ba1478057d2
@facebook-github-bot
Copy link
Contributor

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

Summary:
Pull Request resolved: pytorch#1490

- Change `compute_hypervolume` so that each BoxDecomposition subclass uses shared logic for the no-data case
- [debatable] When `Y` is `None`, functions of Y like `box_decomp._neg_Y` are `None` rather than being unset attributes, so we do "if self._neg_Y is None" rather than catching an AttributeError. This makes catching type errors easier since otherwise Pyre is unhappy about references to the potentially-uninitialized attribute.
- Took out unnecessary "register_buffer" calls (this happens automatically with `torch.nn.Module.setattr`)

Differential Revision: D41172490

fbshipit-source-id: c6e26914be9b25ba268de3355a1ddc8ee9fb66d0
@facebook-github-bot
Copy link
Contributor

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

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants