Skip to content

Commit d1140f1

Browse files
committed
update examples and docs
1 parent 3fec16b commit d1140f1

20 files changed

+330
-799
lines changed

docs/_sources/guide.rst.txt

+16-62
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Comprehensive Guide
33
=======================================
44

55

6-
This is a comprehensive guide detailing the arguments which OptTask accepts, and, since OptTask is defined by its arguments, general usage tips.
7-
This is best used as a reference guide after looking through the examples and tutorials.
6+
Outside of the tutorial, all of rocketsled's configuration (which OptTask reads) can be done through the MissionControl class.
7+
The following documentation details all the possible arguments to MissionControl.configure(...), which controls the execution and optimization parameters OptTask uses.
88

99

1010
=======================================
@@ -15,7 +15,7 @@ Required Arguments
1515
:code:`wf_creator`
1616
--------------
1717

18-
This is a string which defines the function returning your optimization loop workflow. The function represented by this string must
18+
This is a function object which takes in an input vector x and returns your optimization loop workflow. The function must
1919

2020
1. Accept x
2121
2. Return a Fireworks workflow based on x (i.e., x sets some parameters in the workflow)
@@ -24,6 +24,17 @@ This is a string which defines the function returning your optimization loop wor
2424

2525
The workflow that is returned should have OptTask contained somewhere in it. Since OptTask is in the workflow, this is somewhat recursive.
2626

27+
You can also pass in full string path of the wf_creator function.
28+
29+
**Example**
30+
31+
.. code-block:: python
32+
33+
wf_creator=my_wf_creator_fun_object
34+
35+
36+
Alternatively, define it with a string.
37+
2738
**Example**
2839

2940
.. code-block:: python
@@ -82,61 +93,10 @@ Database Setup
8293
______________
8394

8495

85-
When setting up the database, one MongoDB collection is needed to store optimization data. We recommend using the database
86-
you use for your production FireWorks workflows, using a collection name not already used by Fireworks. By default, the collection
87-
name will be opt_default.
88-
89-
There are 3 main ways to specify where to store optimization data:
90-
91-
1. Use :code:`host`, :code:`port`, and :code:`name`
92-
2. Use :code:`lpad`
93-
3. Let launchapd auto_load, if applicable.
94-
95-
96-
:code:`host`
97-
--------------
98-
99-
The host of the MongoDB instance you are going to store optimization data in. port and name must also be specified if this is specified.
100-
101-
**Examples**
102-
103-
.. code-block:: python
104-
105-
# host should be a string
106-
host='localhost'
107-
108-
# remote
109-
host='my_webserver.com'
110-
96+
To set up the databsae
11197

112-
:code:`port`
113-
--------------
114-
115-
The port of the MongodDB instance you are going to store optimization data in. host and name must also be specified if this is specified.
116-
117-
**Examples**
118-
119-
.. code-block:: python
12098

121-
# Port should be an integer
122-
port=27017
123-
124-
125-
:code:`name`
126-
--------------
127-
128-
The name of the MongoDB database you are going to store optimization data in. port and host must also be specified.
129-
130-
**Examples**
131-
132-
.. code-block:: python
133-
134-
# name should be a string
135-
name = "my_db"
136-
137-
138-
139-
:code:`lpad`
99+
:code:`launchpad`
140100
--------------
141101

142102
A FireWorks launchpad object. Used in lieu of host, port, and name.
@@ -688,9 +648,3 @@ your problem is most likely with the timeout setting.
688648
689649
690650
691-
=======================================
692-
Auto configure
693-
=======================================
694-
695-
If you just have an expensive python function you'd like to put in a workflow, and not a complex workflow itself, don't forget auto_setup!
696-
See the :doc:`quickstart </quickstart>` for more information on auto_setup.

docs/_sources/index.rst.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -217,14 +217,14 @@ Tutorials
217217
In the quickstart, we show how to use rocketsled's ``auto_setup`` to get
218218
up and running quickly, starting only with an objective function written in Python.
219219

220-
**Time to complete**: 5 min
220+
**Time to complete**: 30 min
221221

222222

