Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transmit verbosity level to Dask workers #5062

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions python/cuml/dask/cluster/dbscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ def __init__(self, *, client=None, verbose=False, **kwargs):
@staticmethod
@mnmg_import
def _func_fit(out_dtype):
def _func(sessionId, data, verbose, **kwargs):
def _func(sessionId, data, **kwargs):
from cuml.cluster.dbscan_mg import DBSCANMG as cumlDBSCAN
handle = get_raft_comm_state(sessionId)["handle"]

return cumlDBSCAN(handle=handle, verbose=verbose, **kwargs
return cumlDBSCAN(handle=handle, **kwargs
).fit(data, out_dtype=out_dtype)
return _func

Expand Down Expand Up @@ -118,7 +118,6 @@ def fit(self, X, out_dtype="int32"):
dbscan_fit = [self.client.submit(DBSCAN._func_fit(out_dtype),
comms.sessionId,
data,
self.verbose,
**self.kwargs,
workers=[worker],
pure=False)
Expand Down
5 changes: 5 additions & 0 deletions python/cuml/dask/common/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ def __init__(self, *, client=None, verbose=False, **kwargs):
Constructor for distributed estimators.
"""
self.client = get_client(client)

# set client verbosity
self.verbose = verbose

# kwargs transmits the verbosity level to workers
kwargs["verbose"] = verbose
self.kwargs = kwargs

self.internal_model = None
Expand Down