returnn 1.20250418.115249__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.20250418.115249
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.20250418.115249'
2
- long_version = '1.20250418.115249+git.3cef372'
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
  """
returnn/util/basic.py CHANGED
@@ -3673,10 +3673,14 @@ def get_hostname():
3673
3673
 
3674
3674
  def is_running_on_cluster():
3675
3675
  """
3676
- :return: i6 specific. Whether we run on some of the cluster nodes.
3676
+ :return: i6 / Slurm specific. Whether we run on some of the cluster nodes.
3677
3677
  :rtype: bool
3678
3678
  """
3679
- return get_hostname().startswith("cluster-cn-") or get_hostname().startswith("cn-")
3679
+ return (
3680
+ get_hostname().startswith("cluster-cn-")
3681
+ or get_hostname().startswith("cn-")
3682
+ or os.environ.get("SLURM_JOB_ID", None)
3683
+ )
3680
3684
 
3681
3685
 
3682
3686
  start_time = time.time()
@@ -4285,7 +4289,7 @@ def cf(filename):
4285
4289
  return filename # for debugging
4286
4290
  try:
4287
4291
  cached_fn = check_output(["cf", filename]).strip().decode("utf8")
4288
- except CalledProcessError:
4292
+ except (CalledProcessError, OSError):
4289
4293
  if not _cf_msg_printed:
4290
4294
  print("Cache manager: Error occurred, using local file")
4291
4295
  _cf_msg_printed = True
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: returnn
3
- Version: 1.20250418.115249
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=vWxYPYgsvU3GDUCQEiHY5h2C09lxsFvZ-GUR6jfYUxM,5215
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=oEWWbm7JJwkhmRryz4mvP5IIrbCPVx8zczj4izvepn0,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
@@ -233,7 +233,7 @@ returnn/torch/util/gradient_checkpoint.py,sha256=iLy-FB65DC8O6LxzmMvFjnSdpIVpko8
233
233
  returnn/torch/util/module.py,sha256=MXHIrF9Isu575DDJIa81212ULKwdqu1oOLxDVZecVSk,1693
234
234
  returnn/torch/util/scaled_gradient.py,sha256=3585VuNypBty-pW6r3BKK047H3MqZQSdMjXeYAb4cmU,3192
235
235
  returnn/util/__init__.py,sha256=UIG1qw4idqhW71BV60ha7h9PktxvEVcBIu0lYRossK8,336
236
- returnn/util/basic.py,sha256=rzTfLAkX5IdC-L3xImNrSTRtB1dWRMHzrCridqrWXKI,142386
236
+ returnn/util/basic.py,sha256=F5UZws8FR7-ger8T-pkXV83C_9IlYsUk7H85TujK0Xk,142477
237
237
  returnn/util/better_exchook.py,sha256=TAtb_ZyM-357UnOg_HMoBZUSxzt0WPgumlvprmlCprA,63921
238
238
  returnn/util/bpe.py,sha256=LWFhICZsEOnMwNws0lybPNzKRX6rSr8yKCvP65vjl9Y,19656
239
239
  returnn/util/debug.py,sha256=wuRzdg9zB84WWCGyTjmRR_zYypu8gXxlc0nZ6si9OC8,28224
@@ -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.20250418.115249.dist-info/LICENSE,sha256=ywBD_U2aD4vpuoIgNAsjIGBYydl0tVKll3De0Z8s77c,11041
257
- returnn-1.20250418.115249.dist-info/METADATA,sha256=vWxYPYgsvU3GDUCQEiHY5h2C09lxsFvZ-GUR6jfYUxM,5215
258
- returnn-1.20250418.115249.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
259
- returnn-1.20250418.115249.dist-info/top_level.txt,sha256=Lsn4WZc5Pbfk0-xDQOgnFCxOoqxL4CyeM3N1TFbJncw,8
260
- returnn-1.20250418.115249.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,,