cyrusyc commited on
Commit
bd8cd88
1 Parent(s): 6627261

update gitignore

Browse files
.gitignore CHANGED
@@ -2,7 +2,7 @@
2
  *.ipynb
3
  *.extxyz
4
  *.traj
5
- mlip_arena/tasks/*/*/*/
6
  lab/
7
  manuscripts/
8
 
 
2
  *.ipynb
3
  *.extxyz
4
  *.traj
5
+ mlip_arena/tasks/*/*
6
  lab/
7
  manuscripts/
8
 
mlip_arena/tasks/eos/run.ipynb CHANGED
@@ -11,6 +11,7 @@
11
  "from dask.distributed import Client\n",
12
  "from dask_jobqueue import SLURMCluster\n",
13
  "from prefect import task, flow\n",
 
14
  "from prefect_dask import DaskTaskRunner\n",
15
  "from pymatgen.core.structure import Structure\n",
16
  "from dotenv import load_dotenv\n",
@@ -43,7 +44,7 @@
43
  {
44
  "data": {
45
  "application/vnd.jupyter.widget-view+json": {
46
- "model_id": "bf1668eac663453aa9a20149ecf726c4",
47
  "version_major": 2,
48
  "version_minor": 0
49
  },
@@ -69,7 +70,7 @@
69
  },
70
  {
71
  "cell_type": "code",
72
- "execution_count": 8,
73
  "metadata": {},
74
  "outputs": [],
75
  "source": [
@@ -88,7 +89,7 @@
88
  },
89
  {
90
  "cell_type": "code",
91
- "execution_count": 5,
92
  "metadata": {},
93
  "outputs": [],
94
  "source": [
@@ -97,7 +98,7 @@
97
  },
98
  {
99
  "cell_type": "code",
100
- "execution_count": 3,
101
  "metadata": {
102
  "tags": []
103
  },
@@ -108,7 +109,7 @@
108
  },
109
  {
110
  "cell_type": "code",
111
- "execution_count": 4,
112
  "metadata": {},
113
  "outputs": [
114
  {
@@ -128,32 +129,9 @@
128
  "source ~/.bashrc\n",
129
  "module load python\n",
130
  "source activate /pscratch/sd/c/cyrusyc/.conda/mlip-arena\n",
131
- "/pscratch/sd/c/cyrusyc/.conda/mlip-arena/bin/python -m distributed.cli.dask_worker tcp://128.55.64.41:45323 --name dummy-name --nthreads 1 --memory-limit 59.60GiB --nanny --death-timeout 60\n",
132
  "\n"
133
  ]
134
- },
135
- {
136
- "name": "stderr",
137
- "output_type": "stream",
138
- "text": [
139
- "Exception in thread Profile:\n",
140
- "Traceback (most recent call last):\n",
141
- " File \"/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/threading.py\", line 1045, in _bootstrap_inner\n",
142
- " self.run()\n",
143
- " File \"/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/ipykernel/ipkernel.py\", line 766, in run_closure\n",
144
- " _threading_Thread_run(self)\n",
145
- " File \"/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/threading.py\", line 982, in run\n",
146
- " self._target(*self._args, **self._kwargs)\n",
147
- " File \"/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/distributed/profile.py\", line 366, in _watch\n",
148
- " process(frame, None, recent, omit=omit)\n",
149
- " File \"/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/distributed/profile.py\", line 183, in process\n",
150
- " if any(frame.f_code.co_filename.endswith(o) for o in omit):\n",
151
- " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
152
- " File \"/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/distributed/profile.py\", line 183, in <genexpr>\n",
153
- " if any(frame.f_code.co_filename.endswith(o) for o in omit):\n",
154
- " ^^^^^^^^^^^^^^^^^^^^^^^^\n",
155
- "AttributeError: 'dict' object has no attribute 'co_filename'\n"
156
- ]
157
  }
158
  ],
159
  "source": [
@@ -185,13 +163,14 @@
185
  },
186
  {
187
  "cell_type": "code",
188
- "execution_count": 5,
189
  "metadata": {
190
  "tags": []
191
  },
192
  "outputs": [],
193
  "source": [
194
- "\n",
 
195
  "\n",
196
  "def postprocess(output, model: str, formula: str):\n",
197
  " row = {\n",
@@ -215,8 +194,23 @@
215
  " df.drop_duplicates(subset=[\"formula\", \"method\"], keep='last', inplace=True)\n",
216
  " df.to_parquet(fpath)\n",
217
  "\n",
218
- "from prefect.runtime import flow_run, task_run\n",
219
- "EOS = EOS.with_options(timeout_seconds=240, result_storage=None)\n",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
220
  "\n",
221
  "def generate_task_run_name():\n",
222
  " task_name = task_run.task_name\n",
@@ -227,66 +221,116 @@
227
  " \n",
228
  " return f\"{task_name}: {atoms.get_chemical_formula()}\"\n",
229
  "\n",
230
- "\n",
231
- "@task(task_run_name=generate_task_run_name, result_storage=None)\n",
232
- "def fit_one(atoms: Atoms):\n",
233
  " \n",
234
- " outputs = []\n",
235
- " for model in MLIPEnum:\n",
236
- " try:\n",
237
- " eos = EOS(\n",
238
- " atoms=atoms,\n",
239
- " calculator_name=model.name,\n",
240
- " calculator_kwargs={},\n",
241
- " device=None,\n",
242
- " optimizer=\"QuasiNewton\",\n",
243
- " optimizer_kwargs=None,\n",
244
- " filter=\"FrechetCell\",\n",
245
- " filter_kwargs=None,\n",
246
- " criterion=dict(\n",
247
- " fmax=0.1,\n",
248
- " ),\n",
249
- " max_abs_strain=0.1,\n",
250
- " npoints=7,\n",
251
- " )\n",
252
- " if isinstance(eos, dict):\n",
253
- " postprocess(output=eos, model=model.name, formula=atoms.get_chemical_formula())\n",
254
- " eos[\"method\"] = model.name\n",
255
- " outputs.append(eos)\n",
256
- " except:\n",
257
- " continue\n",
258
  " \n",
259
- " return outputs\n",
260
- "\n",
261
- "\n",
262
- "@flow(task_runner=DaskTaskRunner(address=client.scheduler.address), log_prints=True, result_storage=None)\n",
 
263
  "def fit_all(atoms_list: list[Atoms]):\n",
264
  " \n",
265
  " futures = []\n",
266
  " for atoms in atoms_list:\n",
267
- " future = fit_one.submit(atoms)\n",
268
- " futures.append(future)\n",
269
  " \n",
270
- " wait(futures)\n",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
271
  " \n",
272
- " return [f.result(raise_on_failure=False) for f in futures]"
 
 
 
 
 
 
 
273
  ]
274
  },
275
  {
276
  "cell_type": "code",
277
- "execution_count": 6,
278
  "metadata": {
 
279
  "tags": []
280
  },
281
  "outputs": [
282
  {
283
  "data": {
284
  "text/html": [
285
- "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">00:51:45.507 | <span style=\"color: #008080; text-decoration-color: #008080\">INFO</span> | prefect.engine - Created flow run<span style=\"color: #800080; text-decoration-color: #800080\"> 'thistle-pronghorn'</span> for flow<span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\"> 'fit-all'</span>\n",
286
  "</pre>\n"
287
  ],
288
  "text/plain": [
289
- "00:51:45.507 | \u001b[36mINFO\u001b[0m | prefect.engine - Created flow run\u001b[35m 'thistle-pronghorn'\u001b[0m for flow\u001b[1;35m 'fit-all'\u001b[0m\n"
290
  ]
291
  },
292
  "metadata": {},
@@ -295,11 +339,11 @@
295
  {
296
  "data": {
297
  "text/html": [
298
- "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">00:51:45.509 | <span style=\"color: #008080; text-decoration-color: #008080\">INFO</span> | prefect.engine - View at <span style=\"color: #0000ff; text-decoration-color: #0000ff\">https://app.prefect.cloud/account/f7d40474-9362-4bfa-8950-ee6a43ec00f3/workspace/d4bb0913-5f5e-49f7-bfc5-06509088baeb/runs/flow-run/9b293dae-4c2d-43b7-b8bb-9a4749eee74e</span>\n",
299
  "</pre>\n"
300
  ],
301
  "text/plain": [
302
- "00:51:45.509 | \u001b[36mINFO\u001b[0m | prefect.engine - View at \u001b[94mhttps://app.prefect.cloud/account/f7d40474-9362-4bfa-8950-ee6a43ec00f3/workspace/d4bb0913-5f5e-49f7-bfc5-06509088baeb/runs/flow-run/9b293dae-4c2d-43b7-b8bb-9a4749eee74e\u001b[0m\n"
303
  ]
304
  },
305
  "metadata": {},
@@ -308,86 +352,37 @@
308
  {
309
  "data": {
310
  "text/html": [
311
- "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">00:51:45.818 | <span style=\"color: #008080; text-decoration-color: #008080\">INFO</span> | prefect.task_runner.dask - Connecting to existing Dask cluster SLURMCluster(5d2876ed, 'tcp://128.55.64.41:45323', workers=0, threads=0, memory=0 B)\n",
312
  "</pre>\n"
313
  ],
314
  "text/plain": [
315
- "00:51:45.818 | \u001b[36mINFO\u001b[0m | prefect.task_runner.dask - Connecting to existing Dask cluster SLURMCluster(5d2876ed, 'tcp://128.55.64.41:45323', workers=0, threads=0, memory=0 B)\n"
316
  ]
317
  },
318
  "metadata": {},
319
  "output_type": "display_data"
320
- },
321
- {
322
- "data": {
323
- "text/html": [
324
- "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">00:58:09.352 | <span style=\"color: #d70000; text-decoration-color: #d70000\">ERROR</span> | Flow run<span style=\"color: #800080; text-decoration-color: #800080\"> 'thistle-pronghorn'</span> - Crash detected! Execution was aborted by an interrupt signal.\n",
325
- "</pre>\n"
326
- ],
327
- "text/plain": [
328
- "00:58:09.352 | \u001b[38;5;160mERROR\u001b[0m | Flow run\u001b[35m 'thistle-pronghorn'\u001b[0m - Crash detected! Execution was aborted by an interrupt signal.\n"
329
- ]
330
- },
331
- "metadata": {},
332
- "output_type": "display_data"
333
- },
334
- {
335
- "data": {
336
- "text/html": [
337
- "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">00:58:09.642 | <span style=\"color: #d70000; text-decoration-color: #d70000\">ERROR</span> | Flow run<span style=\"color: #800080; text-decoration-color: #800080\"> 'thistle-pronghorn'</span> - Finished in state <span style=\"color: #ff0000; text-decoration-color: #ff0000\">Crashed</span>('Execution was aborted by an interrupt signal.')\n",
338
- "</pre>\n"
339
- ],
340
- "text/plain": [
341
- "00:58:09.642 | \u001b[38;5;160mERROR\u001b[0m | Flow run\u001b[35m 'thistle-pronghorn'\u001b[0m - Finished in state \u001b[91mCrashed\u001b[0m('Execution was aborted by an interrupt signal.')\n"
342
- ]
343
- },
344
- "metadata": {},
345
- "output_type": "display_data"
346
- },
347
- {
348
- "ename": "KeyboardInterrupt",
349
- "evalue": "",
350
- "output_type": "error",
351
- "traceback": [
352
- "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
353
- "\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)",
354
- "Cell \u001b[0;32mIn[6], line 21\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# import os\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;66;03m# import tempfile\u001b[39;00m\n\u001b[1;32m 3\u001b[0m \u001b[38;5;66;03m# import shutil\u001b[39;00m\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 18\u001b[0m \n\u001b[1;32m 19\u001b[0m \u001b[38;5;66;03m# with twd():\u001b[39;00m\n\u001b[0;32m---> 21\u001b[0m \u001b[43mfit_all\u001b[49m\u001b[43m(\u001b[49m\u001b[43matoms_list\u001b[49m\u001b[43m)\u001b[49m\n",
355
- "File \u001b[0;32m/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/prefect/flows.py:1345\u001b[0m, in \u001b[0;36mFlow.__call__\u001b[0;34m(self, return_state, wait_for, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1341\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m track_viz_task(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39misasync, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mname, parameters)\n\u001b[1;32m 1343\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mprefect\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mflow_engine\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m run_flow\n\u001b[0;32m-> 1345\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mrun_flow\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 1346\u001b[0m \u001b[43m \u001b[49m\u001b[43mflow\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1347\u001b[0m \u001b[43m \u001b[49m\u001b[43mparameters\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mparameters\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1348\u001b[0m \u001b[43m \u001b[49m\u001b[43mwait_for\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mwait_for\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1349\u001b[0m \u001b[43m \u001b[49m\u001b[43mreturn_type\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mreturn_type\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1350\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n",
356
- "File \u001b[0;32m/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/prefect/flow_engine.py:818\u001b[0m, in \u001b[0;36mrun_flow\u001b[0;34m(flow, flow_run, parameters, wait_for, return_type)\u001b[0m\n\u001b[1;32m 816\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m run_flow_async(\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)\n\u001b[1;32m 817\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m--> 818\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mrun_flow_sync\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n",
357
- "File \u001b[0;32m/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/prefect/flow_engine.py:696\u001b[0m, in \u001b[0;36mrun_flow_sync\u001b[0;34m(flow, flow_run, parameters, wait_for, return_type)\u001b[0m\n\u001b[1;32m 694\u001b[0m \u001b[38;5;28;01mwhile\u001b[39;00m engine\u001b[38;5;241m.\u001b[39mis_running():\n\u001b[1;32m 695\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m engine\u001b[38;5;241m.\u001b[39mrun_context():\n\u001b[0;32m--> 696\u001b[0m \u001b[43mengine\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcall_flow_fn\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 698\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m engine\u001b[38;5;241m.\u001b[39mstate \u001b[38;5;28;01mif\u001b[39;00m return_type \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mstate\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;28;01melse\u001b[39;00m engine\u001b[38;5;241m.\u001b[39mresult()\n",
358
- "File \u001b[0;32m/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/prefect/flow_engine.py:675\u001b[0m, in \u001b[0;36mFlowRunEngine.call_flow_fn\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 673\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m _call_flow_fn()\n\u001b[1;32m 674\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m--> 675\u001b[0m result \u001b[38;5;241m=\u001b[39m \u001b[43mcall_with_parameters\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mflow\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfn\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mparameters\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 676\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhandle_success(result)\n",
359
- "File \u001b[0;32m/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/prefect/utilities/callables.py:206\u001b[0m, in \u001b[0;36mcall_with_parameters\u001b[0;34m(fn, parameters)\u001b[0m\n\u001b[1;32m 198\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 199\u001b[0m \u001b[38;5;124;03mCall a function with parameters extracted with `get_call_parameters`\u001b[39;00m\n\u001b[1;32m 200\u001b[0m \n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 203\u001b[0m \u001b[38;5;124;03mthe args/kwargs using `parameters_to_positional_and_keyword` directly\u001b[39;00m\n\u001b[1;32m 204\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 205\u001b[0m args, kwargs \u001b[38;5;241m=\u001b[39m parameters_to_args_kwargs(fn, parameters)\n\u001b[0;32m--> 206\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mfn\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n",
360
- "Cell \u001b[0;32mIn[5], line 72\u001b[0m, in \u001b[0;36mfit_all\u001b[0;34m(atoms_list)\u001b[0m\n\u001b[1;32m 70\u001b[0m futures \u001b[38;5;241m=\u001b[39m []\n\u001b[1;32m 71\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m atoms \u001b[38;5;129;01min\u001b[39;00m atoms_list:\n\u001b[0;32m---> 72\u001b[0m future \u001b[38;5;241m=\u001b[39m \u001b[43mfit_one\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43msubmit\u001b[49m\u001b[43m(\u001b[49m\u001b[43matoms\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 73\u001b[0m futures\u001b[38;5;241m.\u001b[39mappend(future)\n\u001b[1;32m 75\u001b[0m wait(futures)\n",
361
- "File \u001b[0;32m/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/prefect/tasks.py:1163\u001b[0m, in \u001b[0;36mTask.submit\u001b[0;34m(self, return_state, wait_for, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1158\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m VisualizationUnsupportedError(\n\u001b[1;32m 1159\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m`task.submit()` is not currently supported by `flow.visualize()`\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 1160\u001b[0m )\n\u001b[1;32m 1162\u001b[0m task_runner \u001b[38;5;241m=\u001b[39m flow_run_context\u001b[38;5;241m.\u001b[39mtask_runner\n\u001b[0;32m-> 1163\u001b[0m future \u001b[38;5;241m=\u001b[39m \u001b[43mtask_runner\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43msubmit\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mparameters\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mwait_for\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1164\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m return_state:\n\u001b[1;32m 1165\u001b[0m future\u001b[38;5;241m.\u001b[39mwait()\n",
362
- "File \u001b[0;32m/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/prefect_dask/task_runners.py:353\u001b[0m, in \u001b[0;36mDaskTaskRunner.submit\u001b[0;34m(self, task, parameters, wait_for, dependencies)\u001b[0m\n\u001b[1;32m 349\u001b[0m \u001b[38;5;66;03m# unpack the upstream call in order to cast Prefect futures to Dask futures\u001b[39;00m\n\u001b[1;32m 350\u001b[0m \u001b[38;5;66;03m# where possible to optimize Dask task scheduling\u001b[39;00m\n\u001b[1;32m 351\u001b[0m parameters \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_optimize_futures(parameters)\n\u001b[0;32m--> 353\u001b[0m future \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_client\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43msubmit\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 354\u001b[0m \u001b[43m \u001b[49m\u001b[43mtask\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 355\u001b[0m \u001b[43m \u001b[49m\u001b[43mparameters\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mparameters\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 356\u001b[0m \u001b[43m \u001b[49m\u001b[43mwait_for\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mwait_for\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 357\u001b[0m \u001b[43m \u001b[49m\u001b[43mdependencies\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mdependencies\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 358\u001b[0m \u001b[43m \u001b[49m\u001b[43mreturn_type\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mstate\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 359\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 360\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m PrefectDaskFuture(wrapped_future\u001b[38;5;241m=\u001b[39mfuture, task_run_id\u001b[38;5;241m=\u001b[39mfuture\u001b[38;5;241m.\u001b[39mtask_run_id)\n",
363
- "File \u001b[0;32m/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/prefect_dask/client.py:64\u001b[0m, in \u001b[0;36mPrefectDaskClient.submit\u001b[0;34m(self, func, key, workers, resources, retries, priority, fifo_timeout, allow_other_workers, actor, actors, pure, *args, **kwargs)\u001b[0m\n\u001b[1;32m 61\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 62\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m run_task_sync(\u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)\n\u001b[0;32m---> 64\u001b[0m future \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43msuper\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43msubmit\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 65\u001b[0m \u001b[43m \u001b[49m\u001b[43mwrapper_func\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 66\u001b[0m \u001b[43m \u001b[49m\u001b[43mkey\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mkey\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 67\u001b[0m \u001b[43m \u001b[49m\u001b[43mworkers\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mworkers\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 68\u001b[0m \u001b[43m \u001b[49m\u001b[43mresources\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mresources\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 69\u001b[0m \u001b[43m \u001b[49m\u001b[43mretries\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mretries\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 70\u001b[0m \u001b[43m \u001b[49m\u001b[43mpriority\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mpriority\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 71\u001b[0m \u001b[43m \u001b[49m\u001b[43mfifo_timeout\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mfifo_timeout\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 72\u001b[0m \u001b[43m \u001b[49m\u001b[43mallow_other_workers\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mallow_other_workers\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 73\u001b[0m \u001b[43m \u001b[49m\u001b[43mactor\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mactor\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 74\u001b[0m \u001b[43m \u001b[49m\u001b[43mactors\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mactors\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 75\u001b[0m \u001b[43m \u001b[49m\u001b[43mpure\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mpure\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 76\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mrun_task_kwargs\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 77\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 79\u001b[0m future\u001b[38;5;241m.\u001b[39mtask_run_id \u001b[38;5;241m=\u001b[39m run_task_kwargs[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtask_run_id\u001b[39m\u001b[38;5;124m\"\u001b[39m]\n\u001b[1;32m 80\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m future\n",
364
- "File \u001b[0;32m/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/distributed/client.py:1931\u001b[0m, in \u001b[0;36mClient.submit\u001b[0;34m(self, func, key, workers, resources, retries, priority, fifo_timeout, allow_other_workers, actor, actors, pure, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1929\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m key \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m 1930\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m pure:\n\u001b[0;32m-> 1931\u001b[0m key \u001b[38;5;241m=\u001b[39m funcname(func) \u001b[38;5;241m+\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m-\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;241m+\u001b[39m \u001b[43mtokenize\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfunc\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mkwargs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1932\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 1933\u001b[0m key \u001b[38;5;241m=\u001b[39m funcname(func) \u001b[38;5;241m+\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m-\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;241m+\u001b[39m \u001b[38;5;28mstr\u001b[39m(uuid\u001b[38;5;241m.\u001b[39muuid4())\n",
365
- "File \u001b[0;32m/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/dask/base.py:1033\u001b[0m, in \u001b[0;36mtokenize\u001b[0;34m(ensure_deterministic, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1015\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"Deterministic token\u001b[39;00m\n\u001b[1;32m 1016\u001b[0m \n\u001b[1;32m 1017\u001b[0m \u001b[38;5;124;03m>>> tokenize([1, 2, '3'])\u001b[39;00m\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 1030\u001b[0m \u001b[38;5;124;03m Defaults to the `tokenize.ensure-deterministic` configuration parameter.\u001b[39;00m\n\u001b[1;32m 1031\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 1032\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m _seen_ctx(reset\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mTrue\u001b[39;00m), _ensure_deterministic_ctx(ensure_deterministic):\n\u001b[0;32m-> 1033\u001b[0m token: \u001b[38;5;28mobject\u001b[39m \u001b[38;5;241m=\u001b[39m \u001b[43m_normalize_seq_func\u001b[49m\u001b[43m(\u001b[49m\u001b[43margs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1034\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m kwargs:\n\u001b[1;32m 1035\u001b[0m token \u001b[38;5;241m=\u001b[39m token, _normalize_seq_func(\u001b[38;5;28msorted\u001b[39m(kwargs\u001b[38;5;241m.\u001b[39mitems()))\n",
366
- "File \u001b[0;32m/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/dask/base.py:1159\u001b[0m, in \u001b[0;36m_normalize_seq_func\u001b[0;34m(seq)\u001b[0m\n\u001b[1;32m 1157\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 1158\u001b[0m seen[\u001b[38;5;28mid\u001b[39m(item)] \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mlen\u001b[39m(seen), item\n\u001b[0;32m-> 1159\u001b[0m item \u001b[38;5;241m=\u001b[39m \u001b[43mnormalize_token\u001b[49m\u001b[43m(\u001b[49m\u001b[43mitem\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1160\u001b[0m out\u001b[38;5;241m.\u001b[39mappend(item)\n\u001b[1;32m 1161\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m out\n",
367
- "File \u001b[0;32m/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/dask/utils.py:773\u001b[0m, in \u001b[0;36mDispatch.__call__\u001b[0;34m(self, arg, *args, **kwargs)\u001b[0m\n\u001b[1;32m 769\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 770\u001b[0m \u001b[38;5;124;03mCall the corresponding method based on type of argument.\u001b[39;00m\n\u001b[1;32m 771\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 772\u001b[0m meth \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mdispatch(\u001b[38;5;28mtype\u001b[39m(arg))\n\u001b[0;32m--> 773\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mmeth\u001b[49m\u001b[43m(\u001b[49m\u001b[43marg\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n",
368
- "File \u001b[0;32m/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/dask/base.py:1129\u001b[0m, in \u001b[0;36mnormalize_dict\u001b[0;34m(d)\u001b[0m\n\u001b[1;32m 1127\u001b[0m \u001b[38;5;129m@normalize_token\u001b[39m\u001b[38;5;241m.\u001b[39mregister((types\u001b[38;5;241m.\u001b[39mMappingProxyType, \u001b[38;5;28mdict\u001b[39m))\n\u001b[1;32m 1128\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mnormalize_dict\u001b[39m(d):\n\u001b[0;32m-> 1129\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdict\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[43m_normalize_seq_func\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43msorted\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43md\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mitems\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mkey\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mlambda\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43mkv\u001b[49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mstr\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43mkv\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;241;43m0\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m)\u001b[49m\u001b[43m)\u001b[49m\u001b[43m)\u001b[49m\n",
369
- "File \u001b[0;32m/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/dask/base.py:1159\u001b[0m, in \u001b[0;36m_normalize_seq_func\u001b[0;34m(seq)\u001b[0m\n\u001b[1;32m 1157\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 1158\u001b[0m seen[\u001b[38;5;28mid\u001b[39m(item)] \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mlen\u001b[39m(seen), item\n\u001b[0;32m-> 1159\u001b[0m item \u001b[38;5;241m=\u001b[39m \u001b[43mnormalize_token\u001b[49m\u001b[43m(\u001b[49m\u001b[43mitem\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1160\u001b[0m out\u001b[38;5;241m.\u001b[39mappend(item)\n\u001b[1;32m 1161\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m out\n",
370
- "File \u001b[0;32m/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/dask/utils.py:773\u001b[0m, in \u001b[0;36mDispatch.__call__\u001b[0;34m(self, arg, *args, **kwargs)\u001b[0m\n\u001b[1;32m 769\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 770\u001b[0m \u001b[38;5;124;03mCall the corresponding method based on type of argument.\u001b[39;00m\n\u001b[1;32m 771\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 772\u001b[0m meth \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mdispatch(\u001b[38;5;28mtype\u001b[39m(arg))\n\u001b[0;32m--> 773\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mmeth\u001b[49m\u001b[43m(\u001b[49m\u001b[43marg\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n",
371
- "File \u001b[0;32m/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/dask/base.py:1166\u001b[0m, in \u001b[0;36mnormalize_seq\u001b[0;34m(seq)\u001b[0m\n\u001b[1;32m 1164\u001b[0m \u001b[38;5;129m@normalize_token\u001b[39m\u001b[38;5;241m.\u001b[39mregister((\u001b[38;5;28mtuple\u001b[39m, \u001b[38;5;28mlist\u001b[39m))\n\u001b[1;32m 1165\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mnormalize_seq\u001b[39m(seq):\n\u001b[0;32m-> 1166\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mtype\u001b[39m(seq)\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__name__\u001b[39m, \u001b[43m_normalize_seq_func\u001b[49m\u001b[43m(\u001b[49m\u001b[43mseq\u001b[49m\u001b[43m)\u001b[49m\n",
372
- " \u001b[0;31m[... skipping similar frames: Dispatch.__call__ at line 773 (1 times), _normalize_seq_func at line 1159 (1 times)]\u001b[0m\n",
373
- "File \u001b[0;32m/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/dask/base.py:1129\u001b[0m, in \u001b[0;36mnormalize_dict\u001b[0;34m(d)\u001b[0m\n\u001b[1;32m 1127\u001b[0m \u001b[38;5;129m@normalize_token\u001b[39m\u001b[38;5;241m.\u001b[39mregister((types\u001b[38;5;241m.\u001b[39mMappingProxyType, \u001b[38;5;28mdict\u001b[39m))\n\u001b[1;32m 1128\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mnormalize_dict\u001b[39m(d):\n\u001b[0;32m-> 1129\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdict\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[43m_normalize_seq_func\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43msorted\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43md\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mitems\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mkey\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mlambda\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43mkv\u001b[49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mstr\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43mkv\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;241;43m0\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m)\u001b[49m\u001b[43m)\u001b[49m\u001b[43m)\u001b[49m\n",
374
- " \u001b[0;31m[... skipping similar frames: Dispatch.__call__ at line 773 (1 times), _normalize_seq_func at line 1159 (1 times)]\u001b[0m\n",
375
- "File \u001b[0;32m/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/dask/base.py:1166\u001b[0m, in \u001b[0;36mnormalize_seq\u001b[0;34m(seq)\u001b[0m\n\u001b[1;32m 1164\u001b[0m \u001b[38;5;129m@normalize_token\u001b[39m\u001b[38;5;241m.\u001b[39mregister((\u001b[38;5;28mtuple\u001b[39m, \u001b[38;5;28mlist\u001b[39m))\n\u001b[1;32m 1165\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mnormalize_seq\u001b[39m(seq):\n\u001b[0;32m-> 1166\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mtype\u001b[39m(seq)\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__name__\u001b[39m, \u001b[43m_normalize_seq_func\u001b[49m\u001b[43m(\u001b[49m\u001b[43mseq\u001b[49m\u001b[43m)\u001b[49m\n",
376
- " \u001b[0;31m[... skipping similar frames: Dispatch.__call__ at line 773 (3 times), _normalize_seq_func at line 1159 (3 times), normalize_dict at line 1129 (1 times), normalize_seq at line 1166 (1 times)]\u001b[0m\n",
377
- "File \u001b[0;32m/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/dask/base.py:1129\u001b[0m, in \u001b[0;36mnormalize_dict\u001b[0;34m(d)\u001b[0m\n\u001b[1;32m 1127\u001b[0m \u001b[38;5;129m@normalize_token\u001b[39m\u001b[38;5;241m.\u001b[39mregister((types\u001b[38;5;241m.\u001b[39mMappingProxyType, \u001b[38;5;28mdict\u001b[39m))\n\u001b[1;32m 1128\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mnormalize_dict\u001b[39m(d):\n\u001b[0;32m-> 1129\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdict\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[43m_normalize_seq_func\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43msorted\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43md\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mitems\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mkey\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mlambda\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43mkv\u001b[49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mstr\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43mkv\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;241;43m0\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m)\u001b[49m\u001b[43m)\u001b[49m\u001b[43m)\u001b[49m\n",
378
- " \u001b[0;31m[... skipping similar frames: Dispatch.__call__ at line 773 (2 times), _normalize_seq_func at line 1159 (2 times), normalize_seq at line 1166 (1 times)]\u001b[0m\n",
379
- "File \u001b[0;32m/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/dask/base.py:1166\u001b[0m, in \u001b[0;36mnormalize_seq\u001b[0;34m(seq)\u001b[0m\n\u001b[1;32m 1164\u001b[0m \u001b[38;5;129m@normalize_token\u001b[39m\u001b[38;5;241m.\u001b[39mregister((\u001b[38;5;28mtuple\u001b[39m, \u001b[38;5;28mlist\u001b[39m))\n\u001b[1;32m 1165\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mnormalize_seq\u001b[39m(seq):\n\u001b[0;32m-> 1166\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mtype\u001b[39m(seq)\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__name__\u001b[39m, \u001b[43m_normalize_seq_func\u001b[49m\u001b[43m(\u001b[49m\u001b[43mseq\u001b[49m\u001b[43m)\u001b[49m\n",
380
- "File \u001b[0;32m/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/dask/base.py:1159\u001b[0m, in \u001b[0;36m_normalize_seq_func\u001b[0;34m(seq)\u001b[0m\n\u001b[1;32m 1157\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 1158\u001b[0m seen[\u001b[38;5;28mid\u001b[39m(item)] \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mlen\u001b[39m(seen), item\n\u001b[0;32m-> 1159\u001b[0m item \u001b[38;5;241m=\u001b[39m \u001b[43mnormalize_token\u001b[49m\u001b[43m(\u001b[49m\u001b[43mitem\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1160\u001b[0m out\u001b[38;5;241m.\u001b[39mappend(item)\n\u001b[1;32m 1161\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m out\n",
381
- "File \u001b[0;32m/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/dask/utils.py:773\u001b[0m, in \u001b[0;36mDispatch.__call__\u001b[0;34m(self, arg, *args, **kwargs)\u001b[0m\n\u001b[1;32m 769\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 770\u001b[0m \u001b[38;5;124;03mCall the corresponding method based on type of argument.\u001b[39;00m\n\u001b[1;32m 771\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 772\u001b[0m meth \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mdispatch(\u001b[38;5;28mtype\u001b[39m(arg))\n\u001b[0;32m--> 773\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mmeth\u001b[49m\u001b[43m(\u001b[49m\u001b[43marg\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n",
382
- "File \u001b[0;32m/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/dask/base.py:1212\u001b[0m, in \u001b[0;36mnormalize_object\u001b[0;34m(o)\u001b[0m\n\u001b[1;32m 1209\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m _normalize_dataclass(o)\n\u001b[1;32m 1211\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-> 1212\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43m_normalize_pickle\u001b[49m\u001b[43m(\u001b[49m\u001b[43mo\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1213\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mException\u001b[39;00m:\n\u001b[1;32m 1214\u001b[0m _maybe_raise_nondeterministic(\n\u001b[1;32m 1215\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mObject \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mo\u001b[38;5;132;01m!r}\u001b[39;00m\u001b[38;5;124m cannot be deterministically hashed. See \u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 1216\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mhttps://docs.dask.org/en/latest/custom-collections.html#implementing-deterministic-hashing \u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 1217\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mfor more information.\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 1218\u001b[0m )\n",
383
- "File \u001b[0;32m/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/dask/base.py:1250\u001b[0m, in \u001b[0;36m_normalize_pickle\u001b[0;34m(o)\u001b[0m\n\u001b[1;32m 1247\u001b[0m buffers\u001b[38;5;241m.\u001b[39mclear()\n\u001b[1;32m 1248\u001b[0m pik \u001b[38;5;241m=\u001b[39m cloudpickle\u001b[38;5;241m.\u001b[39mdumps(o, protocol\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m5\u001b[39m, buffer_callback\u001b[38;5;241m=\u001b[39mbuffers\u001b[38;5;241m.\u001b[39mappend)\n\u001b[0;32m-> 1250\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mhash_buffer_hex\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpik\u001b[49m\u001b[43m)\u001b[49m, [hash_buffer_hex(buf) \u001b[38;5;28;01mfor\u001b[39;00m buf \u001b[38;5;129;01min\u001b[39;00m buffers]\n",
384
- "File \u001b[0;32m/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/dask/hashing.py:98\u001b[0m, in \u001b[0;36mhash_buffer_hex\u001b[0;34m(buf, hasher)\u001b[0m\n\u001b[1;32m 94\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mhash_buffer_hex\u001b[39m(buf, hasher\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mNone\u001b[39;00m):\n\u001b[1;32m 95\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 96\u001b[0m \u001b[38;5;124;03m Same as hash_buffer, but returns its result in hex-encoded form.\u001b[39;00m\n\u001b[1;32m 97\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[0;32m---> 98\u001b[0m h \u001b[38;5;241m=\u001b[39m \u001b[43mhash_buffer\u001b[49m\u001b[43m(\u001b[49m\u001b[43mbuf\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mhasher\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 99\u001b[0m s \u001b[38;5;241m=\u001b[39m binascii\u001b[38;5;241m.\u001b[39mb2a_hex(h)\n\u001b[1;32m 100\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m s\u001b[38;5;241m.\u001b[39mdecode()\n",
385
- "File \u001b[0;32m/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/dask/hashing.py:88\u001b[0m, in \u001b[0;36mhash_buffer\u001b[0;34m(buf, hasher)\u001b[0m\n\u001b[1;32m 86\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m hasher \u001b[38;5;129;01min\u001b[39;00m hashers:\n\u001b[1;32m 87\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m---> 88\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mhasher\u001b[49m\u001b[43m(\u001b[49m\u001b[43mbuf\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 89\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m (\u001b[38;5;167;01mTypeError\u001b[39;00m, \u001b[38;5;167;01mOverflowError\u001b[39;00m):\n\u001b[1;32m 90\u001b[0m \u001b[38;5;28;01mpass\u001b[39;00m\n",
386
- "File \u001b[0;32m/pscratch/sd/c/cyrusyc/.conda/mlip-arena/lib/python3.11/site-packages/dask/hashing.py:44\u001b[0m, in \u001b[0;36m_hash_xxhash\u001b[0;34m(buf)\u001b[0m\n\u001b[1;32m 40\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21m_hash_xxhash\u001b[39m(buf):\n\u001b[1;32m 41\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 42\u001b[0m \u001b[38;5;124;03m Produce a 8-bytes hash of *buf* using xxHash.\u001b[39;00m\n\u001b[1;32m 43\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[0;32m---> 44\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mxxhash\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mxxh64\u001b[49m\u001b[43m(\u001b[49m\u001b[43mbuf\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241m.\u001b[39mdigest()\n",
387
- "\u001b[0;31mKeyboardInterrupt\u001b[0m: "
388
- ]
389
  }
390
  ],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
391
  "source": [
392
  "# import os\n",
393
  "# import tempfile\n",
@@ -409,12 +404,12 @@
409
  "\n",
410
  "# with twd():\n",
411
  "\n",
412
- "fit_all(atoms_list)"
413
  ]
414
  },
415
  {
416
  "cell_type": "code",
417
- "execution_count": 7,
418
  "metadata": {
419
  "tags": []
420
  },
@@ -427,7 +422,7 @@
427
  },
428
  {
429
  "cell_type": "code",
430
- "execution_count": 8,
431
  "metadata": {},
432
  "outputs": [
433
  {
@@ -460,15 +455,47 @@
460
  " </thead>\n",
461
  " <tbody>\n",
462
  " <tr>\n",
463
- " <th>0</th>\n",
464
  " <td>Ac2O3</td>\n",
465
  " <td>MACE-MP(M)</td>\n",
466
  " <td>[82.36010147441682, 85.41047560309894, 88.4608...</td>\n",
467
- " <td>[-39.47665786743164, -39.65583419799805, -39.7...</td>\n",
468
- " <td>95.869141</td>\n",
469
  " </tr>\n",
470
  " <tr>\n",
471
- " <th>1</th>\n",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
472
  " <td>Ac4</td>\n",
473
  " <td>MACE-MP(M)</td>\n",
474
  " <td>[166.09086069175856, 172.2423740507126, 178.39...</td>\n",
@@ -476,12 +503,12 @@
476
  " <td>25.409891</td>\n",
477
  " </tr>\n",
478
  " <tr>\n",
479
- " <th>3</th>\n",
480
  " <td>Ac16S24</td>\n",
481
  " <td>MACE-MP(M)</td>\n",
482
  " <td>[1006.5670668063424, 1043.84732853991, 1081.12...</td>\n",
483
- " <td>[-249.42129516601562, -250.79556274414062, -25...</td>\n",
484
- " <td>61.372858</td>\n",
485
  " </tr>\n",
486
  " </tbody>\n",
487
  "</table>\n",
@@ -489,17 +516,25 @@
489
  ],
490
  "text/plain": [
491
  " formula method volumes \\\n",
492
- "0 Ac2O3 MACE-MP(M) [82.36010147441682, 85.41047560309894, 88.4608... \n",
493
- "1 Ac4 MACE-MP(M) [166.09086069175856, 172.2423740507126, 178.39... \n",
494
- "3 Ac16S24 MACE-MP(M) [1006.5670668063424, 1043.84732853991, 1081.12... \n",
 
 
 
 
495
  "\n",
496
  " energies K \n",
497
- "0 [-39.47665786743164, -39.65583419799805, -39.7... 95.869141 \n",
498
- "1 [-16.326059341430664, -16.406923294067383, -16... 25.409891 \n",
499
- "3 [-249.42129516601562, -250.79556274414062, -25... 61.372858 "
 
 
 
 
500
  ]
501
  },
502
- "execution_count": 8,
503
  "metadata": {},
504
  "output_type": "execute_result"
505
  }
@@ -536,105 +571,7 @@
536
  },
537
  "widgets": {
538
  "application/vnd.jupyter.widget-state+json": {
539
- "state": {
540
- "1e2c24979c4e4b3b91e8f8a8e214d56f": {
541
- "model_module": "@jupyter-widgets/controls",
542
- "model_module_version": "2.0.0",
543
- "model_name": "HTMLModel",
544
- "state": {
545
- "layout": "IPY_MODEL_e03d78a760b8402cad0827279f4075c1",
546
- "style": "IPY_MODEL_743568418ec24e369c2ac0f9a9573a1c",
547
- "value": "Retrieving SummaryDoc documents: 100%"
548
- }
549
- },
550
- "41e363c9f8514e6a993426e30d45ec98": {
551
- "model_module": "@jupyter-widgets/controls",
552
- "model_module_version": "2.0.0",
553
- "model_name": "HTMLStyleModel",
554
- "state": {
555
- "description_width": "",
556
- "font_size": null,
557
- "text_color": null
558
- }
559
- },
560
- "4dde6375de954082a87b1483182e40a3": {
561
- "model_module": "@jupyter-widgets/base",
562
- "model_module_version": "2.0.0",
563
- "model_name": "LayoutModel",
564
- "state": {}
565
- },
566
- "607687cda1ce4276a772b626ef3e6179": {
567
- "model_module": "@jupyter-widgets/controls",
568
- "model_module_version": "2.0.0",
569
- "model_name": "HTMLModel",
570
- "state": {
571
- "layout": "IPY_MODEL_93a95097ee984d95b1dfedcb2d913435",
572
- "style": "IPY_MODEL_41e363c9f8514e6a993426e30d45ec98",
573
- "value": " 5135/5135 [00:04&lt;00:00, 958.06it/s]"
574
- }
575
- },
576
- "743568418ec24e369c2ac0f9a9573a1c": {
577
- "model_module": "@jupyter-widgets/controls",
578
- "model_module_version": "2.0.0",
579
- "model_name": "HTMLStyleModel",
580
- "state": {
581
- "description_width": "",
582
- "font_size": null,
583
- "text_color": null
584
- }
585
- },
586
- "8d602e7a8e734c50b0fad54bf76cc7d5": {
587
- "model_module": "@jupyter-widgets/controls",
588
- "model_module_version": "2.0.0",
589
- "model_name": "ProgressStyleModel",
590
- "state": {
591
- "description_width": ""
592
- }
593
- },
594
- "93a95097ee984d95b1dfedcb2d913435": {
595
- "model_module": "@jupyter-widgets/base",
596
- "model_module_version": "2.0.0",
597
- "model_name": "LayoutModel",
598
- "state": {}
599
- },
600
- "b09359f88f954062aff30df3bf2ba46b": {
601
- "model_module": "@jupyter-widgets/base",
602
- "model_module_version": "2.0.0",
603
- "model_name": "LayoutModel",
604
- "state": {}
605
- },
606
- "bf1668eac663453aa9a20149ecf726c4": {
607
- "model_module": "@jupyter-widgets/controls",
608
- "model_module_version": "2.0.0",
609
- "model_name": "HBoxModel",
610
- "state": {
611
- "children": [
612
- "IPY_MODEL_1e2c24979c4e4b3b91e8f8a8e214d56f",
613
- "IPY_MODEL_cf1131b45bf04178ac93962259718700",
614
- "IPY_MODEL_607687cda1ce4276a772b626ef3e6179"
615
- ],
616
- "layout": "IPY_MODEL_4dde6375de954082a87b1483182e40a3"
617
- }
618
- },
619
- "cf1131b45bf04178ac93962259718700": {
620
- "model_module": "@jupyter-widgets/controls",
621
- "model_module_version": "2.0.0",
622
- "model_name": "FloatProgressModel",
623
- "state": {
624
- "bar_style": "success",
625
- "layout": "IPY_MODEL_b09359f88f954062aff30df3bf2ba46b",
626
- "max": 5135,
627
- "style": "IPY_MODEL_8d602e7a8e734c50b0fad54bf76cc7d5",
628
- "value": 5135
629
- }
630
- },
631
- "e03d78a760b8402cad0827279f4075c1": {
632
- "model_module": "@jupyter-widgets/base",
633
- "model_module_version": "2.0.0",
634
- "model_name": "LayoutModel",
635
- "state": {}
636
- }
637
- },
638
  "version_major": 2,
639
  "version_minor": 0
640
  }
 
11
  "from dask.distributed import Client\n",
12
  "from dask_jobqueue import SLURMCluster\n",
13
  "from prefect import task, flow\n",
14
+ "from prefect.task_runners import ThreadPoolTaskRunner\n",
15
  "from prefect_dask import DaskTaskRunner\n",
16
  "from pymatgen.core.structure import Structure\n",
17
  "from dotenv import load_dotenv\n",
 
44
  {
45
  "data": {
46
  "application/vnd.jupyter.widget-view+json": {
47
+ "model_id": "bb6c1969c89840888c556f8fa59b4a67",
48
  "version_major": 2,
49
  "version_minor": 0
50
  },
 
70
  },
71
  {
72
  "cell_type": "code",
73
+ "execution_count": 3,
74
  "metadata": {},
75
  "outputs": [],
76
  "source": [
 
89
  },
90
  {
91
  "cell_type": "code",
92
+ "execution_count": 4,
93
  "metadata": {},
94
  "outputs": [],
95
  "source": [
 
98
  },
99
  {
100
  "cell_type": "code",
101
+ "execution_count": 2,
102
  "metadata": {
103
  "tags": []
104
  },
 
109
  },
110
  {
111
  "cell_type": "code",
112
+ "execution_count": 3,
113
  "metadata": {},
114
  "outputs": [
115
  {
 
129
  "source ~/.bashrc\n",
130
  "module load python\n",
131
  "source activate /pscratch/sd/c/cyrusyc/.conda/mlip-arena\n",
132
+ "/pscratch/sd/c/cyrusyc/.conda/mlip-arena/bin/python -m distributed.cli.dask_worker tcp://128.55.64.49:36289 --name dummy-name --nthreads 1 --memory-limit 59.60GiB --nanny --death-timeout 60\n",
133
  "\n"
134
  ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  }
136
  ],
137
  "source": [
 
163
  },
164
  {
165
  "cell_type": "code",
166
+ "execution_count": 4,
167
  "metadata": {
168
  "tags": []
169
  },
170
  "outputs": [],
171
  "source": [
172
+ "from prefect.concurrency.sync import concurrency\n",
173
+ "from prefect.runtime import flow_run, task_run\n",
174
  "\n",
175
  "def postprocess(output, model: str, formula: str):\n",
176
  " row = {\n",
 
194
  " df.drop_duplicates(subset=[\"formula\", \"method\"], keep='last', inplace=True)\n",
195
  " df.to_parquet(fpath)\n",
196
  "\n",
197
+ "\n",
198
+ "\n",
199
+ "task_runner = DaskTaskRunner(address=client.scheduler.address)\n",
200
+ "EOS = EOS.with_options(\n",
201
+ " # task_runner=task_runner, \n",
202
+ " log_prints=True,\n",
203
+ " timeout_seconds=120, \n",
204
+ " # result_storage=None\n",
205
+ ")\n",
206
+ "\n",
207
+ "from prefect import get_client\n",
208
+ "\n",
209
+ "async with get_client() as client:\n",
210
+ " limit_id = await client.create_concurrency_limit(\n",
211
+ " tag=\"bottleneck\", \n",
212
+ " concurrency_limit=2\n",
213
+ " )\n",
214
  "\n",
215
  "def generate_task_run_name():\n",
216
  " task_name = task_run.task_name\n",
 
221
  " \n",
222
  " return f\"{task_name}: {atoms.get_chemical_formula()}\"\n",
223
  "\n",
224
+ "@task(task_run_name=generate_task_run_name, tags=[\"bottleneck\"], timeout_seconds=150)\n",
225
+ "def fit_one(atoms: Atoms, model: str):\n",
 
226
  " \n",
227
+ " eos = EOS(\n",
228
+ " atoms=atoms,\n",
229
+ " calculator_name=model,\n",
230
+ " calculator_kwargs={},\n",
231
+ " device=None,\n",
232
+ " optimizer=\"QuasiNewton\",\n",
233
+ " optimizer_kwargs=None,\n",
234
+ " filter=\"FrechetCell\",\n",
235
+ " filter_kwargs=None,\n",
236
+ " criterion=dict(\n",
237
+ " fmax=0.1,\n",
238
+ " ),\n",
239
+ " max_abs_strain=0.1,\n",
240
+ " npoints=7,\n",
241
+ " )\n",
242
+ " if isinstance(eos, dict):\n",
243
+ " postprocess(output=eos, model=model, formula=atoms.get_chemical_formula())\n",
244
+ " eos[\"method\"] = model\n",
 
 
 
 
 
 
245
  " \n",
246
+ " return eos\n",
247
+ " \n",
248
+ "#https://docs-3.prefect.io/3.0/develop/task-runners#use-multiple-task-runners\n",
249
+ "# @flow(task_runner=ThreadPoolTaskRunner(max_workers=50), log_prints=True)\n",
250
+ "@flow(task_runner=task_runner, log_prints=True)\n",
251
  "def fit_all(atoms_list: list[Atoms]):\n",
252
  " \n",
253
  " futures = []\n",
254
  " for atoms in atoms_list:\n",
255
+ " futures_per_atoms = []\n",
256
+ " for model in MLIPEnum:\n",
257
  " \n",
258
+ " # with concurrency(\"bottleneck\", occupy=2):\n",
259
+ " future = fit_one.submit(atoms, model.name)\n",
260
+ " # if not futures_per_atoms:\n",
261
+ " # if not futures:\n",
262
+ " # future = fit_one.submit(atoms, model.name)\n",
263
+ " # else:\n",
264
+ " # future = fit_one.submit(atoms, model.name, wait_for=[futures[-1]]) \n",
265
+ " # else:\n",
266
+ " # future = fit_one.submit(atoms, model.name, wait_for=[future])\n",
267
+ " futures_per_atoms.append(future)\n",
268
+ " \n",
269
+ " futures.extend(futures_per_atoms)\n",
270
+ "\n",
271
+ " return [f.result() for f in futures]\n",
272
+ "\n",
273
+ "\n",
274
+ "# @task(task_run_name=generate_task_run_name, result_storage=None)\n",
275
+ "# def fit_one(atoms: Atoms):\n",
276
+ " \n",
277
+ "# outputs = []\n",
278
+ "# for model in MLIPEnum:\n",
279
+ "# try:\n",
280
+ "# eos = EOS(\n",
281
+ "# atoms=atoms,\n",
282
+ "# calculator_name=model.name,\n",
283
+ "# calculator_kwargs={},\n",
284
+ "# device=None,\n",
285
+ "# optimizer=\"QuasiNewton\",\n",
286
+ "# optimizer_kwargs=None,\n",
287
+ "# filter=\"FrechetCell\",\n",
288
+ "# filter_kwargs=None,\n",
289
+ "# criterion=dict(\n",
290
+ "# fmax=0.1,\n",
291
+ "# ),\n",
292
+ "# max_abs_strain=0.1,\n",
293
+ "# npoints=7,\n",
294
+ "# )\n",
295
+ "# if isinstance(eos, dict):\n",
296
+ "# postprocess(output=eos, model=model.name, formula=atoms.get_chemical_formula())\n",
297
+ "# eos[\"method\"] = model.name\n",
298
+ "# outputs.append(eos)\n",
299
+ "# except:\n",
300
+ "# continue\n",
301
+ " \n",
302
+ "# return outputs\n",
303
+ "\n",
304
+ "# # https://orion-docs.prefect.io/latest/concepts/task-runners/#using-multiple-task-runners\n",
305
+ "# @flow(task_runner=DaskTaskRunner(address=client.scheduler.address), log_prints=True, result_storage=None)\n",
306
+ "# def fit_all(atoms_list: list[Atoms]):\n",
307
  " \n",
308
+ "# futures = []\n",
309
+ "# for atoms in atoms_list:\n",
310
+ "# future = fit_one.submit(atoms)\n",
311
+ "# futures.append(future)\n",
312
+ " \n",
313
+ "# wait(futures)\n",
314
+ " \n",
315
+ "# return [f.result(raise_on_failure=False) for f in futures]"
316
  ]
317
  },
318
  {
319
  "cell_type": "code",
320
+ "execution_count": null,
321
  "metadata": {
322
+ "scrolled": true,
323
  "tags": []
324
  },
325
  "outputs": [
326
  {
327
  "data": {
328
  "text/html": [
329
+ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">18:53:47.335 | <span style=\"color: #008080; text-decoration-color: #008080\">INFO</span> | prefect.engine - Created flow run<span style=\"color: #800080; text-decoration-color: #800080\"> 'vengeful-malkoha'</span> for flow<span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\"> 'fit-all'</span>\n",
330
  "</pre>\n"
331
  ],
332
  "text/plain": [
333
+ "18:53:47.335 | \u001b[36mINFO\u001b[0m | prefect.engine - Created flow run\u001b[35m 'vengeful-malkoha'\u001b[0m for flow\u001b[1;35m 'fit-all'\u001b[0m\n"
334
  ]
335
  },
336
  "metadata": {},
 
339
  {
340
  "data": {
341
  "text/html": [
342
+ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">18:53:47.341 | <span style=\"color: #008080; text-decoration-color: #008080\">INFO</span> | prefect.engine - View at <span style=\"color: #0000ff; text-decoration-color: #0000ff\">https://app.prefect.cloud/account/f7d40474-9362-4bfa-8950-ee6a43ec00f3/workspace/d4bb0913-5f5e-49f7-bfc5-06509088baeb/runs/flow-run/909d2bc4-695f-4eeb-8b7c-7660397a0692</span>\n",
343
  "</pre>\n"
344
  ],
345
  "text/plain": [
346
+ "18:53:47.341 | \u001b[36mINFO\u001b[0m | prefect.engine - View at \u001b[94mhttps://app.prefect.cloud/account/f7d40474-9362-4bfa-8950-ee6a43ec00f3/workspace/d4bb0913-5f5e-49f7-bfc5-06509088baeb/runs/flow-run/909d2bc4-695f-4eeb-8b7c-7660397a0692\u001b[0m\n"
347
  ]
348
  },
349
  "metadata": {},
 
352
  {
353
  "data": {
354
  "text/html": [
355
+ "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">18:53:47.654 | <span style=\"color: #008080; text-decoration-color: #008080\">INFO</span> | prefect.task_runner.dask - Connecting to existing Dask cluster SLURMCluster(df8c3d55, 'tcp://128.55.64.49:36289', workers=0, threads=0, memory=0 B)\n",
356
  "</pre>\n"
357
  ],
358
  "text/plain": [
359
+ "18:53:47.654 | \u001b[36mINFO\u001b[0m | prefect.task_runner.dask - Connecting to existing Dask cluster SLURMCluster(df8c3d55, 'tcp://128.55.64.49:36289', workers=0, threads=0, memory=0 B)\n"
360
  ]
361
  },
362
  "metadata": {},
363
  "output_type": "display_data"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
364
  }
365
  ],
366
+ "source": [
367
+ "fit_all(atoms_list)"
368
+ ]
369
+ },
370
+ {
371
+ "cell_type": "markdown",
372
+ "metadata": {},
373
+ "source": [
374
+ "```\n",
375
+ "Note that, because the DaskTaskRunner uses multiprocessing, calls to flows in scripts must be guarded with if __name__ == \"__main__\": or you will encounter warnings and errors.\n",
376
+ "```"
377
+ ]
378
+ },
379
+ {
380
+ "cell_type": "code",
381
+ "execution_count": 9,
382
+ "metadata": {
383
+ "tags": []
384
+ },
385
+ "outputs": [],
386
  "source": [
387
  "# import os\n",
388
  "# import tempfile\n",
 
404
  "\n",
405
  "# with twd():\n",
406
  "\n",
407
+ "# fit_all(atoms_list)"
408
  ]
409
  },
410
  {
411
  "cell_type": "code",
412
+ "execution_count": 10,
413
  "metadata": {
414
  "tags": []
415
  },
 
422
  },
423
  {
424
  "cell_type": "code",
425
+ "execution_count": 11,
426
  "metadata": {},
427
  "outputs": [
428
  {
 
455
  " </thead>\n",
456
  " <tbody>\n",
457
  " <tr>\n",
458
+ " <th>1</th>\n",
459
  " <td>Ac2O3</td>\n",
460
  " <td>MACE-MP(M)</td>\n",
461
  " <td>[82.36010147441682, 85.41047560309894, 88.4608...</td>\n",
462
+ " <td>[-39.47541427612305, -39.65580749511719, -39.7...</td>\n",
463
+ " <td>95.755459</td>\n",
464
  " </tr>\n",
465
  " <tr>\n",
466
+ " <th>2</th>\n",
467
+ " <td>Ac6In2</td>\n",
468
+ " <td>MACE-MP(M)</td>\n",
469
+ " <td>[278.3036976131417, 288.61124196918433, 298.91...</td>\n",
470
+ " <td>[-31.21324348449707, -31.40914535522461, -31.5...</td>\n",
471
+ " <td>33.370214</td>\n",
472
+ " </tr>\n",
473
+ " <tr>\n",
474
+ " <th>3</th>\n",
475
+ " <td>Ac6Tl2</td>\n",
476
+ " <td>MACE-MP(M)</td>\n",
477
+ " <td>[278.30267000598286, 288.6101763025008, 298.91...</td>\n",
478
+ " <td>[-29.572534561157227, -29.833026885986328, -30...</td>\n",
479
+ " <td>29.065081</td>\n",
480
+ " </tr>\n",
481
+ " <tr>\n",
482
+ " <th>4</th>\n",
483
+ " <td>Ac3Sn</td>\n",
484
+ " <td>MACE-MP(M)</td>\n",
485
+ " <td>[135.293532345587, 140.30440391394214, 145.315...</td>\n",
486
+ " <td>[-17.135194778442383, -17.228239059448242, -17...</td>\n",
487
+ " <td>30.622045</td>\n",
488
+ " </tr>\n",
489
+ " <tr>\n",
490
+ " <th>5</th>\n",
491
+ " <td>AcAg</td>\n",
492
+ " <td>MACE-MP(M)</td>\n",
493
+ " <td>[55.376437498321394, 57.4274166649259, 59.4783...</td>\n",
494
+ " <td>[-7.274301528930664, -7.346108913421631, -7.39...</td>\n",
495
+ " <td>40.212164</td>\n",
496
+ " </tr>\n",
497
+ " <tr>\n",
498
+ " <th>6</th>\n",
499
  " <td>Ac4</td>\n",
500
  " <td>MACE-MP(M)</td>\n",
501
  " <td>[166.09086069175856, 172.2423740507126, 178.39...</td>\n",
 
503
  " <td>25.409891</td>\n",
504
  " </tr>\n",
505
  " <tr>\n",
506
+ " <th>7</th>\n",
507
  " <td>Ac16S24</td>\n",
508
  " <td>MACE-MP(M)</td>\n",
509
  " <td>[1006.5670668063424, 1043.84732853991, 1081.12...</td>\n",
510
+ " <td>[-249.4179229736328, -250.7970733642578, -251....</td>\n",
511
+ " <td>61.734158</td>\n",
512
  " </tr>\n",
513
  " </tbody>\n",
514
  "</table>\n",
 
516
  ],
517
  "text/plain": [
518
  " formula method volumes \\\n",
519
+ "1 Ac2O3 MACE-MP(M) [82.36010147441682, 85.41047560309894, 88.4608... \n",
520
+ "2 Ac6In2 MACE-MP(M) [278.3036976131417, 288.61124196918433, 298.91... \n",
521
+ "3 Ac6Tl2 MACE-MP(M) [278.30267000598286, 288.6101763025008, 298.91... \n",
522
+ "4 Ac3Sn MACE-MP(M) [135.293532345587, 140.30440391394214, 145.315... \n",
523
+ "5 AcAg MACE-MP(M) [55.376437498321394, 57.4274166649259, 59.4783... \n",
524
+ "6 Ac4 MACE-MP(M) [166.09086069175856, 172.2423740507126, 178.39... \n",
525
+ "7 Ac16S24 MACE-MP(M) [1006.5670668063424, 1043.84732853991, 1081.12... \n",
526
  "\n",
527
  " energies K \n",
528
+ "1 [-39.47541427612305, -39.65580749511719, -39.7... 95.755459 \n",
529
+ "2 [-31.21324348449707, -31.40914535522461, -31.5... 33.370214 \n",
530
+ "3 [-29.572534561157227, -29.833026885986328, -30... 29.065081 \n",
531
+ "4 [-17.135194778442383, -17.228239059448242, -17... 30.622045 \n",
532
+ "5 [-7.274301528930664, -7.346108913421631, -7.39... 40.212164 \n",
533
+ "6 [-16.326059341430664, -16.406923294067383, -16... 25.409891 \n",
534
+ "7 [-249.4179229736328, -250.7970733642578, -251.... 61.734158 "
535
  ]
536
  },
537
+ "execution_count": 11,
538
  "metadata": {},
539
  "output_type": "execute_result"
540
  }
 
571
  },
572
  "widgets": {
573
  "application/vnd.jupyter.widget-state+json": {
574
+ "state": {},
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
575
  "version_major": 2,
576
  "version_minor": 0
577
  }
mlip_arena/tasks/eos/run.py CHANGED
@@ -47,6 +47,7 @@ def generate_task_run_name():
47
  return f"{task_name}: {atoms.get_chemical_formula()} - {calculator_name}"
48
 
49
 
 
50
  # @task(task_run_name=generate_task_run_name)
51
  @flow(flow_run_name=generate_flow_run_name, validate_parameters=False)
52
  def fit(
@@ -121,8 +122,16 @@ def fit(
121
 
122
  wait(futures)
123
 
124
- volumes = [f.result()["atoms"].get_volume() for f in futures if isinstance(f.result(), dict)]
125
- energies = [f.result()["atoms"].get_potential_energy() for f in futures if isinstance(f.result(), dict)]
 
 
 
 
 
 
 
 
126
 
127
  volumes, energies = map(
128
  list,
 
47
  return f"{task_name}: {atoms.get_chemical_formula()} - {calculator_name}"
48
 
49
 
50
+ # https://docs.prefect.io/3.0/develop/write-tasks#custom-retry-behavior
51
  # @task(task_run_name=generate_task_run_name)
52
  @flow(flow_run_name=generate_flow_run_name, validate_parameters=False)
53
  def fit(
 
122
 
123
  wait(futures)
124
 
125
+ volumes = [
126
+ f.result()["atoms"].get_volume()
127
+ for f in futures
128
+ if isinstance(f.result(), dict)
129
+ ]
130
+ energies = [
131
+ f.result()["atoms"].get_potential_energy()
132
+ for f in futures
133
+ if isinstance(f.result(), dict)
134
+ ]
135
 
136
  volumes, energies = map(
137
  list,