Skip to content

Commit 5cf851a

Browse files
committed
first draft working and added action
1 parent f2c8ca9 commit 5cf851a

File tree

4 files changed

+80
-5
lines changed

4 files changed

+80
-5
lines changed

.github/workflows/build_docs.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: build docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-20.04
12+
permissions:
13+
contents: write
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
steps:
17+
- uses: actions/checkout@v3
18+
19+
- name: Setup Python
20+
uses: actions/setup-python@v3
21+
with:
22+
python-version: '3.10'
23+
- name: Install pandoc
24+
run: sudo apt-get install -y pandoc
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install sphinx
29+
pip install nbsphinx
30+
pip install sphinx_rtd_theme
31+
- name: Install package
32+
run: |
33+
pip install -e .
34+
- name: build sphinx docs
35+
run: |
36+
cd docsrc
37+
make github
38+
# - name: Deploy
39+
# uses: peaceiris/actions-gh-pages@v3
40+
# if: ${{ github.ref == 'refs/heads/main' }}
41+
# with:
42+
# github_token: ${{ secrets.GITHUB_TOKEN }}
43+
# publish_dir: ./docs

docsrc/code_docs.rst

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Code Documentation
2+
==================
3+
4+
This page shows the documentation generated by sphinx automatically scanning our source code
5+
6+
Bayesian Optimization
7+
---------------------
8+
9+
.. automodule:: bayes_opt.bayesian_optimization
10+
:members:
11+
12+
Acquisition function
13+
--------------------
14+
15+
.. autoclass:: bayes_opt.util.UtilityFunction
16+
:members:
17+
18+
Target Space
19+
------------
20+
21+
.. autoclass:: bayes_opt.target_space.TargetSpace
22+
:members:
23+
24+
Domain reduction
25+
----------------
26+
27+
.. autoclass:: bayes_opt.domain_reduction.SequentialDomainReductionTransformer
28+
:members:
29+
30+
Constraints
31+
-----------
32+
33+
.. autoclass:: bayes_opt.constraint.ConstraintModel
34+
:members:

docsrc/constraints.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"2. Expensive constraints - in other situations, you may not know whether or not a given solution violates your constraints until you have explicitly evaluate the objective function there - which is typically an expensive operation. In such situations, it is desirable to **learn** the constrained regions on the fly in order to avoid unnecessary expensive calls to the objective function. The way to handle these situations is described in **2. Advanced Constrained Optimization**\n",
1515
"\n",
1616
"\n",
17-
"# 1. Simple Constrained Optimization\n",
17+
"## 1. Simple Constrained Optimization\n",
1818
"\n",
1919
"In situations where you know in advance whether or not a given point violates your constraints, you can normally simply code them directly into the objective function. To demonstrate this, let's start with a standard non-constrained optimization:"
2020
]
@@ -161,7 +161,7 @@
161161
"cell_type": "markdown",
162162
"metadata": {},
163163
"source": [
164-
"# 2. Advanced Constrained Optimization"
164+
"## 2. Advanced Constrained Optimization"
165165
]
166166
},
167167
{

docsrc/examples.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,4 @@ Examples
1010
/exploitation_vs_exploration
1111
/visualization
1212
/constraints
13-
/domain_reduction
14-
/Spot
15-
/steering_dispersion
13+
/domain_reduction

0 commit comments

Comments
 (0)