Skip to content

Commit

Permalink
Merge branch 'main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielmbmb committed Oct 16, 2024
2 parents dc06161 + 844165f commit 2cedc7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/distilabel/mixins/signature.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ def flatten_dump(d: Any, parent_key: str = "", sep: str = "_") -> List:
elif isinstance(v, list):
if len(v) == 0:
items.append((new_key, ""))
elif isinstance(v[0], str):
items.append((new_key, "-".join(v)))
elif isinstance(v[0], (str, float, int, bool)):
items.append((new_key, "-".join(map(str, v))))
else:
for i, x in enumerate(v):
items.extend(flatten_dump(x, f"{new_key}-{i}", sep=sep))
Expand Down

0 comments on commit 2cedc7d

Please sign in to comment.