Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 20, 2024
1 parent 9600e9a commit 65ef733
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
4 changes: 3 additions & 1 deletion notebooks/1-local.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,9 @@
}
],
"source": [
"with Executor(backend=\"local\", resource_dict={\"cores\": 2}, block_allocation=True) as exe:\n",
"with Executor(\n",
" backend=\"local\", resource_dict={\"cores\": 2}, block_allocation=True\n",
") as exe:\n",
" fs = exe.submit(calc_mpi, 3)\n",
" print(fs.result())"
]
Expand Down
14 changes: 10 additions & 4 deletions notebooks/3-hpc-allocation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,14 @@
],
"source": [
"with Executor(\n",
" backend=\"flux_allocation\", flux_executor_pmi_mode=\"pmix\", max_workers=2, init_function=init_function, block_allocation=True\n",
" backend=\"flux_allocation\",\n",
" flux_executor_pmi_mode=\"pmix\",\n",
" max_workers=2,\n",
" init_function=init_function,\n",
" block_allocation=True,\n",
") as exe:\n",
" fs = exe.submit(calc_with_preload, 2, j=5)\n",
" print(fs.result())\n"
" print(fs.result())"
]
},
{
Expand Down Expand Up @@ -245,7 +249,9 @@
}
],
"source": [
"with Executor(backend=\"flux_allocation\", flux_executor_pmi_mode=\"pmix\", cache_directory=\"./cache\") as exe:\n",
"with Executor(\n",
" backend=\"flux_allocation\", flux_executor_pmi_mode=\"pmix\", cache_directory=\"./cache\"\n",
") as exe:\n",
" future_lst = [exe.submit(sum, [i, i]) for i in range(1, 4)]\n",
" print([f.result() for f in future_lst])"
]
Expand Down Expand Up @@ -295,7 +301,7 @@
"source": [
"def calc_nested():\n",
" from executorlib import Executor\n",
" \n",
"\n",
" with Executor(backend=\"flux_allocation\", flux_executor_pmi_mode=\"pmix\") as exe:\n",
" fs = exe.submit(sum, [1, 1])\n",
" return fs.result()"
Expand Down
3 changes: 2 additions & 1 deletion notebooks/4-developer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
" command: list, universal_newlines: bool = True, shell: bool = False\n",
"):\n",
" import subprocess\n",
" \n",
"\n",
" return subprocess.check_output(\n",
" command, universal_newlines=universal_newlines, shell=shell\n",
" )"
Expand Down Expand Up @@ -158,6 +158,7 @@
"source": [
"def init_process():\n",
" import subprocess\n",
"\n",
" return {\n",
" \"process\": subprocess.Popen(\n",
" [\"python\", \"count.py\"],\n",
Expand Down

0 comments on commit 65ef733

Please sign in to comment.