|
2 | 2 | "cells": [ |
3 | 3 | { |
4 | 4 | "cell_type": "markdown", |
5 | | - "id": "designed-spoke", |
| 5 | + "id": "characteristic-renaissance", |
6 | 6 | "metadata": {}, |
7 | 7 | "source": [ |
8 | 8 | "# FairWorkflows execution demo" |
9 | 9 | ] |
10 | 10 | }, |
11 | 11 | { |
12 | 12 | "cell_type": "markdown", |
13 | | - "id": "secure-render", |
| 13 | + "id": "auburn-korea", |
14 | 14 | "metadata": {}, |
15 | 15 | "source": [ |
16 | 16 | "## Define the steps of your workflow\n", |
|
19 | 19 | }, |
20 | 20 | { |
21 | 21 | "cell_type": "code", |
22 | | - "execution_count": 9, |
23 | | - "id": "spiritual-order", |
| 22 | + "execution_count": 1, |
| 23 | + "id": "natural-hunger", |
24 | 24 | "metadata": {}, |
25 | 25 | "outputs": [], |
26 | 26 | "source": [ |
|
29 | 29 | }, |
30 | 30 | { |
31 | 31 | "cell_type": "code", |
32 | | - "execution_count": 10, |
33 | | - "id": "wired-bibliography", |
| 32 | + "execution_count": 2, |
| 33 | + "id": "rational-retro", |
34 | 34 | "metadata": {}, |
35 | 35 | "outputs": [], |
36 | 36 | "source": [ |
|
42 | 42 | }, |
43 | 43 | { |
44 | 44 | "cell_type": "code", |
45 | | - "execution_count": 11, |
46 | | - "id": "brilliant-thumb", |
| 45 | + "execution_count": 3, |
| 46 | + "id": "forward-fundamentals", |
47 | 47 | "metadata": {}, |
48 | 48 | "outputs": [], |
49 | 49 | "source": [ |
|
55 | 55 | }, |
56 | 56 | { |
57 | 57 | "cell_type": "code", |
58 | | - "execution_count": 12, |
59 | | - "id": "interested-margin", |
| 58 | + "execution_count": 4, |
| 59 | + "id": "ahead-devices", |
60 | 60 | "metadata": {}, |
61 | 61 | "outputs": [], |
62 | 62 | "source": [ |
|
68 | 68 | }, |
69 | 69 | { |
70 | 70 | "cell_type": "code", |
71 | | - "execution_count": 13, |
72 | | - "id": "closing-vatican", |
| 71 | + "execution_count": 5, |
| 72 | + "id": "metric-referral", |
73 | 73 | "metadata": {}, |
74 | 74 | "outputs": [], |
75 | 75 | "source": [ |
|
82 | 82 | }, |
83 | 83 | { |
84 | 84 | "cell_type": "markdown", |
85 | | - "id": "centered-nowhere", |
| 85 | + "id": "european-viking", |
86 | 86 | "metadata": {}, |
87 | 87 | "source": [ |
88 | 88 | "## Define your workflow using @fairworkflow\n", |
|
91 | 91 | }, |
92 | 92 | { |
93 | 93 | "cell_type": "code", |
94 | | - "execution_count": 14, |
95 | | - "id": "paperback-recycling", |
| 94 | + "execution_count": 6, |
| 95 | + "id": "atmospheric-granny", |
96 | 96 | "metadata": {}, |
97 | 97 | "outputs": [], |
98 | 98 | "source": [ |
|
109 | 109 | }, |
110 | 110 | { |
111 | 111 | "cell_type": "markdown", |
112 | | - "id": "sustained-sweden", |
| 112 | + "id": "intimate-correction", |
113 | 113 | "metadata": {}, |
114 | 114 | "source": [ |
115 | 115 | "## Create an instance of your workflow and display it" |
116 | 116 | ] |
117 | 117 | }, |
118 | 118 | { |
119 | 119 | "cell_type": "code", |
120 | | - "execution_count": 15, |
121 | | - "id": "noted-aviation", |
| 120 | + "execution_count": 7, |
| 121 | + "id": "hazardous-nancy", |
122 | 122 | "metadata": {}, |
123 | 123 | "outputs": [ |
124 | 124 | { |
|
127 | 127 | "fairworkflows.fairworkflow.FairWorkflow" |
128 | 128 | ] |
129 | 129 | }, |
130 | | - "execution_count": 15, |
| 130 | + "execution_count": 7, |
131 | 131 | "metadata": {}, |
132 | 132 | "output_type": "execute_result" |
133 | 133 | } |
|
139 | 139 | }, |
140 | 140 | { |
141 | 141 | "cell_type": "code", |
142 | | - "execution_count": 16, |
143 | | - "id": "confirmed-hudson", |
| 142 | + "execution_count": 8, |
| 143 | + "id": "under-costa", |
144 | 144 | "metadata": {}, |
145 | 145 | "outputs": [ |
146 | 146 | { |
|
164 | 164 | }, |
165 | 165 | { |
166 | 166 | "cell_type": "markdown", |
167 | | - "id": "outside-glance", |
| 167 | + "id": "informal-cosmetic", |
168 | 168 | "metadata": {}, |
169 | 169 | "source": [ |
170 | 170 | "## Execute your workflow using .execute()\n", |
171 | | - "Set num_threads greater than 1 if you wish to exploit parallelisation in your workflow." |
| 171 | + "Set num_threads greater than 1 if you wish to exploit parallelisation in your workflow. A separate RetroProv object is also returned that can (optionally) be published as a nanopublication. This is not yet implemented, pending one of the RDF tasks set out in the planning document." |
172 | 172 | ] |
173 | 173 | }, |
174 | 174 | { |
175 | 175 | "cell_type": "code", |
176 | | - "execution_count": 13, |
177 | | - "id": "front-abuse", |
| 176 | + "execution_count": 14, |
| 177 | + "id": "baking-perspective", |
178 | 178 | "metadata": {}, |
179 | 179 | "outputs": [ |
180 | 180 | { |
|
183 | 183 | "-66" |
184 | 184 | ] |
185 | 185 | }, |
186 | | - "execution_count": 13, |
| 186 | + "execution_count": 14, |
187 | 187 | "metadata": {}, |
188 | 188 | "output_type": "execute_result" |
189 | 189 | } |
190 | 190 | ], |
191 | 191 | "source": [ |
192 | | - "answer = fw.execute(num_threads=2)\n", |
193 | | - "answer" |
194 | | - ] |
195 | | - }, |
196 | | - { |
197 | | - "cell_type": "markdown", |
198 | | - "id": "compound-shepherd", |
199 | | - "metadata": {}, |
200 | | - "source": [ |
201 | | - "## Get retrospective provenance of run\n", |
202 | | - "This is not in RDF format yet, but we have all the information needed." |
203 | | - ] |
204 | | - }, |
205 | | - { |
206 | | - "cell_type": "code", |
207 | | - "execution_count": 12, |
208 | | - "id": "comprehensive-finland", |
209 | | - "metadata": {}, |
210 | | - "outputs": [ |
211 | | - { |
212 | | - "ename": "AttributeError", |
213 | | - "evalue": "'FairWorkflow' object has no attribute 'prov'", |
214 | | - "output_type": "error", |
215 | | - "traceback": [ |
216 | | - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", |
217 | | - "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", |
218 | | - "\u001b[0;32m<ipython-input-12-fa58d0e49b7b>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mfw\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mprov\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", |
219 | | - "\u001b[0;31mAttributeError\u001b[0m: 'FairWorkflow' object has no attribute 'prov'" |
220 | | - ] |
221 | | - } |
222 | | - ], |
223 | | - "source": [ |
224 | | - "fw.prov()" |
| 192 | + "result, prov = fw.execute(num_threads=2)\n", |
| 193 | + "result" |
225 | 194 | ] |
226 | 195 | }, |
227 | 196 | { |
228 | 197 | "cell_type": "markdown", |
229 | | - "id": "precious-domain", |
| 198 | + "id": "attached-spirit", |
230 | 199 | "metadata": {}, |
231 | 200 | "source": [ |
232 | 201 | "## Get Plex RDF of workflow" |
|
235 | 204 | { |
236 | 205 | "cell_type": "code", |
237 | 206 | "execution_count": null, |
238 | | - "id": "concerned-massage", |
| 207 | + "id": "fifteen-floating", |
239 | 208 | "metadata": {}, |
240 | 209 | "outputs": [], |
241 | 210 | "source": [ |
|
244 | 213 | }, |
245 | 214 | { |
246 | 215 | "cell_type": "raw", |
247 | | - "id": "continent-editing", |
| 216 | + "id": "cooked-ridge", |
248 | 217 | "metadata": {}, |
249 | 218 | "source": [] |
250 | 219 | }, |
251 | 220 | { |
252 | 221 | "cell_type": "code", |
253 | 222 | "execution_count": null, |
254 | | - "id": "capital-minority", |
| 223 | + "id": "governing-gauge", |
255 | 224 | "metadata": {}, |
256 | 225 | "outputs": [], |
257 | 226 | "source": [] |
258 | 227 | }, |
259 | 228 | { |
260 | 229 | "cell_type": "code", |
261 | 230 | "execution_count": null, |
262 | | - "id": "smoking-lebanon", |
| 231 | + "id": "ultimate-setup", |
263 | 232 | "metadata": {}, |
264 | 233 | "outputs": [], |
265 | 234 | "source": [] |
266 | 235 | }, |
267 | 236 | { |
268 | 237 | "cell_type": "code", |
269 | 238 | "execution_count": null, |
270 | | - "id": "controversial-control", |
| 239 | + "id": "distant-distance", |
271 | 240 | "metadata": {}, |
272 | 241 | "outputs": [], |
273 | 242 | "source": [] |
274 | 243 | }, |
275 | 244 | { |
276 | 245 | "cell_type": "code", |
277 | 246 | "execution_count": null, |
278 | | - "id": "alternate-template", |
| 247 | + "id": "opening-duration", |
279 | 248 | "metadata": {}, |
280 | 249 | "outputs": [], |
281 | 250 | "source": [] |
282 | 251 | }, |
283 | 252 | { |
284 | 253 | "cell_type": "code", |
285 | 254 | "execution_count": null, |
286 | | - "id": "ecological-divorce", |
| 255 | + "id": "constitutional-stand", |
287 | 256 | "metadata": {}, |
288 | 257 | "outputs": [], |
289 | 258 | "source": [] |
290 | 259 | }, |
291 | 260 | { |
292 | 261 | "cell_type": "code", |
293 | 262 | "execution_count": null, |
294 | | - "id": "liberal-queen", |
| 263 | + "id": "celtic-cookbook", |
295 | 264 | "metadata": {}, |
296 | 265 | "outputs": [], |
297 | 266 | "source": [] |
298 | 267 | }, |
299 | 268 | { |
300 | 269 | "cell_type": "code", |
301 | 270 | "execution_count": null, |
302 | | - "id": "specific-humanitarian", |
| 271 | + "id": "phantom-cowboy", |
303 | 272 | "metadata": {}, |
304 | 273 | "outputs": [], |
305 | 274 | "source": [] |
306 | 275 | }, |
307 | 276 | { |
308 | 277 | "cell_type": "code", |
309 | 278 | "execution_count": null, |
310 | | - "id": "thick-budapest", |
| 279 | + "id": "controlled-premium", |
311 | 280 | "metadata": {}, |
312 | 281 | "outputs": [], |
313 | 282 | "source": [] |
314 | 283 | }, |
315 | 284 | { |
316 | 285 | "cell_type": "code", |
317 | 286 | "execution_count": null, |
318 | | - "id": "italic-color", |
| 287 | + "id": "artistic-quantity", |
319 | 288 | "metadata": {}, |
320 | 289 | "outputs": [], |
321 | 290 | "source": [] |
322 | 291 | }, |
323 | 292 | { |
324 | 293 | "cell_type": "code", |
325 | 294 | "execution_count": null, |
326 | | - "id": "respiratory-netscape", |
| 295 | + "id": "magnetic-lesbian", |
327 | 296 | "metadata": {}, |
328 | 297 | "outputs": [], |
329 | 298 | "source": [] |
330 | 299 | }, |
331 | 300 | { |
332 | 301 | "cell_type": "code", |
333 | 302 | "execution_count": null, |
334 | | - "id": "marked-shark", |
| 303 | + "id": "alpine-ethnic", |
335 | 304 | "metadata": {}, |
336 | 305 | "outputs": [], |
337 | 306 | "source": [] |
338 | 307 | }, |
339 | 308 | { |
340 | 309 | "cell_type": "code", |
341 | 310 | "execution_count": null, |
342 | | - "id": "material-robertson", |
| 311 | + "id": "indoor-dating", |
343 | 312 | "metadata": {}, |
344 | 313 | "outputs": [], |
345 | 314 | "source": [] |
|
0 commit comments