Skip to content

Commit 606c97e

Browse files
committed
Adds a small tag for continuous and discrete optimizers
1 parent 2e8a136 commit 606c97e

File tree

13 files changed

+581
-126
lines changed

13 files changed

+581
-126
lines changed
Binary file not shown.
807 Bytes
Binary file not shown.
Binary file not shown.
Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": 1,
6+
"metadata": {},
7+
"outputs": [],
8+
"source": [
9+
"# No output: we don't have it installed.\n",
10+
"!pip freeze | grep dockstring"
11+
]
12+
},
13+
{
14+
"cell_type": "code",
15+
"execution_count": 2,
16+
"metadata": {},
17+
"outputs": [
18+
{
19+
"name": "stdout",
20+
"output_type": "stream",
21+
"text": [
22+
"poli 🧪: creating environment poli__dockstring from dockstring/environment.yml\n"
23+
]
24+
},
25+
{
26+
"name": "stdout",
27+
"output_type": "stream",
28+
"text": [
29+
"poli 🧪: creating environment poli__dockstring from dockstring/environment.yml\n",
30+
"poli 🧪: running registration of dockstring from environment poli__dockstring\n"
31+
]
32+
},
33+
{
34+
"name": "stderr",
35+
"output_type": "stream",
36+
"text": [
37+
"/Users/sjt972/Projects/poli/src/poli/core/registry.py:258: UserWarning: Environment poli__dockstring already exists. Will not create it.\n",
38+
" warnings.warn(f\"Environment {env_name} already exists. Will not create it.\")\n",
39+
"/Users/sjt972/Projects/poli/src/poli/core/registry.py:269: UserWarning: Running the following command: conda run -n poli__dockstring python /Users/sjt972/Projects/poli/src/poli/objective_repository/dockstring/register.py. \n",
40+
" warnings.warn(\"Running the following command: %s. \" % command)\n"
41+
]
42+
},
43+
{
44+
"name": "stdout",
45+
"output_type": "stream",
46+
"text": [
47+
"poli 🧪: creating an isolated black box function.\n",
48+
"poli 🧪: starting the isolated objective process.\n"
49+
]
50+
},
51+
{
52+
"name": "stderr",
53+
"output_type": "stream",
54+
"text": [
55+
"/Users/sjt972/anaconda3/envs/poli__dockstring/lib/python3.9/site-packages/dockstring/utils.py:77: DockstringWarning: Although Mac use is supported, docking scores on Mac do not always perfectly match scores from Linux. Therefore, extra care should be taken when comparing results to other platforms. In particular, the baselines in the DOCKSTRING paper were computed on Linux, so please do not directly compare your docking scores to the scores reported on the paper.\n",
56+
" warnings.warn(\n"
57+
]
58+
}
59+
],
60+
"source": [
61+
"from poli import create\n",
62+
"\n",
63+
"f, x0, y0 = create(\n",
64+
" name=\"dockstring\",\n",
65+
" target_name=\"drd2\" # The target protein.\n",
66+
")"
67+
]
68+
},
69+
{
70+
"cell_type": "code",
71+
"execution_count": 3,
72+
"metadata": {},
73+
"outputs": [
74+
{
75+
"name": "stdout",
76+
"output_type": "stream",
77+
"text": [
78+
"ExternalBlackBox(L=inf, num_evaluations=0)\n"
79+
]
80+
}
81+
],
82+
"source": [
83+
"print(f)"
84+
]
85+
},
86+
{
87+
"cell_type": "code",
88+
"execution_count": 4,
89+
"metadata": {},
90+
"outputs": [
91+
{
92+
"name": "stderr",
93+
"output_type": "stream",
94+
"text": [
95+
"/Users/sjt972/anaconda3/envs/poli__dockstring/lib/python3.9/site-packages/dockstring/utils.py:77: DockstringWarning: Although Mac use is supported, docking scores on Mac do not always perfectly match scores from Linux. Therefore, extra care should be taken when comparing results to other platforms. In particular, the baselines in the DOCKSTRING paper were computed on Linux, so please do not directly compare your docking scores to the scores reported on the paper.\n",
96+
" warnings.warn(\n"
97+
]
98+
},
99+
{
100+
"data": {
101+
"text/plain": [
102+
"array([[11.9]])"
103+
]
104+
},
105+
"execution_count": 4,
106+
"metadata": {},
107+
"output_type": "execute_result"
108+
}
109+
],
110+
"source": [
111+
"f(x0)"
112+
]
113+
},
114+
{
115+
"cell_type": "code",
116+
"execution_count": 5,
117+
"metadata": {},
118+
"outputs": [
119+
{
120+
"name": "stdout",
121+
"output_type": "stream",
122+
"text": [
123+
"ExternalBlackBox(L=inf, num_evaluations=1)\n"
124+
]
125+
}
126+
],
127+
"source": [
128+
"print(f)"
129+
]
130+
},
131+
{
132+
"cell_type": "code",
133+
"execution_count": 6,
134+
"metadata": {},
135+
"outputs": [
136+
{
137+
"name": "stdout",
138+
"output_type": "stream",
139+
"text": [
140+
"poli 🧪: Creating the objective from the repository.\n"
141+
]
142+
}
143+
],
144+
"source": [
145+
"f_logp, x0_logp, y0_logp = create(\n",
146+
" name=\"rdkit_logp\"\n",
147+
")"
148+
]
149+
},
150+
{
151+
"cell_type": "code",
152+
"execution_count": 7,
153+
"metadata": {},
154+
"outputs": [
155+
{
156+
"name": "stdout",
157+
"output_type": "stream",
158+
"text": [
159+
"LogPBlackBox(L=inf, num_evaluations=1)\n"
160+
]
161+
}
162+
],
163+
"source": [
164+
"print(f_logp)"
165+
]
166+
}
167+
],
168+
"metadata": {
169+
"kernelspec": {
170+
"display_name": "poli-docs",
171+
"language": "python",
172+
"name": "python3"
173+
},
174+
"language_info": {
175+
"codemirror_mode": {
176+
"name": "ipython",
177+
"version": 3
178+
},
179+
"file_extension": ".py",
180+
"mimetype": "text/x-python",
181+
"name": "python",
182+
"nbconvert_exporter": "python",
183+
"pygments_lexer": "ipython3",
184+
"version": "3.9.18"
185+
}
186+
},
187+
"nbformat": 4,
188+
"nbformat_minor": 2
189+
}
0 Bytes
Binary file not shown.

