mirror of
https://github.com/BillyOutlast/flash-attention-prebuild-wheels-rocm.git
synced 2026-06-30 20:08:11 -04:00
fix: resolve pandas 3.0 StringDtype compatibility issue
Return pd.Series with object dtype instead of modifying Series in-place to avoid "setting an array element with a sequence" error when running with pandas 3.0.0 in CI.
This commit is contained in:
+3
-7
@@ -303,13 +303,9 @@ def merge_duplicate_rows(df: pd.DataFrame) -> pd.DataFrame:
|
||||
seen.add(pkg)
|
||||
unique_packages.append(pkg)
|
||||
|
||||
# Take the first row as base
|
||||
result = group.iloc[0].copy()
|
||||
|
||||
# Combine packages into a list
|
||||
result["package"] = unique_packages if unique_packages else [None]
|
||||
|
||||
return result
|
||||
# Return as a Series with object dtype to avoid pandas 3.0 StringDtype issues
|
||||
packages = unique_packages if unique_packages else [None]
|
||||
return pd.Series({"package": packages}, dtype=object)
|
||||
|
||||
# Group and combine
|
||||
merged_df = df.groupby(group_cols, as_index=False).apply(
|
||||
|
||||
Reference in New Issue
Block a user