returnn 1.20250419.437__py3-none-any.whl → 1.20250421.5132__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 CHANGED
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: returnn
3
- Version: 1.20250419.437
3
+ Version: 1.20250421.5132
4
4
  Summary: The RWTH extensible training framework for universal recurrent neural networks
5
5
  Home-page: https://github.com/rwth-i6/returnn/
6
6
  Author: Albert Zeyer
@@ -1,2 +1,2 @@
1
- version = '1.20250419.000437'
2
- long_version = '1.20250419.000437+git.9b2d229'
1
+ version = '1.20250421.005132'
2
+ long_version = '1.20250421.005132+git.c90b436'
returnn/datasets/meta.py CHANGED
@@ -312,10 +312,7 @@ class MetaDataset(CachedDataset2):
312
312
  try:
313
313
  seq_list = default_dataset.get_all_tags()
314
314
  except NotImplementedError:
315
- raise NotImplementedError(
316
- "Unsupported %s used as default in MetaDataset."
317
- " Only datasets with known and tagged sequences can be used." % type(default_dataset)
318
- )
315
+ raise NotImplementedError(f"{default_dataset}.get_all_tags() required by {self}, but not implemented.")
319
316
 
320
317
  # Catch index out of bounds errors.
321
318
  # Whether the tags are actually valid will be checked in _check_dataset_seq().
@@ -1858,12 +1855,14 @@ class VariableDataset(Dataset):
1858
1855
  based on a user-provided function.
1859
1856
  """
1860
1857
 
1861
- def __init__(self, *, get_dataset, dataset_lru_cache_size: int = 1, **kwargs):
1858
+ def __init__(self, *, get_dataset, dataset_lru_cache_size: int = 1, always_same_tags: bool = False, **kwargs):
1862
1859
  """
1863
1860
  :param get_dataset: function (*, epoch: int, **_) -> Dict[str,Any], will be called for every sub-epoch.
1864
1861
  It will cache the dataset(s) from the prev call (dataset_lru_cache_size),
1865
1862
  and if the dict is the same of those, it will not recreate the dataset.
1866
- :param dataset_lru_cache_size
1863
+ :param dataset_lru_cache_size:
1864
+ :param always_same_tags: whether all the datasets returned by ``get_dataset`` will have the same tags
1865
+ (same :func:`get_all_tags`).
1867
1866
  """
1868
1867
  from functools import lru_cache
1869
1868
 
@@ -1872,6 +1871,7 @@ class VariableDataset(Dataset):
1872
1871
  self._dataset_dict: Optional[Dict[str, Any]] = None
1873
1872
  self._dataset: Optional[Dataset] = None
1874
1873
  self._dataset_lru_cache_size = dataset_lru_cache_size
1874
+ self._always_same_tags = always_same_tags
1875
1875
  self._make_dataset = lru_cache(maxsize=self._dataset_lru_cache_size)(
1876
1876
  lambda dataset_dict: init_dataset(dataset_dict, parent_dataset=self)
1877
1877
  )
@@ -1979,6 +1979,12 @@ class VariableDataset(Dataset):
1979
1979
  """is data sparse"""
1980
1980
  return self._dataset.is_data_sparse(key)
1981
1981
 
1982
+ def get_all_tags(self) -> List[str]:
1983
+ """all tags"""
1984
+ if self._always_same_tags:
1985
+ return self._dataset.get_all_tags()
1986
+ raise OptionalNotImplementedError(f"{self}.get_all_tags(): always_same_tags=False, thus could be inconsistent")
1987
+
1982
1988
 
1983
1989
  class MultiEpochDataset(CachedDataset2):
1984
1990
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: returnn
3
- Version: 1.20250419.437
3
+ Version: 1.20250421.5132
4
4
  Summary: The RWTH extensible training framework for universal recurrent neural networks
5
5
  Home-page: https://github.com/rwth-i6/returnn/
6
6
  Author: Albert Zeyer
@@ -1,9 +1,9 @@
1
- returnn/PKG-INFO,sha256=q_DOvayNx8gWCJJpWT86Cwo2mEzBZqb3JBY11XUYfdM,5212
1
+ returnn/PKG-INFO,sha256=OSP8W77Tq_qY5jAtKqcRmNhqW8OlDWCAWtSb7SlcCzU,5213
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=OrNz_FVD9HOeg66IVS8yNSvzOafmJfvFuKAPZY2nINs,77
6
+ returnn/_setup_info_generated.py,sha256=H-jY5CU-_qEI26JD-eey6Pdpp-4t8u0wTnj2gakdhe8,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
@@ -22,7 +22,7 @@ returnn/datasets/generating.py,sha256=E_6KpnSu8ChqG3pb4VTChWDsBTonIwFFAj53SI9NSo
22
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
- returnn/datasets/meta.py,sha256=0wQzRzjShLSYNFoGo_MdR5IT8arxHr9gFjUlEqb2rbY,94969
25
+ returnn/datasets/meta.py,sha256=EySwPQUqIAzvocAoSpMxszHbymXjJeCSGhDn0T1BO-0,95355
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
@@ -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.20250419.437.dist-info/LICENSE,sha256=ywBD_U2aD4vpuoIgNAsjIGBYydl0tVKll3De0Z8s77c,11041
257
- returnn-1.20250419.437.dist-info/METADATA,sha256=q_DOvayNx8gWCJJpWT86Cwo2mEzBZqb3JBY11XUYfdM,5212
258
- returnn-1.20250419.437.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
259
- returnn-1.20250419.437.dist-info/top_level.txt,sha256=Lsn4WZc5Pbfk0-xDQOgnFCxOoqxL4CyeM3N1TFbJncw,8
260
- returnn-1.20250419.437.dist-info/RECORD,,
256
+ returnn-1.20250421.5132.dist-info/LICENSE,sha256=ywBD_U2aD4vpuoIgNAsjIGBYydl0tVKll3De0Z8s77c,11041
257
+ returnn-1.20250421.5132.dist-info/METADATA,sha256=OSP8W77Tq_qY5jAtKqcRmNhqW8OlDWCAWtSb7SlcCzU,5213
258
+ returnn-1.20250421.5132.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
259
+ returnn-1.20250421.5132.dist-info/top_level.txt,sha256=Lsn4WZc5Pbfk0-xDQOgnFCxOoqxL4CyeM3N1TFbJncw,8
260
+ returnn-1.20250421.5132.dist-info/RECORD,,