Skip to content

Commit 5f8d2ad

Browse files
authored
Priotitize json (#7476)
priotitize json
1 parent a256b85 commit 5f8d2ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/datasets/load.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ def infer_module_for_data_files_list(
527527
def sort_key(ext_count: tuple[tuple[str, bool], int]) -> tuple[int, bool]:
528528
"""Sort by count and set ".parquet" as the favorite in case of a draw, and ignore metadata files"""
529529
(ext, is_metadata), count = ext_count
530-
return (not is_metadata, count, ext == ".parquet", ext)
530+
return (not is_metadata, count, ext == ".parquet", ext == ".jsonl", ext == ".json", ext == ".csv", ext)
531531

532532
for (ext, _), _ in sorted(extensions_counter.items(), key=sort_key, reverse=True):
533533
if ext in _EXTENSION_TO_MODULE:

0 commit comments

Comments
 (0)