Skip to content

Commit

Permalink
Add comment explaining the special handling of single element lists
Browse files Browse the repository at this point in the history
  • Loading branch information
dagardner-nv committed Jan 6, 2024
1 parent 074081e commit 3a822c7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions morpheus/modules/payload_batcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ def _batch_dataframe_by_group(df: cudf.DataFrame) -> typing.List[cudf.DataFrame]
df[period_column] = df[period_column].to_pandas().dt.to_period(period).astype('str')

if len(group_by_columns) == 1:
# Avoid warning from cudf regardning an upcoming change of behavior when applying a groupby to a single
# element list.
group_by_columns_ = group_by_columns[0]
else:
group_by_columns_ = group_by_columns
Expand Down

0 comments on commit 3a822c7

Please sign in to comment.