Skip to content

Commit

Permalink
Need to define client for --serial
Browse files Browse the repository at this point in the history
Also, we want to print(client) for both CUPiD and non-CUPiD runs
  • Loading branch information
mnlevy1981 committed Jan 25, 2025
1 parent aac0c50 commit 7da2503
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
6 changes: 2 additions & 4 deletions nblibrary/ice/Hemis_seaice_visual_compare_contour.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,11 @@
" from dask.distributed import Client, LocalCluster\n",
"\n",
" # Spin up cluster (if running in parallel)\n",
" # client = None\n",
" client = None\n",
" if not serial:\n",
" cluster = LocalCluster(**lc_kwargs)\n",
" client = Client(cluster)\n",
"\n",
" client\n",
"\n",
"else:\n",
"\n",
" from dask.distributed import Client\n",
Expand All @@ -118,7 +116,7 @@
" cluster.scale(1)\n",
"\n",
" print(cluster)\n",
" print(client)"
"print(client)"
]
},
{
Expand Down
7 changes: 3 additions & 4 deletions nblibrary/ice/Hemis_seaice_visual_compare_obs_lens.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,11 @@
" from dask.distributed import Client, LocalCluster\n",
"\n",
" # Spin up cluster (if running in parallel)\n",
" # client = None\n",
" client = None\n",
" if not serial:\n",
" cluster = LocalCluster(**lc_kwargs)\n",
" client = Client(cluster)\n",
"\n",
" client\n",
"\n",
"else:\n",
"\n",
" from dask.distributed import Client\n",
Expand All @@ -120,7 +118,8 @@
" cluster.scale(1)\n",
"\n",
" print(cluster)\n",
" print(client)"
"\n",
"client"
]
},
{
Expand Down

0 comments on commit 7da2503

Please sign in to comment.