|
38 | 38 | "cell_type": "code",
|
39 | 39 | "source": "from jobflow import job, Flow",
|
40 | 40 | "metadata": {
|
41 |
| - "trusted": true |
| 41 | + "trusted": true, |
| 42 | + "ExecuteTime": { |
| 43 | + "end_time": "2025-04-24T10:30:16.328511Z", |
| 44 | + "start_time": "2025-04-24T10:30:16.309562Z" |
| 45 | + } |
42 | 46 | },
|
43 | 47 | "outputs": [
|
44 | 48 | {
|
45 |
| - "name": "stderr", |
46 |
| - "output_type": "stream", |
47 |
| - "text": "/srv/conda/envs/notebook/lib/python3.12/site-packages/paramiko/pkey.py:82: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0.\n \"cipher\": algorithms.TripleDES,\n/srv/conda/envs/notebook/lib/python3.12/site-packages/paramiko/transport.py:253: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0.\n \"class\": algorithms.TripleDES,\n" |
| 49 | + "ename": "ModuleNotFoundError", |
| 50 | + "evalue": "No module named 'jobflow'", |
| 51 | + "output_type": "error", |
| 52 | + "traceback": [ |
| 53 | + "\u001B[31m---------------------------------------------------------------------------\u001B[39m", |
| 54 | + "\u001B[31mModuleNotFoundError\u001B[39m Traceback (most recent call last)", |
| 55 | + "\u001B[36mCell\u001B[39m\u001B[36m \u001B[39m\u001B[32mIn[4]\u001B[39m\u001B[32m, line 1\u001B[39m\n\u001B[32m----> \u001B[39m\u001B[32m1\u001B[39m \u001B[38;5;28;01mfrom\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[34;01mjobflow\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;28;01mimport\u001B[39;00m job, Flow\n", |
| 56 | + "\u001B[31mModuleNotFoundError\u001B[39m: No module named 'jobflow'" |
| 57 | + ] |
48 | 58 | }
|
49 | 59 | ],
|
50 |
| - "execution_count": 1 |
| 60 | + "execution_count": 4 |
51 | 61 | },
|
52 | 62 | {
|
53 | 63 | "id": "06c2bd9e-b2ac-4b88-9158-fa37331c3418",
|
|
60 | 70 | "execution_count": 2
|
61 | 71 | },
|
62 | 72 | {
|
63 |
| - "metadata": {}, |
| 73 | + "metadata": { |
| 74 | + "ExecuteTime": { |
| 75 | + "end_time": "2025-04-24T10:30:04.618439Z", |
| 76 | + "start_time": "2025-04-24T10:30:04.598701Z" |
| 77 | + } |
| 78 | + }, |
64 | 79 | "cell_type": "code",
|
65 |
| - "outputs": [], |
66 |
| - "execution_count": null, |
67 | 80 | "source": [
|
68 | 81 | "from workflow import (\n",
|
69 | 82 | " get_sum as _get_sum,\n",
|
70 | 83 | " get_prod_and_div as _get_prod_and_div,\n",
|
71 | 84 | ")"
|
72 | 85 | ],
|
73 |
| - "id": "f9217ce7b093b5fc" |
| 86 | + "id": "f9217ce7b093b5fc", |
| 87 | + "outputs": [], |
| 88 | + "execution_count": 1 |
74 | 89 | },
|
75 | 90 | {
|
76 |
| - "metadata": {}, |
| 91 | + "metadata": { |
| 92 | + "ExecuteTime": { |
| 93 | + "end_time": "2025-04-24T10:30:04.751088Z", |
| 94 | + "start_time": "2025-04-24T10:30:04.748941Z" |
| 95 | + } |
| 96 | + }, |
77 | 97 | "cell_type": "code",
|
78 |
| - "outputs": [], |
79 |
| - "execution_count": null, |
80 | 98 | "source": "workflow_json_filename = \"jobflow_simple.json\"",
|
81 |
| - "id": "1feba0898ee4e361" |
| 99 | + "id": "1feba0898ee4e361", |
| 100 | + "outputs": [], |
| 101 | + "execution_count": 2 |
82 | 102 | },
|
83 | 103 | {
|
84 | 104 | "id": "07598344-0f75-433b-8902-bea21a42088c",
|
85 | 105 | "cell_type": "code",
|
86 |
| - "source": "get_sum = job(_get_sum)\nget_prod_and_div = job(_get_prod_and_div, data=[\"prod\", \"div\"])", |
| 106 | + "source": [ |
| 107 | + "get_sum = job(_get_sum)\n", |
| 108 | + "# Note: one could also transfer the outputs to the datastore as well: get_prod_and_div = job(_get_prod_and_div, data=[\"prod\", \"div\"])\n", |
| 109 | + "# On the way from the general definition to the jobflow definition, we do this automatically to avoid overflow databases.\n", |
| 110 | + "get_prod_and_div = job(_get_prod_and_div)" |
| 111 | + ], |
87 | 112 | "metadata": {
|
88 |
| - "trusted": true |
| 113 | + "trusted": true, |
| 114 | + "ExecuteTime": { |
| 115 | + "end_time": "2025-04-24T10:30:05.169761Z", |
| 116 | + "start_time": "2025-04-24T10:30:05.043635Z" |
| 117 | + } |
89 | 118 | },
|
90 |
| - "outputs": [], |
91 |
| - "execution_count": 5 |
| 119 | + "outputs": [ |
| 120 | + { |
| 121 | + "ename": "NameError", |
| 122 | + "evalue": "name 'job' is not defined", |
| 123 | + "output_type": "error", |
| 124 | + "traceback": [ |
| 125 | + "\u001B[31m---------------------------------------------------------------------------\u001B[39m", |
| 126 | + "\u001B[31mNameError\u001B[39m Traceback (most recent call last)", |
| 127 | + "\u001B[36mCell\u001B[39m\u001B[36m \u001B[39m\u001B[32mIn[3]\u001B[39m\u001B[32m, line 1\u001B[39m\n\u001B[32m----> \u001B[39m\u001B[32m1\u001B[39m get_sum = \u001B[43mjob\u001B[49m(_get_sum)\n\u001B[32m 2\u001B[39m get_prod_and_div = job(_get_prod_and_div, data=[\u001B[33m\"\u001B[39m\u001B[33mprod\u001B[39m\u001B[33m\"\u001B[39m, \u001B[33m\"\u001B[39m\u001B[33mdiv\u001B[39m\u001B[33m\"\u001B[39m])\n", |
| 128 | + "\u001B[31mNameError\u001B[39m: name 'job' is not defined" |
| 129 | + ] |
| 130 | + } |
| 131 | + ], |
| 132 | + "execution_count": 3 |
92 | 133 | },
|
93 | 134 | {
|
94 | 135 | "id": "ecef1ed5-a8d3-48c3-9e01-4a40e55c1153",
|
|
0 commit comments