223223
:doc:`A Comprehensive Guide to rocketsled </guide>`
224224
---------------------------------------
225225

226226
Find a comprehensive guide to using rocketsled at the link below. The guide
227-
exhaustively documents the possible arguments to ``OptTask`` and provides at least
227+
exhaustively documents the possible arguments to ``MissionControl`` and provides at least
228228
one example of each. If working through the tutorials did not answer your
229229
question, you'll most likely find your answer here.
230230

docs/_sources/rocketsled.examples.rst.txt

-48
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,6 @@ rocketsled.examples.basic module
1212
:undoc-members:
1313
:show-inheritance:
1414

15-
rocketsled.examples.batch module
16-
--------------------------------
17-
18-
.. automodule:: rocketsled.examples.batch
19-
:members:
20-
:undoc-members:
21-
:show-inheritance:
22-
23-
rocketsled.examples.categorical module
24-
--------------------------------------
25-
26-
.. automodule:: rocketsled.examples.categorical
27-
:members:
28-
:undoc-members:
29-
:show-inheritance:
30-
3115
rocketsled.examples.complex module
3216
----------------------------------
3317

@@ -36,38 +20,6 @@ rocketsled.examples.complex module
3620
:undoc-members:
3721
:show-inheritance:
3822

39-
rocketsled.examples.extras module
40-
---------------------------------
41-
42-
.. automodule:: rocketsled.examples.extras
43-
:members:
44-
:undoc-members:
45-
:show-inheritance:
46-
47-
rocketsled.examples.multi module
48-
--------------------------------
49-
50-
.. automodule:: rocketsled.examples.multi
51-
:members:
52-
:undoc-members:
53-
:show-inheritance:
54-
55-
rocketsled.examples.parallel module
56-
-----------------------------------
57-
58-
.. automodule:: rocketsled.examples.parallel
59-
:members:
60-
:undoc-members:
61-
:show-inheritance:
62-
63-
rocketsled.examples.tasks module
64-
--------------------------------
65-
66-
.. automodule:: rocketsled.examples.tasks
67-
:members:
68-
:undoc-members:
69-
:show-inheritance:
70-
7123

7224
Module contents
7325
---------------

docs/genindex.html

+16-54
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ <h2 id="C">C</h2>
104104
<td style="width: 33%; vertical-align: top;"><ul>
105105
<li><a href="rocketsled.html#rocketsled.utils.check_dims">check_dims() (in module rocketsled.utils)</a>
106106
</li>
107-
<li><a href="rocketsled.examples.html#rocketsled.examples.tasks.ComplexMultiObjTask">ComplexMultiObjTask (class in rocketsled.examples.tasks)</a>
107+
<li><a href="rocketsled.examples.html#rocketsled.examples.complex.ComplexMultiObjTask">ComplexMultiObjTask (class in rocketsled.examples.complex)</a>
108108
</li>
109109
<li><a href="rocketsled.html#rocketsled.control.MissionControl.configure">configure() (rocketsled.control.MissionControl method)</a>
110110
</li>
@@ -140,8 +140,6 @@ <h2 id="E">E</h2>
140140
</li>
141141
</ul></td>
142142
<td style="width: 33%; vertical-align: top;"><ul>
143-
<li><a href="rocketsled.examples.html#rocketsled.examples.extras.example_predictor">example_predictor() (in module rocketsled.examples.extras)</a>
144-
</li>
145143
<li><a href="rocketsled.html#rocketsled.utils.ExhaustedSpaceError">ExhaustedSpaceError</a>
146144
</li>
147145
</ul></td>
@@ -152,13 +150,11 @@ <h2 id="G">G</h2>
152150
<td style="width: 33%; vertical-align: top;"><ul>
153151
<li><a href="rocketsled.html#rocketsled.utils.get_default_opttask_kwargs">get_default_opttask_kwargs() (in module rocketsled.utils)</a>
154152
</li>
155-
<li><a href="rocketsled.examples.html#rocketsled.examples.categorical.get_z">get_z() (in module rocketsled.examples.categorical)</a>
153+
</ul></td>
154+
<td style="width: 33%; vertical-align: top;"><ul>
155+
<li><a href="rocketsled.examples.html#rocketsled.examples.complex.get_z">get_z() (in module rocketsled.examples.complex)</a>
156156

