Skip to content

Commit

Permalink
black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
terrykong committed Apr 22, 2024
1 parent 8503fcf commit 0d46560
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions examples/k8s/create_dask_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def create_cluster(
scheduler_spec["volumes"] = obj_vols
for ctr in scheduler_spec["containers"]:
ctr["volumeMounts"] = obj_vol_mounts

worker_spec["volumes"] = obj_vols
for ctr in worker_spec["containers"]:
ctr["volumeMounts"] = obj_vol_mounts
Expand All @@ -61,8 +61,11 @@ def create_cluster(
if n_cpus_per_worker:
ctr["resources"]["limits"]["cpu"] = str(n_cpus_per_worker)

cluster = KubeCluster(custom_cluster_spec=custom_cluster_spec, shutdown_on_close=False)
print(f'{cluster = }')
cluster = KubeCluster(
custom_cluster_spec=custom_cluster_spec, shutdown_on_close=False
)
print(f"{cluster = }")


if __name__ == "__main__":

Expand All @@ -81,7 +84,9 @@ def parse_pvcs(specs: str) -> dict[str, str]:
parser.add_argument("-w", "--n_workers", type=int, default=2)
parser.add_argument("-g", "--n_gpus_per_worker", type=int, default=None)
parser.add_argument("-c", "--n_cpus_per_worker", type=int, default=None)
parser.add_argument("-i", "--image", type=str, default="nvcr.io/nvidia/nemo:24.01.framework")
parser.add_argument(
"-i", "--image", type=str, default="nvcr.io/nvidia/nemo:24.01.framework"
)
parser.add_argument("-s", "--image_pull_secret", type=str, default=None)
parser.add_argument(
"-p",
Expand Down

0 comments on commit 0d46560

Please sign in to comment.