Skip to content

Commit

Permalink
simplify sort_values call
Browse files Browse the repository at this point in the history
  • Loading branch information
rjzamora committed Apr 17, 2024
1 parent 700b196 commit e22a836
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions nvtabular/ops/categorify.py
Original file line number Diff line number Diff line change
Expand Up @@ -1251,13 +1251,7 @@ def _drop_first_row(part, index):
if has_size:
# Avoid using dask_cudf to calculate divisions
# (since it may produce too-few partitions)
df = df.sort_values(
name_size,
ascending=False,
divisions=dd.shuffle._calculate_divisions(
df, df[name_size], False, df.npartitions
)[0][::-1],
)
df = df.sort_values(name_size, ascending=False)

unique_path = _save_encodings(
df,
Expand Down

0 comments on commit e22a836

Please sign in to comment.