@with_cupy_rmm
def fit(self, X):
    '\n        Fit a multi-node multi-GPU KMeans model\n\n        Parameters\n        ----------\n        X : Dask cuDF DataFrame or CuPy backed Dask Array\n        Training data to cluster.\n\n        '
    data = DistributedDataHandler.create(X, client=self.client)
    self.datatype = data.datatype
    comms = CommsContext(comms_p2p=False)
    comms.init(workers=data.workers)
    kmeans_fit = [self.client.submit(KMeans._func_fit, comms.sessionId, wf[1], self.datatype, **self.kwargs, workers=[wf[0]], pure=False) for (idx, wf) in enumerate(data.worker_to_parts.items())]
    wait(kmeans_fit)
    raise_exception_from_futures(kmeans_fit)
    comms.destroy()
    self.local_model = kmeans_fit[0].result()
    self.cluster_centers_ = self.local_model.cluster_centers_
    return self
Fit a multi-node multi-GPU KMeans model

Parameters
----------
X : Dask cuDF DataFrame or CuPy backed Dask Array
Training data to cluster.
@with_cupy_rmm
def fit(self, X):
    '\n        Fit a multi-node multi-GPU KMeans model\n\n        Parameters\n        ----------\n        X : Dask cuDF DataFrame or CuPy backed Dask Array\n        Training data to cluster.\n\n        '
    data = DistributedDataHandler.create(X, client=self.client)
    self.datatype = data.datatype
    comms = CommsContext(comms_p2p=False)
    comms.init(workers=data.workers)
    kmeans_fit = [self.client.submit(KMeans._func_fit, comms.sessionId, wf[1], self.datatype, **self.kwargs, workers=[wf[0]], pure=False) for (idx, wf) in enumerate(data.worker_to_parts.items())]
    wait(kmeans_fit)
    raise_exception_from_futures(kmeans_fit)
    comms.destroy()
    self.local_model = kmeans_fit[0].result()
    self.cluster_centers_ = self.local_model.cluster_centers_
    return self