Skip to content

Commit 1d6e59c

Browse files
fix: remove lambda
1 parent 17b2786 commit 1d6e59c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

audio_data_pytorch/datasets/audio_web_dataset.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,10 @@ def identity(x):
157157
return x
158158

159159

160+
def first(x):
161+
return x[0]
162+
163+
160164
class AudioWebDataset(WebDataset):
161165

162166
# Why batch_size in a dataset constructor?
@@ -176,7 +180,7 @@ def __init__(
176180
self.shuffle(shuffle)
177181
.decode(torch_audio)
178182
.to_tuple("wav", "json")
179-
.map_tuple((lambda tuple: tuple[0]), identity)
183+
.map_tuple(first, identity)
180184
)
181185

182186
if exists(transforms):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
setup(
44
name="audio-data-pytorch",
55
packages=find_packages(exclude=[]),
6-
version="0.0.14",
6+
version="0.0.15",
77
license="MIT",
88
description="Audio Data - PyTorch",
99
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)