|
2 | 2 | "cells": [ |
3 | 3 | { |
4 | 4 | "cell_type": "code", |
5 | | - "execution_count": 5, |
| 5 | + "execution_count": 1, |
6 | 6 | "metadata": {}, |
7 | | - "outputs": [], |
| 7 | + "outputs": [ |
| 8 | + { |
| 9 | + "name": "stderr", |
| 10 | + "output_type": "stream", |
| 11 | + "text": [ |
| 12 | + "/home/geiger_j/.aiida_venvs/adis/lib/python3.10/site-packages/paramiko/pkey.py:82: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0.\n", |
| 13 | + " \"cipher\": algorithms.TripleDES,\n", |
| 14 | + "/home/geiger_j/.aiida_venvs/adis/lib/python3.10/site-packages/paramiko/transport.py:253: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0.\n", |
| 15 | + " \"class\": algorithms.TripleDES,\n" |
| 16 | + ] |
| 17 | + } |
| 18 | + ], |
8 | 19 | "source": [ |
9 | 20 | "from python_workflow_definition.aiida import write_workflow_json, construct_wg_qe\n", |
10 | 21 | "from python_workflow_definition.jobflow import load_workflow_json\n", |
|
18 | 29 | }, |
19 | 30 | { |
20 | 31 | "cell_type": "code", |
21 | | - "execution_count": 6, |
| 32 | + "execution_count": 2, |
22 | 33 | "metadata": {}, |
23 | 34 | "outputs": [ |
24 | 35 | { |
|
36 | 47 | " " |
37 | 48 | ], |
38 | 49 | "text/plain": [ |
39 | | - "<IPython.lib.display.IFrame at 0x7f649f7e6770>" |
| 50 | + "<IPython.lib.display.IFrame at 0x7fef4c99d390>" |
40 | 51 | ] |
41 | 52 | }, |
42 | | - "execution_count": 6, |
| 53 | + "execution_count": 2, |
43 | 54 | "metadata": {}, |
44 | 55 | "output_type": "execute_result" |
45 | 56 | } |
|
90 | 101 | }, |
91 | 102 | { |
92 | 103 | "cell_type": "code", |
93 | | - "execution_count": 7, |
| 104 | + "execution_count": 3, |
94 | 105 | "metadata": {}, |
95 | 106 | "outputs": [], |
96 | 107 | "source": [ |
|
99 | 110 | }, |
100 | 111 | { |
101 | 112 | "cell_type": "code", |
102 | | - "execution_count": 8, |
| 113 | + "execution_count": 4, |
103 | 114 | "metadata": {}, |
104 | | - "outputs": [ |
105 | | - { |
106 | | - "ename": "KeyError", |
107 | | - "evalue": "0", |
108 | | - "output_type": "error", |
109 | | - "traceback": [ |
110 | | - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", |
111 | | - "\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)", |
112 | | - "Cell \u001b[0;32mIn[8], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m flow \u001b[38;5;241m=\u001b[39m \u001b[43mload_workflow_json\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfile_name\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mworkflow_json_filename\u001b[49m\u001b[43m)\u001b[49m\n", |
113 | | - "File \u001b[0;32m~/aiida_projects/adis/git-repos/python-workflow-definition/python_workflow_definition/src/python_workflow_definition/jobflow.py:188\u001b[0m, in \u001b[0;36mload_workflow_json\u001b[0;34m(file_name)\u001b[0m\n\u001b[1;32m 186\u001b[0m input_dict \u001b[38;5;241m=\u001b[39m _get_input_dict(nodes_dict\u001b[38;5;241m=\u001b[39mnodes_new_dict)\n\u001b[1;32m 187\u001b[0m new_total_dict \u001b[38;5;241m=\u001b[39m _resort_total_lst(total_dict\u001b[38;5;241m=\u001b[39mtotal_dict, nodes_dict\u001b[38;5;241m=\u001b[39mnodes_new_dict)\n\u001b[0;32m--> 188\u001b[0m task_lst \u001b[38;5;241m=\u001b[39m \u001b[43m_get_workflow\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 189\u001b[0m \u001b[43m \u001b[49m\u001b[43mnodes_dict\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mnodes_new_dict\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 190\u001b[0m \u001b[43m \u001b[49m\u001b[43minput_dict\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43minput_dict\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 191\u001b[0m \u001b[43m \u001b[49m\u001b[43mtotal_dict\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mnew_total_dict\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 192\u001b[0m \u001b[43m \u001b[49m\u001b[43msource_handles_dict\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43msource_handles_dict\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 193\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 194\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m Flow(task_lst)\n", |
114 | | - "File \u001b[0;32m~/aiida_projects/adis/git-repos/python-workflow-definition/python_workflow_definition/src/python_workflow_definition/jobflow.py:141\u001b[0m, in \u001b[0;36m_get_workflow\u001b[0;34m(nodes_dict, input_dict, total_dict, source_handles_dict)\u001b[0m\n\u001b[1;32m 139\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 140\u001b[0m fn \u001b[38;5;241m=\u001b[39m job(method\u001b[38;5;241m=\u001b[39mv)\n\u001b[0;32m--> 141\u001b[0m kwargs \u001b[38;5;241m=\u001b[39m {\n\u001b[1;32m 142\u001b[0m kw: input_dict[vw[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124msource\u001b[39m\u001b[38;5;124m'\u001b[39m]] \u001b[38;5;28;01mif\u001b[39;00m vw[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124msource\u001b[39m\u001b[38;5;124m'\u001b[39m] \u001b[38;5;129;01min\u001b[39;00m input_dict \u001b[38;5;28;01melse\u001b[39;00m get_attr_helper(\n\u001b[1;32m 143\u001b[0m obj\u001b[38;5;241m=\u001b[39mmemory_dict[vw[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124msource\u001b[39m\u001b[38;5;124m'\u001b[39m]], source_handle\u001b[38;5;241m=\u001b[39mvw[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124msourceHandle\u001b[39m\u001b[38;5;124m'\u001b[39m])\n\u001b[1;32m 144\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m kw, vw \u001b[38;5;129;01min\u001b[39;00m total_dict[k]\u001b[38;5;241m.\u001b[39mitems()\n\u001b[1;32m 145\u001b[0m }\n\u001b[1;32m 146\u001b[0m memory_dict[k] \u001b[38;5;241m=\u001b[39m fn(\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)\n\u001b[1;32m 147\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mlist\u001b[39m(memory_dict\u001b[38;5;241m.\u001b[39mvalues())\n", |
115 | | - "File \u001b[0;32m~/aiida_projects/adis/git-repos/python-workflow-definition/python_workflow_definition/src/python_workflow_definition/jobflow.py:143\u001b[0m, in \u001b[0;36m<dictcomp>\u001b[0;34m(.0)\u001b[0m\n\u001b[1;32m 139\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 140\u001b[0m fn \u001b[38;5;241m=\u001b[39m job(method\u001b[38;5;241m=\u001b[39mv)\n\u001b[1;32m 141\u001b[0m kwargs \u001b[38;5;241m=\u001b[39m {\n\u001b[1;32m 142\u001b[0m kw: input_dict[vw[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124msource\u001b[39m\u001b[38;5;124m'\u001b[39m]] \u001b[38;5;28;01mif\u001b[39;00m vw[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124msource\u001b[39m\u001b[38;5;124m'\u001b[39m] \u001b[38;5;129;01min\u001b[39;00m input_dict \u001b[38;5;28;01melse\u001b[39;00m get_attr_helper(\n\u001b[0;32m--> 143\u001b[0m obj\u001b[38;5;241m=\u001b[39m\u001b[43mmemory_dict\u001b[49m\u001b[43m[\u001b[49m\u001b[43mvw\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43msource\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m]\u001b[49m, source_handle\u001b[38;5;241m=\u001b[39mvw[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124msourceHandle\u001b[39m\u001b[38;5;124m'\u001b[39m])\n\u001b[1;32m 144\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m kw, vw \u001b[38;5;129;01min\u001b[39;00m total_dict[k]\u001b[38;5;241m.\u001b[39mitems()\n\u001b[1;32m 145\u001b[0m }\n\u001b[1;32m 146\u001b[0m memory_dict[k] \u001b[38;5;241m=\u001b[39m fn(\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)\n\u001b[1;32m 147\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mlist\u001b[39m(memory_dict\u001b[38;5;241m.\u001b[39mvalues())\n", |
116 | | - "\u001b[0;31mKeyError\u001b[0m: 0" |
117 | | - ] |
118 | | - } |
119 | | - ], |
| 115 | + "outputs": [], |
120 | 116 | "source": [ |
121 | 117 | "\n", |
122 | 118 | "flow = load_workflow_json(file_name=workflow_json_filename)" |
123 | 119 | ] |
124 | 120 | }, |
125 | 121 | { |
126 | 122 | "cell_type": "code", |
127 | | - "execution_count": null, |
| 123 | + "execution_count": 5, |
128 | 124 | "metadata": {}, |
129 | 125 | "outputs": [ |
130 | 126 | { |
131 | 127 | "name": "stdout", |
132 | 128 | "output_type": "stream", |
133 | 129 | "text": [ |
134 | | - "2025-03-15 11:21:45,872 INFO Started executing jobs locally\n", |
135 | | - "2025-03-15 11:21:46,028 INFO Starting job - add_x_and_y (31bed0f7-49cd-4e63-9a53-8c9679e74dd2)\n", |
136 | | - "2025-03-15 11:21:46,030 INFO Finished job - add_x_and_y (31bed0f7-49cd-4e63-9a53-8c9679e74dd2)\n", |
137 | | - "2025-03-15 11:21:46,031 INFO Starting job - add_x_and_y_and_z (7d74164e-3d5b-40d0-b72b-4fc5434a98e1)\n", |
138 | | - "2025-03-15 11:21:46,033 INFO Finished job - add_x_and_y_and_z (7d74164e-3d5b-40d0-b72b-4fc5434a98e1)\n", |
139 | | - "2025-03-15 11:21:46,033 INFO Finished executing jobs locally\n" |
| 130 | + "2025-03-17 13:03:08,254 INFO Started executing jobs locally\n", |
| 131 | + "2025-03-17 13:03:08,350 INFO Starting job - get_bulk_structure (2752a57d-0f42-46d2-b030-a2061311d315)\n", |
| 132 | + "2025-03-17 13:03:08,506 INFO Finished job - get_bulk_structure (2752a57d-0f42-46d2-b030-a2061311d315)\n", |
| 133 | + "2025-03-17 13:03:08,507 INFO Starting job - get_dict (798cca09-0626-4cf6-8236-c5c6f5340458)\n", |
| 134 | + "> \u001b[0;32m/home/geiger_j/.aiida_venvs/adis/lib/python3.10/site-packages/jobflow/core/reference.py\u001b[0m(189)\u001b[0;36mresolve\u001b[0;34m()\u001b[0m\n", |
| 135 | + "\u001b[0;32m 188 \u001b[0;31m \u001b[0mdata\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mattr\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
| 136 | + "\u001b[0m\u001b[0;32m--> 189 \u001b[0;31m \u001b[0;32mif\u001b[0m \u001b[0mattr_type\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0;34m\"i\"\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdata\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdict\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
| 137 | + "\u001b[0m\u001b[0;32m 190 \u001b[0;31m \u001b[0;32melse\u001b[0m \u001b[0mgetattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdata\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mattr\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
| 138 | + "\u001b[0m\n", |
| 139 | + "--KeyboardInterrupt--\n", |
| 140 | + "\n", |
| 141 | + "KeyboardInterrupt: Interrupted by user\n", |
| 142 | + "2025-03-17 13:04:08,108 INFO get_dict failed with exception:\n", |
| 143 | + "Traceback (most recent call last):\n", |
| 144 | + " File \"/home/geiger_j/.aiida_venvs/adis/lib/python3.10/site-packages/jobflow/managers/local.py\", line 117, in _run_job\n", |
| 145 | + " response = job.run(store=store)\n", |
| 146 | + " File \"/home/geiger_j/.aiida_venvs/adis/lib/python3.10/site-packages/jobflow/core/job.py\", line 593, in run\n", |
| 147 | + " self.resolve_args(store=store)\n", |
| 148 | + " File \"/home/geiger_j/.aiida_venvs/adis/lib/python3.10/site-packages/jobflow/core/job.py\", line 709, in resolve_args\n", |
| 149 | + " resolved_kwargs = find_and_resolve_references(\n", |
| 150 | + " File \"/home/geiger_j/.aiida_venvs/adis/lib/python3.10/site-packages/jobflow/core/reference.py\", line 474, in find_and_resolve_references\n", |
| 151 | + " resolved_references = resolve_references(\n", |
| 152 | + " File \"/home/geiger_j/.aiida_venvs/adis/lib/python3.10/site-packages/jobflow/core/reference.py\", line 362, in resolve_references\n", |
| 153 | + " resolved_references[ref] = ref.resolve(\n", |
| 154 | + " File \"/home/geiger_j/.aiida_venvs/adis/lib/python3.10/site-packages/jobflow/core/reference.py\", line 188, in resolve\n", |
| 155 | + " data[attr]\n", |
| 156 | + "KeyError: 'result'\n", |
| 157 | + "\n", |
| 158 | + "2025-03-17 13:04:08,109 INFO Finished executing jobs locally\n" |
140 | 159 | ] |
141 | 160 | }, |
142 | 161 | { |
143 | 162 | "data": { |
144 | 163 | "text/plain": [ |
145 | | - "{'31bed0f7-49cd-4e63-9a53-8c9679e74dd2': {1: Response(output={'x': 1, 'y': 2, 'z': 3}, detour=None, addition=None, replace=None, stored_data=None, stop_children=False, stop_jobflow=False, job_dir=PosixPath('/home/geiger_j/aiida_projects/adis/git-repos/python-workflow-definition'))},\n", |
146 | | - " '7d74164e-3d5b-40d0-b72b-4fc5434a98e1': {1: Response(output=6, detour=None, addition=None, replace=None, stored_data=None, stop_children=False, stop_jobflow=False, job_dir=PosixPath('/home/geiger_j/aiida_projects/adis/git-repos/python-workflow-definition'))}}" |
| 164 | + "{'2752a57d-0f42-46d2-b030-a2061311d315': {1: Response(output={'numbers': [13, 13, 13, 13], 'positions': [[0.0, 0.0, 0.0], [0.0, 2.025, 2.025], [2.025, 0.0, 2.025], [2.025, 2.025, 0.0]], 'cell': [[4.05, 0.0, 0.0], [0.0, 4.05, 0.0], [0.0, 0.0, 4.05]], 'pbc': [True, True, True]}, detour=None, addition=None, replace=None, stored_data=None, stop_children=False, stop_jobflow=False, job_dir=PosixPath('/home/geiger_j/aiida_projects/adis/git-repos/python-workflow-definition'))}}" |
147 | 165 | ] |
148 | 166 | }, |
149 | | - "execution_count": 6, |
| 167 | + "execution_count": 5, |
150 | 168 | "metadata": {}, |
151 | 169 | "output_type": "execute_result" |
152 | 170 | } |
|
0 commit comments