157157
<ul>
158-
<li><a href="rocketsled.examples.html#rocketsled.examples.complex.get_z">(in module rocketsled.examples.complex)</a>
159-
</li>
160-
<li><a href="rocketsled.examples.html#rocketsled.examples.extras.get_z">(in module rocketsled.examples.extras)</a>
161-
</li>
162158
<li><a href="rocketsled.tests.html#rocketsled.tests.test_task.get_z">(in module rocketsled.tests.test_task)</a>
163159
</li>
164160
</ul></li>
@@ -185,8 +181,6 @@ <h2 id="L">L</h2>
185181
</ul></td>
186182
<td style="width: 33%; vertical-align: top;"><ul>
187183
<li><a href="rocketsled.html#rocketsled.acq.lcb">lcb() (in module rocketsled.acq)</a>
188-
</li>
189-
<li><a href="rocketsled.examples.html#rocketsled.examples.parallel.load_parallel_wfs">load_parallel_wfs() (in module rocketsled.examples.parallel)</a>
190184
</li>
191185
</ul></td>
192186
</tr></table>
@@ -195,15 +189,9 @@ <h2 id="M">M</h2>
195189
<table style="width: 100%" class="indextable genindextable"><tr>
196190
<td style="width: 33%; vertical-align: top;"><ul>
197191
<li><a href="rocketsled.html#rocketsled.control.MissionControl">MissionControl (class in rocketsled.control)</a>
198-
</li>
199-
<li><a href="rocketsled.examples.html#rocketsled.examples.tasks.MixedCalculateTask">MixedCalculateTask (class in rocketsled.examples.tasks)</a>
200192
</li>
201193
</ul></td>
202194
<td style="width: 33%; vertical-align: top;"><ul>
203-
<li><a href="rocketsled.examples.html#rocketsled.examples.tasks.MultiObjTask2">MultiObjTask2 (class in rocketsled.examples.tasks)</a>
204-
</li>
205-
<li><a href="rocketsled.examples.html#rocketsled.examples.tasks.MultiObjTask6">MultiObjTask6 (class in rocketsled.examples.tasks)</a>
206-
</li>
207195
<li><a href="rocketsled.tests.html#rocketsled.tests.test_task.MultiTestTask">MultiTestTask (class in rocketsled.tests.test_task)</a>
208196
</li>
209197
</ul></td>
@@ -221,6 +209,8 @@ <h2 id="O">O</h2>
221209
<table style="width: 100%" class="indextable genindextable"><tr>
222210
<td style="width: 33%; vertical-align: top;"><ul>
223211
<li><a href="rocketsled.tests.html#rocketsled.tests.deserialize_func.obj_func">obj_func() (in module rocketsled.tests.deserialize_func)</a>
212+
</li>
213+
<li><a href="rocketsled.examples.html#rocketsled.examples.basic.ObjectiveFuncTask">ObjectiveFuncTask (class in rocketsled.examples.basic)</a>
224214
</li>
225215
</ul></td>
226216
<td style="width: 33%; vertical-align: top;"><ul>
@@ -267,27 +257,15 @@ <h2 id="R">R</h2>
267257
<li><a href="rocketsled.examples.html#module-rocketsled.examples">rocketsled.examples (module)</a>
268258
</li>
269259
<li><a href="rocketsled.examples.html#module-rocketsled.examples.basic">rocketsled.examples.basic (module)</a>
270-
</li>
271-
<li><a href="rocketsled.examples.html#module-rocketsled.examples.batch">rocketsled.examples.batch (module)</a>
272-
</li>
273-
<li><a href="rocketsled.examples.html#module-rocketsled.examples.categorical">rocketsled.examples.categorical (module)</a>
274260
</li>
275261
<li><a href="rocketsled.examples.html#module-rocketsled.examples.complex">rocketsled.examples.complex (module)</a>
276262
</li>
277-
<li><a href="rocketsled.examples.html#module-rocketsled.examples.extras">rocketsled.examples.extras (module)</a>
278-
</li>
279-
<li><a href="rocketsled.examples.html#module-rocketsled.examples.multi">rocketsled.examples.multi (module)</a>
280-
</li>
281-
<li><a href="rocketsled.examples.html#module-rocketsled.examples.parallel">rocketsled.examples.parallel (module)</a>
282-
</li>
283-
<li><a href="rocketsled.examples.html#module-rocketsled.examples.tasks">rocketsled.examples.tasks (module)</a>
284-
</li>
285-
</ul></td>
286-
<td style="width: 33%; vertical-align: top;"><ul>
287263
<li><a href="rocketsled.html#module-rocketsled.task">rocketsled.task (module)</a>
288264
</li>
289265
<li><a href="rocketsled.tests.html#module-rocketsled.tests">rocketsled.tests (module)</a>
290266
</li>
267+
</ul></td>
268+
<td style="width: 33%; vertical-align: top;"><ul>
291269
<li><a href="rocketsled.tests.html#module-rocketsled.tests.deserialize_func">rocketsled.tests.deserialize_func (module)</a>
292270
</li>
293271
<li><a href="rocketsled.tests.html#module-rocketsled.tests.test_task">rocketsled.tests.test_task (module)</a>
@@ -298,16 +276,10 @@ <h2 id="R">R</h2>
298276
</li>
299277
<li><a href="rocketsled.html#rocketsled.utils.RSBaseException">RSBaseException</a>
300278
</li>
301-
<li><a href="rocketsled.examples.html#rocketsled.examples.tasks.ComplexMultiObjTask.run_task">run_task() (rocketsled.examples.tasks.ComplexMultiObjTask method)</a>
279+
<li><a href="rocketsled.examples.html#rocketsled.examples.basic.ObjectiveFuncTask.run_task">run_task() (rocketsled.examples.basic.ObjectiveFuncTask method)</a>
302280

