Add back LocalCluster.__repr__.
LocalCluster.__repr__ was removed in
@@ -197,6 +197,13 @@ class LocalCluster(SpecCluster):
)
self.scale(n_workers)
+ def __repr__(self):
+ return "LocalCluster(%r, workers=%d, ncores=%d)" % (
+ self.scheduler_address,
+ len(self.workers),
+ sum(w.ncores for w in self.workers.values()),
+ )
+
def nprocesses_nthreads(n):
"""