docs/poli-docs/_build/html/_sources/index.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ LaMBO Fluorescence (RFP) by stability and solvent-accessible surface area.
130130

131131
On top of `poli`, we provide `poli-baselines`, a collection of **black-box optimization algorithms** (focusing especially on *discrete* sequences). Examples include
132132

133+
## Discrete
134+
133135
::::{grid}
134136
:gutter: 3
135137

@@ -139,6 +141,13 @@ On top of `poli`, we provide `poli-baselines`, a collection of **black-box optim
139141
Optimizing a discrete sequence by performing random mutations
140142
:::
141143

144+
::::
145+
146+
## Continuous
147+
148+
::::{grid}
149+
:gutter: 3
150+
142151
:::{grid-item-card} CMA-ES
143152
:link: ./using_poli_baselines/cma_es.html
144153
:columns: 6

docs/poli-docs/_build/html/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,8 @@ <h2> Contents </h2>
547547
</ul>
548548
</li>
549549
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#black-box-optimization-algorithms">Black-box optimization algorithms</a></li>
550+
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#discrete">Discrete</a></li>
551+
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#continuous">Continuous</a></li>
550552
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#cite-us-and-other-relevant-work">Cite us and other relevant work</a></li>
551553
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#contribute-problems-or-solvers">Contribute problems or solvers</a></li>
552554
</ul>
@@ -724,6 +726,9 @@ <h3>Proteins<a class="headerlink" href="#proteins" title="Permalink to this head
724726
<section id="black-box-optimization-algorithms">
725727
<h2>Black-box optimization algorithms<a class="headerlink" href="#black-box-optimization-algorithms" title="Permalink to this heading">#</a></h2>
726728
<p>On top of <code class="docutils literal notranslate"><span class="pre">poli</span></code>, we provide <code class="docutils literal notranslate"><span class="pre">poli-baselines</span></code>, a collection of <strong>black-box optimization algorithms</strong> (focusing especially on <em>discrete</em> sequences). Examples include</p>
729+
</section>
730+
<section id="discrete">
731+
<h2>Discrete<a class="headerlink" href="#discrete" title="Permalink to this heading">#</a></h2>
727732
<div class="sd-container-fluid sd-sphinx-override sd-mb-4 docutils">
728733
<div class="sd-row sd-g-3 sd-g-xs-3 sd-g-sm-3 sd-g-md-3 sd-g-lg-3 docutils">
729734
<div class="sd-col sd-d-flex-row sd-col-6 sd-col-xs-6 sd-col-sm-6 sd-col-md-6 sd-col-lg-6 docutils">
@@ -735,6 +740,13 @@ <h2>Black-box optimization algorithms<a class="headerlink" href="#black-box-opti
735740
</div>
736741
<a class="sd-stretched-link reference external" href="./using_poli_baselines/random_mutations.html"></a></div>
737742
</div>
743+
</div>
744+
</div>
745+
</section>
746+
<section id="continuous">
747+
<h2>Continuous<a class="headerlink" href="#continuous" title="Permalink to this heading">#</a></h2>
748+
<div class="sd-container-fluid sd-sphinx-override sd-mb-4 docutils">
749+
<div class="sd-row sd-g-3 sd-g-xs-3 sd-g-sm-3 sd-g-md-3 sd-g-lg-3 docutils">
738750
<div class="sd-col sd-d-flex-row sd-col-6 sd-col-xs-6 sd-col-sm-6 sd-col-md-6 sd-col-lg-6 docutils">
739751
<div class="sd-card sd-sphinx-override sd-w-100 sd-shadow-sm sd-card-hover docutils">
740752
<div class="sd-card-body docutils">
@@ -936,6 +948,8 @@ <h2>Contribute problems or solvers<a class="headerlink" href="#contribute-proble
936948
</ul>
937949
</li>
938950
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#black-box-optimization-algorithms">Black-box optimization algorithms</a></li>
951+
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#discrete">Discrete</a></li>
952+
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#continuous">Continuous</a></li>
939953
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#cite-us-and-other-relevant-work">Cite us and other relevant work</a></li>
940954
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#contribute-problems-or-solvers">Contribute problems or solvers</a></li>
941955
</ul>

docs/poli-docs/_build/html/searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)