303281
<ul>
304-
<li><a href="rocketsled.examples.html#rocketsled.examples.tasks.MixedCalculateTask.run_task">(rocketsled.examples.tasks.MixedCalculateTask method)</a>
305-
</li>
306-
<li><a href="rocketsled.examples.html#rocketsled.examples.tasks.MultiObjTask2.run_task">(rocketsled.examples.tasks.MultiObjTask2 method)</a>
307-
</li>
308-
<li><a href="rocketsled.examples.html#rocketsled.examples.tasks.MultiObjTask6.run_task">(rocketsled.examples.tasks.MultiObjTask6 method)</a>
309-
</li>
310-
<li><a href="rocketsled.examples.html#rocketsled.examples.tasks.SumTask.run_task">(rocketsled.examples.tasks.SumTask method)</a>
282+
<li><a href="rocketsled.examples.html#rocketsled.examples.complex.ComplexMultiObjTask.run_task">(rocketsled.examples.complex.ComplexMultiObjTask method)</a>
311283
</li>
312284
<li><a href="rocketsled.html#rocketsled.task.OptTask.run_task">(rocketsled.task.OptTask method)</a>
313285
</li>
@@ -337,8 +309,6 @@ <h2 id="S">S</h2>
337309
<li><a href="rocketsled.tests.html#rocketsled.tests.test_task.suite">suite() (in module rocketsled.tests.test_task)</a>
338310
</li>
339311
<li><a href="rocketsled.html#rocketsled.control.MissionControl.summarize">summarize() (rocketsled.control.MissionControl method)</a>
340-
</li>
341-
<li><a href="rocketsled.examples.html#rocketsled.examples.tasks.SumTask">SumTask (class in rocketsled.examples.tasks)</a>
342312
</li>
343313
</ul></td>
344314
</tr></table>
@@ -351,6 +321,8 @@ <h2 id="T">T</h2>
351321
<li><a href="rocketsled.tests.html#rocketsled.tests.test_task.TestWorkflows.tearDown">tearDown() (rocketsled.tests.test_task.TestWorkflows method)</a>
352322
</li>
353323
<li><a href="rocketsled.tests.html#rocketsled.tests.test_task.TestWorkflows.test_accuracy">test_accuracy() (rocketsled.tests.test_task.TestWorkflows method)</a>
324+
</li>
325+
<li><a href="rocketsled.tests.html#rocketsled.tests.test_task.TestWorkflows.test_acqfuncs">test_acqfuncs() (rocketsled.tests.test_task.TestWorkflows method)</a>
354326
</li>
355327
<li><a href="rocketsled.tests.html#rocketsled.tests.test_task.TestWorkflows.test_basic">test_basic() (rocketsled.tests.test_task.TestWorkflows method)</a>
356328
</li>
@@ -369,11 +341,11 @@ <h2 id="T">T</h2>
369341
<li><a href="rocketsled.tests.html#rocketsled.tests.test_utils.TestUtilities.test_Dtypes">test_Dtypes() (rocketsled.tests.test_utils.TestUtilities method)</a>
370342
</li>
371343
<li><a href="rocketsled.tests.html#rocketsled.tests.test_task.TestWorkflows.test_duplicates">test_duplicates() (rocketsled.tests.test_task.TestWorkflows method)</a>
372-
</li>
373-
<li><a href="rocketsled.tests.html#rocketsled.tests.test_utils.TestUtilities.test_get_default_opttask_kwargs">test_get_default_opttask_kwargs() (rocketsled.tests.test_utils.TestUtilities method)</a>
374344
</li>
375345
</ul></td>
376346
<td style="width: 33%; vertical-align: top;"><ul>
347+
<li><a href="rocketsled.tests.html#rocketsled.tests.test_utils.TestUtilities.test_get_default_opttask_kwargs">test_get_default_opttask_kwargs() (rocketsled.tests.test_utils.TestUtilities method)</a>
348+
</li>
377349
<li><a href="rocketsled.tests.html#rocketsled.tests.test_task.TestWorkflows.test_get_z">test_get_z() (rocketsled.tests.test_task.TestWorkflows method)</a>
378350
</li>
379351
<li><a href="rocketsled.tests.html#rocketsled.tests.test_utils.TestUtilities.test_is_discrete">test_is_discrete() (rocketsled.tests.test_utils.TestUtilities method)</a>
@@ -409,23 +381,13 @@ <h2 id="W">W</h2>
409381
<li><a href="rocketsled.examples.html#rocketsled.examples.basic.wf_creator">wf_creator() (in module rocketsled.examples.basic)</a>
410382

