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

Improve Documentation of Testing Base Classes in BoTorch #2770

Closed
wants to merge 1 commit into from

Conversation

SamuelGabriel
Copy link
Contributor

@SamuelGabriel SamuelGabriel commented Mar 14, 2025

I added doc strings, and some abstract methods and we renamed some of the actually public functions, that had a leading _.

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

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

SamuelGabriel added a commit to SamuelGabriel/botorch that referenced this pull request Mar 17, 2025
Summary:

I added doc strings (and some abstract methods).

I came across the following issues doing so:

- There are multiple private functions, like `_get_random_data`. These are used outside, though, thus the editor shows them as unused. Should they maybe not be private instead?
- The double naming of `BaseTestProblem` and `functions` is confusing for me. Is there a reason for this? Should we maybe change it to only use one of the two?
- Only `TestCorruptedProblemsMixin.rosenbrock_problem` seems to be used from that Mixin. Should we maybe change this to not be a Mixin, but just the rosenbrock variable instad, or not have the `outlier_generator` inside the Mixin?
- I think we should delete `rsample_from_base_samples`. It is not used (if my command+click works here properly) and hard to understand.

Reviewed By: esantorella

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

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

SamuelGabriel added a commit to SamuelGabriel/botorch that referenced this pull request Mar 17, 2025
Summary:
Pull Request resolved: pytorch#2770

I added doc strings (and some abstract methods).

I came across the following issues doing so:

- There are multiple private functions, like `_get_random_data`. These are used outside, though, thus the editor shows them as unused. Should they maybe not be private instead?
- The double naming of `BaseTestProblem` and `functions` is confusing for me. Is there a reason for this? Should we maybe change it to only use one of the two?
- Only `TestCorruptedProblemsMixin.rosenbrock_problem` seems to be used from that Mixin. Should we maybe change this to not be a Mixin, but just the rosenbrock variable instad, or not have the `outlier_generator` inside the Mixin?
- I think we should delete `rsample_from_base_samples`. It is not used (if my command+click works here properly) and hard to understand.

Reviewed By: esantorella

Differential Revision: D71198064
@SamuelGabriel SamuelGabriel force-pushed the export-D71198064 branch 2 times, most recently from f682781 to 1756faa Compare March 17, 2025 17:59
SamuelGabriel added a commit to SamuelGabriel/botorch that referenced this pull request Mar 17, 2025
Summary:

I added doc strings (and some abstract methods).

I came across the following issues doing so:

- There are multiple private functions, like `_get_random_data`. These are used outside, though, thus the editor shows them as unused. Should they maybe not be private instead?
- The double naming of `BaseTestProblem` and `functions` is confusing for me. Is there a reason for this? Should we maybe change it to only use one of the two?
- Only `TestCorruptedProblemsMixin.rosenbrock_problem` seems to be used from that Mixin. Should we maybe change this to not be a Mixin, but just the rosenbrock variable instad, or not have the `outlier_generator` inside the Mixin?
- I think we should delete `rsample_from_base_samples`. It is not used (if my command+click works here properly) and hard to understand.

Reviewed By: esantorella

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

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

Copy link

codecov bot commented Mar 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.99%. Comparing base (f612ad9) to head (971d443).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2770   +/-   ##
=======================================
  Coverage   99.99%   99.99%           
=======================================
  Files         202      202           
  Lines       18499    18508    +9     
=======================================
+ Hits        18498    18507    +9     
  Misses          1        1           

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

SamuelGabriel added a commit to SamuelGabriel/botorch that referenced this pull request Mar 17, 2025
Summary:

I added doc strings (and some abstract methods).

I came across the following issues doing so:

- There are multiple private functions, like `_get_random_data`. These are used outside, though, thus the editor shows them as unused. Should they maybe not be private instead?
- The double naming of `BaseTestProblem` and `functions` is confusing for me. Is there a reason for this? Should we maybe change it to only use one of the two?
- Only `TestCorruptedProblemsMixin.rosenbrock_problem` seems to be used from that Mixin. Should we maybe change this to not be a Mixin, but just the rosenbrock variable instad, or not have the `outlier_generator` inside the Mixin?
- I think we should delete `rsample_from_base_samples`. It is not used (if my command+click works here properly) and hard to understand.

Reviewed By: esantorella

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

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

SamuelGabriel added a commit to SamuelGabriel/botorch that referenced this pull request Mar 17, 2025
Summary:
Pull Request resolved: pytorch#2770

I added doc strings (and some abstract methods).

I came across the following issues doing so:

- There are multiple private functions, like `_get_random_data`. These are used outside, though, thus the editor shows them as unused. Should they maybe not be private instead?
- The double naming of `BaseTestProblem` and `functions` is confusing for me. Is there a reason for this? Should we maybe change it to only use one of the two?
- Only `TestCorruptedProblemsMixin.rosenbrock_problem` seems to be used from that Mixin. Should we maybe change this to not be a Mixin, but just the rosenbrock variable instad, or not have the `outlier_generator` inside the Mixin?
- I think we should delete `rsample_from_base_samples`. It is not used (if my command+click works here properly) and hard to understand.

Reviewed By: esantorella

Differential Revision: D71198064
SamuelGabriel added a commit to SamuelGabriel/botorch that referenced this pull request Mar 17, 2025
Summary:

I added doc strings (and some abstract methods).

I came across the following issues doing so:

- There are multiple private functions, like `_get_random_data`. These are used outside, though, thus the editor shows them as unused. Should they maybe not be private instead?
- The double naming of `BaseTestProblem` and `functions` is confusing for me. Is there a reason for this? Should we maybe change it to only use one of the two?
- Only `TestCorruptedProblemsMixin.rosenbrock_problem` seems to be used from that Mixin. Should we maybe change this to not be a Mixin, but just the rosenbrock variable instad, or not have the `outlier_generator` inside the Mixin?
- I think we should delete `rsample_from_base_samples`. It is not used (if my command+click works here properly) and hard to understand.

Reviewed By: esantorella

Differential Revision: D71198064
Summary:
Pull Request resolved: pytorch#2770

I added doc strings (and some abstract methods).

I came across the following issues doing so:

- There are multiple private functions, like `_get_random_data`. These are used outside, though, thus the editor shows them as unused. Should they maybe not be private instead?
- The double naming of `BaseTestProblem` and `functions` is confusing for me. Is there a reason for this? Should we maybe change it to only use one of the two?
- Only `TestCorruptedProblemsMixin.rosenbrock_problem` seems to be used from that Mixin. Should we maybe change this to not be a Mixin, but just the rosenbrock variable instad, or not have the `outlier_generator` inside the Mixin?
- I think we should delete `rsample_from_base_samples`. It is not used (if my command+click works here properly) and hard to understand.

Reviewed By: esantorella

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

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 44b6400.

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.

2 participants