From eeb3c409362f0ae7b59f105c7a068daf2d29b583 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 5 Jan 2024 08:45:22 -0500 Subject: [PATCH] Add quiet parameter to KubeCluster (#840) * Add quiet parameter to KubeCluster * Address feedback --------- Co-authored-by: Jacob Tomlinson --- dask_kubernetes/operator/kubecluster/kubecluster.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dask_kubernetes/operator/kubecluster/kubecluster.py b/dask_kubernetes/operator/kubecluster/kubecluster.py index 575fdef11..d5891ab4a 100644 --- a/dask_kubernetes/operator/kubecluster/kubecluster.py +++ b/dask_kubernetes/operator/kubecluster/kubecluster.py @@ -115,6 +115,9 @@ class KubeCluster(Cluster): used to create the cluster instead of generating one from the other keyword arguments. scheduler_forward_port: int (optional) The port to use when forwarding the scheduler dashboard. Will utilize a random port by default + quiet: bool + If enabled, suppress all printed output. + Defaults to ``False``. **kwargs: dict Additional keyword arguments to pass to LocalCluster @@ -175,6 +178,7 @@ def __init__( jupyter: bool = False, loop: Optional[IOLoop] = None, asynchronous: bool = False, + quiet: bool = False, **kwargs, ): name = dask.config.get("kubernetes.name", override_with=name) @@ -258,7 +262,9 @@ def __init__( self._rich_spinner = Spinner("dots", speed=0.5) self._startup_component_status: dict = {} - super().__init__(name=name, loop=loop, asynchronous=asynchronous, **kwargs) + super().__init__( + name=name, loop=loop, asynchronous=asynchronous, quiet=quiet, **kwargs + ) # If https://github.com/dask/distributed/pull/7941 is merged we can # simplify the next 8 lines to ``if not self.called_from_running_loop:``