Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/datasets/packaged_modules/webdataset/webdataset.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import io
import json
import os
from itertools import islice
from typing import Any, Callable, Dict, List

Expand All @@ -24,7 +25,8 @@ def _get_pipeline_from_tar(cls, tar_path, tar_iterator):
current_example = {}
for filename, f in tar_iterator:
if "." in filename:
example_key, field_name = filename.split(".", 1)
example_key, field_name = os.path.splitext(filename)
field_name = field_name.lstrip(".")
if current_example and current_example["__key__"] != example_key:
yield current_example
current_example = {}
Expand Down