-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Docstring overhaul #457
Docstring overhaul #457
Conversation
….py` (bayesian-optimization#435) * Replace custom colour implementation, add docs for `logger.py`, `util.py` * minor typo/syntax fixes * User `or` to separate different possible types
…an-optimization#440) * Run tests on any PR * Update docs, linting * Update bayes_opt/constraint.py Co-authored-by: Leandro Braga <[email protected]> * Rename mislabelled parameters --------- Co-authored-by: Leandro Braga <[email protected]>
…-optimization#445) * Fixes issue-436: Constrained optimization does not allow duplicate points (bayesian-optimization#437) * Update docs of `bayesian_optimization.py` and `observer.py`. * Fix minor style issue in module docstring * Update docs of `__init__.py` and `events.py`. * Fix minor style issue in class docstring * Add workflow to check docstrings * Update bayes_opt/bayesian_optimization.py Co-authored-by: Leandro Braga <[email protected]> --------- Co-authored-by: YoungJae Bae <[email protected]> Co-authored-by: Leandro Braga <[email protected]>
* Improve acq_max seeding of L-BFGS-B optimization (bayesian-optimization#297) --------- Co-authored-by: ptapping <[email protected]>
* Fixes issue-436: Constrained optimization does not allow duplicate points (bayesian-optimization#437) * Update docs of `bayesian_optimization.py` and `observer.py`. * Fix minor style issue in module docstring * Update docs of `__init__.py` and `events.py`. * Fix minor style issue in class docstring * Add workflow to check docstrings * Update bayes_opt/bayesian_optimization.py Co-authored-by: Leandro Braga <[email protected]> * Improve acq_max seeding of L-BFGS-B optimization (bayesian-optimization#297) * bounds_transformer could bypass global_bounds due to the test logic within _trim function in domain_reduction.py (bayesian-optimization#441) * Update trim bounds in domain_reduction.py Previously, when the new upper limit was less than the original lower limit, the new_bounds could bypass the global_bounds. * Update test_seq_domain_red.py Added test cases to catch an error when both bounds of new_bounds exceeded the global_bounds * Update domain_reduction.py _trim function now avoids an error when both bounds for a given parameter in new_bounds exceed the global_bounds * Update domain_reduction.py comments * fixed English in domain_reduction.py * use numpy to sort bounds, boundary exceeded warn. * simple sort test added * domain_red windows target_space to global_bounds Added windowing function to improve the convergence of optimizers that use domain_reduction. Improved comments and documentation. * target_space.max respects bounds; SDRT warnings * Remove unused function. This function was used to prototype a solution. It should not have been pushed and can be removed. * Updated target_space.py docstrings * Update tests/test_target_space.py Co-authored-by: till-m <[email protected]> * Added pbound warnings, updated various tests. * updated line spacing for consistency and style * added pbound test condition --------- Co-authored-by: till-m <[email protected]> * DomainReduction docs, docstyle * Add missing doc dependency --------- Co-authored-by: YoungJae Bae <[email protected]> Co-authored-by: Leandro Braga <[email protected]> Co-authored-by: ptapping <[email protected]> Co-authored-by: Edgar <[email protected]>
It looks like something was messed up in all the merges. I will close this PR for now and have a look when I'm back from* vacation. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #457 +/- ##
==========================================
+ Coverage 98.47% 98.70% +0.22%
==========================================
Files 8 8
Lines 590 540 -50
Branches 90 90
==========================================
- Hits 581 533 -48
Misses 3 3
+ Partials 6 4 -2 ☔ View full report in Codecov by Sentry. |
d666e93
to
8ffdb4f
Compare
looking back now, I think making a big PR on a seperate branch was not a great idea... Some of the docstring rules imposed by the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So far everything I've seen looks good. I took the closest look at domain reduction and target space changes.
@till-m please re-request my review. My previous approval of all commits was in error. |
Nice work @till-m
|
Hey @bwheelz36,
completely understandable. If possible, could you review the changes to the README?
I think we don't actually need this to check for convention. I will remove it.
It will detect missing docstrings as-is
I didn't realize, but missing parameters needs to be explicitly enabled. I will enable it. Note that this does not detect missing docstrings of class documentation, or missing parameters in class documentation. This is due to the way
You can additionally ignore errors by passing |
I took a second look at revisions in domain reduction, target space files, and several other Within the files I checked, the suggestions I made were all rather small and generally things look good. Great work on this. |
Co-authored-by: Edgar <[email protected]>
@till-m - ruff looks really cool. I'm keen to try it out in some projects - but agree right now is not the time or place for this one :-) |
From my side, this PR is mostly good to go, except for a review of the README changes. Does anyone else have any other hold-ups? |
@@ -1,16 +1,18 @@ | |||
<div align="center"> | |||
<img src="https://github.com/fmfn/BayesianOptimization/blob/master/examples/func.png"><br><br> | |||
<img src="https://raw.githubusercontent.com/bayesian-optimization/BayesianOptimization/master/static/func.png"><br><br> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if I look at your branch, it appears this image is missing now? can you double check this link still works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should work after the PR is merged. This link (when pointing to my repo/branch) works: https://raw.githubusercontent.com/till-m/BayesianOptimization/docstring-overhaul/static/func.png
Just took a look at readme - made a few minor suggestions, but looks great to me! |
If someone would still like to have a look, please let me know. Otherwise I will merge this early next week. |
Thanks everyone for the help! Glad to see this is done -- even if it isn't perfect right now, we can work to make it better in the future! :) @bwheelz36 looks like the image renders correctly: link |
Resolves #427 #434
numpydoc
examples/
tostatic/