returnn 1.20250416.132454__py3-none-any.whl → 1.20250416.172956__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of returnn might be problematic. Click here for more details.
- returnn/PKG-INFO +1 -1
- returnn/_setup_info_generated.py +2 -2
- returnn/datasets/basic.py +3 -5
- returnn/datasets/hdf.py +12 -2
- returnn/datasets/postprocessing.py +7 -0
- {returnn-1.20250416.132454.dist-info → returnn-1.20250416.172956.dist-info}/METADATA +1 -1
- {returnn-1.20250416.132454.dist-info → returnn-1.20250416.172956.dist-info}/RECORD +10 -10
- {returnn-1.20250416.132454.dist-info → returnn-1.20250416.172956.dist-info}/LICENSE +0 -0
- {returnn-1.20250416.132454.dist-info → returnn-1.20250416.172956.dist-info}/WHEEL +0 -0
- {returnn-1.20250416.132454.dist-info → returnn-1.20250416.172956.dist-info}/top_level.txt +0 -0
returnn/PKG-INFO
CHANGED
returnn/_setup_info_generated.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
version = '1.20250416.
|
|
2
|
-
long_version = '1.20250416.
|
|
1
|
+
version = '1.20250416.172956'
|
|
2
|
+
long_version = '1.20250416.172956+git.505963b'
|
returnn/datasets/basic.py
CHANGED
|
@@ -864,18 +864,16 @@ class Dataset:
|
|
|
864
864
|
data = self.get_data(seq_idx, key)
|
|
865
865
|
return data[s0_start:s0_end]
|
|
866
866
|
|
|
867
|
-
def get_tag(self, sorted_seq_idx):
|
|
867
|
+
def get_tag(self, sorted_seq_idx: int) -> str:
|
|
868
868
|
"""
|
|
869
|
-
:param
|
|
870
|
-
:rtype: str
|
|
869
|
+
:param sorted_seq_idx:
|
|
871
870
|
"""
|
|
872
871
|
return "seq-%i" % sorted_seq_idx
|
|
873
872
|
|
|
874
|
-
def get_all_tags(self):
|
|
873
|
+
def get_all_tags(self) -> List[str]:
|
|
875
874
|
"""
|
|
876
875
|
:return: list of all seq tags, of the whole dataset, without partition epoch.
|
|
877
876
|
Note that this is not possible with all datasets.
|
|
878
|
-
:rtype: list[str]
|
|
879
877
|
"""
|
|
880
878
|
raise OptionalNotImplementedError(f"{self} get_all_tags not implemented")
|
|
881
879
|
|
returnn/datasets/hdf.py
CHANGED
|
@@ -1201,6 +1201,7 @@ class SimpleHDFWriter:
|
|
|
1201
1201
|
shape = [None] * ndim # type: typing.List[typing.Optional[int]]
|
|
1202
1202
|
if ndim >= 2:
|
|
1203
1203
|
shape[-1] = dim
|
|
1204
|
+
assert all(shape[1:]), f"{self} extra {data_key!r} supports only dyn dim in first axis, got shape {shape!r}"
|
|
1204
1205
|
if dtype == "string":
|
|
1205
1206
|
# noinspection PyUnresolvedReferences
|
|
1206
1207
|
dtype = h5py.special_dtype(vlen=str)
|
|
@@ -1237,10 +1238,15 @@ class SimpleHDFWriter:
|
|
|
1237
1238
|
self._datasets[name] = self._file.create_dataset(
|
|
1238
1239
|
name, raw_data.shape, raw_data.dtype, maxshape=tuple(None for _ in raw_data.shape)
|
|
1239
1240
|
)
|
|
1241
|
+
expected_shape = (raw_data.shape[0],) + self._datasets[name].shape[1:]
|
|
1240
1242
|
else:
|
|
1241
1243
|
old_shape = self._datasets[name].shape
|
|
1242
1244
|
self._datasets[name].resize(old_shape[0] + raw_data.shape[0], axis=0)
|
|
1245
|
+
expected_shape = (raw_data.shape[0],) + old_shape[1:]
|
|
1243
1246
|
# append raw data to dataset
|
|
1247
|
+
assert (
|
|
1248
|
+
expected_shape == raw_data.shape
|
|
1249
|
+
), f"{self} insert: shape mismatch: expected {expected_shape}, got {raw_data.shape}"
|
|
1244
1250
|
self._datasets[name][self._file.attrs["numTimesteps"] :] = raw_data
|
|
1245
1251
|
self._file.attrs["numTimesteps"] += raw_data.shape[0]
|
|
1246
1252
|
self._file.attrs["numSeqs"] += 1
|
|
@@ -1286,13 +1292,17 @@ class SimpleHDFWriter:
|
|
|
1286
1292
|
self._seq_lengths[seq_idx, data_key_idx_0 + 1] = self._extra_num_time_steps[data_key_]
|
|
1287
1293
|
|
|
1288
1294
|
self._extra_num_time_steps[data_key] += raw_data.shape[0]
|
|
1289
|
-
self._datasets[data_key]
|
|
1295
|
+
hdf_data = self._datasets[data_key]
|
|
1296
|
+
hdf_data.resize(self._extra_num_time_steps[data_key], axis=0)
|
|
1290
1297
|
|
|
1291
1298
|
data_key_idx = sorted(self._prepared_extra).index(data_key) + 1
|
|
1292
1299
|
self._seq_lengths[seq_idx, data_key_idx] = raw_data.shape[0]
|
|
1293
1300
|
|
|
1294
1301
|
offset = self._extra_num_time_steps[data_key] - raw_data.shape[0]
|
|
1295
|
-
|
|
1302
|
+
expected_shape = (raw_data.shape[0],) + hdf_data.shape[1:]
|
|
1303
|
+
assert (
|
|
1304
|
+
expected_shape == raw_data.shape
|
|
1305
|
+
), f"{self} insert other {data_key!r}: shape mismatch: expected {expected_shape}, got {raw_data.shape}"
|
|
1296
1306
|
hdf_data[offset:] = raw_data
|
|
1297
1307
|
|
|
1298
1308
|
def insert_batch(self, inputs, seq_len, seq_tag, extra=None):
|
|
@@ -243,6 +243,13 @@ class PostprocessingDataset(CachedDataset2):
|
|
|
243
243
|
assert self._dataset is not None
|
|
244
244
|
return self._dataset.get_total_num_seqs(fast=fast)
|
|
245
245
|
|
|
246
|
+
def get_all_tags(self) -> List[str]:
|
|
247
|
+
""":return: all tags"""
|
|
248
|
+
if self._map_seq_stream is not None:
|
|
249
|
+
raise util.OptionalNotImplementedError(f"{self}: get_all_tags not allowed when map_seq_stream is set.")
|
|
250
|
+
assert self._dataset is not None
|
|
251
|
+
return self._dataset.get_all_tags()
|
|
252
|
+
|
|
246
253
|
def supports_sharding(self) -> bool:
|
|
247
254
|
""":return: whether this dataset supports sharding"""
|
|
248
255
|
assert self._dataset is not None
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
returnn/PKG-INFO,sha256=
|
|
1
|
+
returnn/PKG-INFO,sha256=y5t_H0i0pLYw-W1KevNnfXbSxkrkqPT2uFYpKMGhS3o,5215
|
|
2
2
|
returnn/__init__.py,sha256=biBtRsM0WZ406vShaeH-9WFoqJ8XwTbn6g0EeFJ7l8E,1012
|
|
3
3
|
returnn/__main__.py,sha256=qBFbuB1yN3adgVM5pXt2-Yq9vorjRNchNPL8kDKx44M,31752
|
|
4
4
|
returnn/__old_mod_loader__.py,sha256=nvsNY-xELdS_IPNkv66Q9Rmvg4dbGW0-EBRDcCmctos,7654
|
|
5
5
|
returnn/__setup__.py,sha256=22kQn2fh11iPM0hLb2Fy5sLmoU1JGvmDxXRYuRgQkwU,4659
|
|
6
|
-
returnn/_setup_info_generated.py,sha256=
|
|
6
|
+
returnn/_setup_info_generated.py,sha256=AcoND8SAX3c8L8MOr-ar4L8QEmAQF2emtFz2sd2BL5I,77
|
|
7
7
|
returnn/config.py,sha256=3tmKhB6FnQZaNdtcYsiB61JnEY--iZ2qmJ4yq0b6tE0,29140
|
|
8
8
|
returnn/forward_iface.py,sha256=A_OJiaXsX4MlXQRzST86ylyxSUZbC402PQL1REcqHjM,911
|
|
9
9
|
returnn/learning_rate_control.py,sha256=ZvWryAn_tv9DhV8sh1LV3eE34Yltl3On3mYZAG4hR9s,34684
|
|
@@ -13,20 +13,20 @@ returnn/native_op.py,sha256=yqpE7SqBqXq77FCVnWMloUwadWlslEk-VzdK7FMpt_U,244411
|
|
|
13
13
|
returnn/pretrain.py,sha256=MHiXJZqkQFmDVyaYsGpd_Acv20wxl7Pr6s6qJzAT2FI,22648
|
|
14
14
|
returnn/datasets/__init__.py,sha256=PvDlfDOaaopIeUIt0OSvHD2eHZkdkyE-sjMXf35EH5U,390
|
|
15
15
|
returnn/datasets/audio.py,sha256=Gmj7a08dnvYh7Z-G1TNapz42L50AIcDE9JeIZaO1s1M,23334
|
|
16
|
-
returnn/datasets/basic.py,sha256=
|
|
16
|
+
returnn/datasets/basic.py,sha256=BBDXCqesUBJ-4HsaT4zw3wzkS1kd15FDy0OX8TY10pQ,72275
|
|
17
17
|
returnn/datasets/bundle_file.py,sha256=KQNrS1MSf-4_idlK0c0KFwON-f5sEK0sWU15WpoMYpE,2380
|
|
18
18
|
returnn/datasets/cached.py,sha256=DIRdWrxBmsZG8O_9eVxBO5mcdo4f5KU-Xb-4wVz59Io,25418
|
|
19
19
|
returnn/datasets/cached2.py,sha256=_6pza3IG68JexaExhj1ld3fP6pE7T-G804driJ9Z_qo,12141
|
|
20
20
|
returnn/datasets/distrib_files.py,sha256=_UlcrnaU1rA9v6D3H3X4dPhcA--09fNeVnWs9VNo0yg,27656
|
|
21
21
|
returnn/datasets/generating.py,sha256=O1fs9dhk1Um2E3ZeOTfDHS5FlwvqFImfGcMlJP-xAQM,99814
|
|
22
|
-
returnn/datasets/hdf.py,sha256=
|
|
22
|
+
returnn/datasets/hdf.py,sha256=yqzr-nzqlt02QZoW2uFowKT19gd5e-9mJpHCKSQxW8o,67643
|
|
23
23
|
returnn/datasets/lm.py,sha256=5hSdBgmgTP0IzO2p-JjiWtny0Zb0M20goXtjlw4JVR4,99206
|
|
24
24
|
returnn/datasets/map.py,sha256=kOBJVZmwDhLsOplzDNByIfa0NRSUaMo2Lsy36lBvxrM,10907
|
|
25
25
|
returnn/datasets/meta.py,sha256=0wQzRzjShLSYNFoGo_MdR5IT8arxHr9gFjUlEqb2rbY,94969
|
|
26
26
|
returnn/datasets/multi_proc.py,sha256=aVjsLt2qjHnHOrEYCgIPCwNYE-f1fiGP6eZ8NGAr3A4,22583
|
|
27
27
|
returnn/datasets/normalization_data.py,sha256=wOHrbO3612uWXpzLHHxksDw0qeVmQ42w7byBL9QMh9Q,14618
|
|
28
28
|
returnn/datasets/numpy_dump.py,sha256=wl8bKIKAlff2HPJPtuu5wBg3TLOf16d2wLVB4lLAwTM,5158
|
|
29
|
-
returnn/datasets/postprocessing.py,sha256=
|
|
29
|
+
returnn/datasets/postprocessing.py,sha256=dXlRiZNuC8921RZ3lkgX1Lt88K61lKsG47nVIH5x7nI,23395
|
|
30
30
|
returnn/datasets/raw_wav.py,sha256=M7eTHp4CTtLQf3yPTiJY-mSJYgZNxkGV9IFN9J1dq_4,9144
|
|
31
31
|
returnn/datasets/sprint.py,sha256=YhhdNbBTuL_HCc3asgK3o6vgq5h5nMPH5nBFvsuwVjA,55464
|
|
32
32
|
returnn/datasets/stereo.py,sha256=PkowC91bZWihIYuIZgyGgPcNwgq5jBvyxxu1nER-VhM,17633
|
|
@@ -253,8 +253,8 @@ returnn/util/sig_proc.py,sha256=Tjz0VOAVyqu2qDCF5HZ1JjALjcFsHcNkcd96WgZeKfE,7265
|
|
|
253
253
|
returnn/util/task_system.py,sha256=y4sMVXQ25Qd2z0rx03uOlXlkE-jbCYC1Sjfn-XlraVU,26003
|
|
254
254
|
returnn/util/train_proc_manager.py,sha256=Pjht28k6uz6BNQ47uW6Gf880iyq5q4wx7P_K2tmoAM8,3266
|
|
255
255
|
returnn/util/watch_memory.py,sha256=BR5P2kvBN6UI81cE0_1WAA6Hd1SByLbBaiDxvLhPOew,4213
|
|
256
|
-
returnn-1.20250416.
|
|
257
|
-
returnn-1.20250416.
|
|
258
|
-
returnn-1.20250416.
|
|
259
|
-
returnn-1.20250416.
|
|
260
|
-
returnn-1.20250416.
|
|
256
|
+
returnn-1.20250416.172956.dist-info/LICENSE,sha256=ywBD_U2aD4vpuoIgNAsjIGBYydl0tVKll3De0Z8s77c,11041
|
|
257
|
+
returnn-1.20250416.172956.dist-info/METADATA,sha256=y5t_H0i0pLYw-W1KevNnfXbSxkrkqPT2uFYpKMGhS3o,5215
|
|
258
|
+
returnn-1.20250416.172956.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
|
|
259
|
+
returnn-1.20250416.172956.dist-info/top_level.txt,sha256=Lsn4WZc5Pbfk0-xDQOgnFCxOoqxL4CyeM3N1TFbJncw,8
|
|
260
|
+
returnn-1.20250416.172956.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|