Skip to content

Commit

Permalink
create unique token and delete ddf after compute call
Browse files Browse the repository at this point in the history
  • Loading branch information
jnke2016 committed Sep 27, 2023
1 parent 9b5635d commit dde98b3
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import gc
from typing import Union
import warnings
import random

import cudf
import cupy as cp
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit dde98b3

Please sign in to comment.