Skip to content

Commit f2c720e

Browse files
bwheelz36till-m
andauthored
Move static folder (#485)
* moving static folder into docsrc; fixes #467 * moving static folder into docsrc; fixes #467 * upating build docs job, and hacking together the movement of static.. * fix pyproject.toml file (duplicated dependency * use poetry env to build docs * Update build_docs.yml * Update docsrc/Makefile Co-authored-by: till-m <[email protected]> --------- Co-authored-by: till-m <[email protected]>
1 parent 4aa6a97 commit f2c720e

File tree

11 files changed

+21
-23
lines changed

11 files changed

+21
-23
lines changed

.github/workflows/build_docs.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,15 @@ jobs:
2222
python-version: '3.10'
2323
- name: Install pandoc
2424
run: sudo apt-get install -y pandoc
25-
- name: Install dependencies
25+
- name: Install Poetry
26+
uses: snok/install-poetry@v1
27+
- name: Install package and test dependencies
2628
run: |
27-
python -m pip install --upgrade pip
28-
pip install sphinx
29-
pip install nbsphinx
30-
pip install sphinx_rtd_theme
31-
pip install jupyter
32-
pip install myst-parser
33-
- name: Install package
34-
run: |
35-
pip install -e .
29+
poetry install --with dev,nbtools
3630
- name: build sphinx docs
3731
run: |
3832
cd docsrc
39-
make github
33+
poetry run make github
4034
- name: Deploy
4135
uses: peaceiris/actions-gh-pages@v3
4236
if: ${{ github.ref == 'refs/heads/master' }}

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ for ideas on how to implement bayesian optimization in a distributed fashion usi
5151

5252
Bayesian optimization works by constructing a posterior distribution of functions (gaussian process) that best describes the function you want to optimize. As the number of observations grows, the posterior distribution improves, and the algorithm becomes more certain of which regions in parameter space are worth exploring and which are not, as seen in the picture below.
5353

54-
![BayesianOptimization in action](./static/bo_example.png)
54+
![BayesianOptimization in action](docsrc/static/bo_example.png)
5555

5656
As you iterate over and over, the algorithm balances its needs of exploration and exploitation taking into account what it knows about the target function. At each step a Gaussian Process is fitted to the known samples (points previously explored), and the posterior distribution, combined with a exploration strategy (such as UCB (Upper Confidence Bound), or EI (Expected Improvement)), are used to determine the next point that should be explored (see the gif below).
5757

58-
![BayesianOptimization in action](./static/bayesian_optimization.gif)
58+
![BayesianOptimization in action](docsrc/static/bayesian_optimization.gif)
5959

6060
This process is designed to minimize the number of steps required to find a combination of parameters that are close to the optimal combination. To do so, this method uses a proxy optimization problem (finding the maximum of the acquisition function) that, albeit still a hard problem, is cheaper (in the computational sense) and common tools can be employed. Therefore Bayesian Optimization is most adequate for situations where sampling the function to be optimized is a very expensive endeavor. See the references for a proper discussion of this method.
6161

@@ -183,7 +183,7 @@ Sometimes the initial boundaries specified for a problem are too wide, and addin
183183

184184
When it's worthwhile to converge on an optimal point quickly rather than try to find the optimal point, contracting the domain around the current optimal value as the search progresses can speed up the search progress considerably. Using the `SequentialDomainReductionTransformer` the bounds of the problem can be panned and zoomed dynamically in an attempt to improve convergence.
185185

186-
![sequential domain reduction](./static/sdr.png)
186+
![sequential domain reduction](docsrc/static/sdr.png)
187187

188188
An example of using the `SequentialDomainReductionTransformer` is shown in the [domain reduction notebook](http://bayesian-optimization.github.io/BayesianOptimization/domain_reduction.html). More information about this method can be found in the paper ["On the robustness of a simple domain reduction scheme for simulation‐based optimization"](http://www.truegrid.com/srsm_revised.pdf).
189189

docsrc/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ BUILDDIR = ../docs
1515
.PHONY: help Makefile
1616

1717
github:
18-
@cp ../README.md .
19-
@cp -r ../static .
18+
# @cp ../README.md .
2019
@make html
2120
@cp -a ../docs/html/. ../docs
21+
@cp -r ../docsrc/ ../docs
2222

2323
# Catch-all target: route all unknown targets to Sphinx using the new
2424
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).

docsrc/quickstart.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
.. include:: README.md
1+
.. include:: ../README.md
22
:parser: myst_parser.sphinx_
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

examples/advanced-tour.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@
353353
"source": [
354354
"### 3.3 Changing kernels\n",
355355
"\n",
356-
"By default this package uses the Matern 2.5 kernel. Depending on your use case you may find that tunning the GP kernel could be beneficial. You're on your own here since these are very specific solutions to very specific problems."
356+
"By default this package uses the Matern 2.5 kernel. Depending on your use case you may find that tunning the GP kernel could be beneficial. You're on your own here since these are very specific solutions to very specific problems. You should start with the [scikit learn docs](https://scikit-learn.org/stable/modules/gaussian_process.html#kernels-for-gaussian-processes)"
357357
]
358358
},
359359
{
@@ -504,9 +504,9 @@
504504
"name": "python",
505505
"nbconvert_exporter": "python",
506506
"pygments_lexer": "ipython3",
507-
"version": "3.9.5"
507+
"version": "3.10.12"
508508
}
509509
},
510510
"nbformat": 4,
511-
"nbformat_minor": 2
511+
"nbformat_minor": 4
512512
}

examples/domain_reduction.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"\n",
1919
"**Zoom**: contract the region of interest.\n",
2020
"\n",
21-
"![](../static/sdr.png)\n",
21+
"![](../docsrc/static/sdr.png)\n",
2222
"\n",
2323
"\n",
2424
"## Parameters\n",
@@ -298,9 +298,9 @@
298298
"name": "python",
299299
"nbconvert_exporter": "python",
300300
"pygments_lexer": "ipython3",
301-
"version": "3.9.6"
301+
"version": "3.10.12"
302302
}
303303
},
304304
"nbformat": 4,
305-
"nbformat_minor": 2
305+
"nbformat_minor": 4
306306
}

0 commit comments

Comments
 (0)