411383
<ul>
412-
<li><a href="rocketsled.examples.html#rocketsled.examples.batch.wf_creator">(in module rocketsled.examples.batch)</a>
413-
</li>
414-
<li><a href="rocketsled.examples.html#rocketsled.examples.categorical.wf_creator">(in module rocketsled.examples.categorical)</a>
415-
</li>
416384
<li><a href="rocketsled.examples.html#rocketsled.examples.complex.wf_creator">(in module rocketsled.examples.complex)</a>
417-
</li>
418-
<li><a href="rocketsled.examples.html#rocketsled.examples.extras.wf_creator">(in module rocketsled.examples.extras)</a>
419-
</li>
420-
<li><a href="rocketsled.examples.html#rocketsled.examples.multi.wf_creator">(in module rocketsled.examples.multi)</a>
421-
</li>
422-
<li><a href="rocketsled.examples.html#rocketsled.examples.parallel.wf_creator">(in module rocketsled.examples.parallel)</a>
423385
</li>
424386
</ul></li>
425-
</ul></td>
426-
<td style="width: 33%; vertical-align: top;"><ul>
427387
<li><a href="rocketsled.tests.html#rocketsled.tests.test_task.wf_creator_accuracy">wf_creator_accuracy() (in module rocketsled.tests.test_task)</a>
428388
</li>
389+
</ul></td>
390+
<td style="width: 33%; vertical-align: top;"><ul>
429391
<li><a href="rocketsled.tests.html#rocketsled.tests.test_task.wf_creator_basic">wf_creator_basic() (in module rocketsled.tests.test_task)</a>
430392
</li>
431393
<li><a href="rocketsled.tests.html#rocketsled.tests.test_task.wf_creator_complex">wf_creator_complex() (in module rocketsled.tests.test_task)</a>

0 commit comments

Comments
 (0)