From dde98b3122ce7bad73fc19f741d474d08ce27e3d Mon Sep 17 00:00:00 2001 From: jnke2016 Date: Wed, 27 Sep 2023 09:22:14 -0700 Subject: [PATCH] create unique token and delete ddf after compute call --- .../structure/graph_implementation/simpleDistributedGraph.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py b/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py index e2424f0211e..2d685a1d62c 100644 --- a/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py +++ b/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py @@ -14,6 +14,7 @@ import gc from typing import Union import warnings +import random import cudf import cupy as cp @@ -181,7 +182,9 @@ def __from_edgelist( workers = _client.scheduler_info()["workers"] # Repartition to 2 partitions per GPU for memory efficient process input_ddf = input_ddf.repartition(npartitions=len(workers) * 2) - input_ddf = input_ddf.map_partitions(lambda df: df.copy()) + input_ddf = input_ddf.map_partitions( + lambda df: df.copy(), token="custom-" + str(random.random()) + ) # The dataframe will be symmetrized iff the graph is undirected # otherwise, the inital dataframe will be returned if edge_attr is not None: