returnn 1.20250227.110407__tar.gz → 1.20251105.112921__tar.gz

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.

Files changed (481) hide show
  1. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/CONTRIBUTING.md +1 -1
  2. {returnn-1.20250227.110407/returnn.egg-info → returnn-1.20251105.112921}/PKG-INFO +1 -1
  3. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/__init__.py +0 -1
  4. returnn-1.20251105.112921/_setup_info_generated.py +2 -0
  5. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-tf-search-compiled-graph.py +6 -8
  6. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/pyproject.toml +4 -0
  7. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/__main__.py +7 -7
  8. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/config.py +1 -1
  9. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/datasets/basic.py +81 -56
  10. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/datasets/cached.py +4 -3
  11. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/datasets/cached2.py +2 -10
  12. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/datasets/distrib_files.py +132 -25
  13. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/datasets/generating.py +35 -44
  14. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/datasets/hdf.py +23 -5
  15. returnn-1.20251105.112921/returnn/datasets/huggingface.py +434 -0
  16. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/datasets/lm.py +81 -23
  17. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/datasets/meta.py +153 -69
  18. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/datasets/multi_proc.py +6 -5
  19. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/datasets/normalization_data.py +1 -1
  20. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/datasets/postprocessing.py +31 -16
  21. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/datasets/sprint.py +8 -7
  22. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/datasets/text_dict.py +1 -1
  23. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/datasets/util/strings.py +0 -1
  24. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/datasets/util/vocabulary.py +158 -20
  25. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/graph_editor/subgraph.py +1 -2
  26. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/graph_editor/transform.py +1 -2
  27. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/graph_editor/util.py +1 -2
  28. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/_backend.py +22 -6
  29. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/_cache.py +4 -2
  30. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/_native/module.cpp +2 -0
  31. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/_native/module.hpp +1 -0
  32. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/_native/tensor_ops.cpp +1 -0
  33. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/_utils.py +1 -1
  34. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/array_.py +121 -23
  35. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/attention.py +1 -0
  36. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/audio/mel.py +0 -1
  37. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/audio/specaugment.py +5 -3
  38. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/const.py +3 -3
  39. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/conv.py +181 -24
  40. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/decoder/transformer.py +45 -19
  41. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/device.py +0 -1
  42. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/dims.py +26 -10
  43. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/dropout.py +2 -2
  44. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/encoder/conformer.py +39 -9
  45. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/encoder/e_branchformer.py +1 -1
  46. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/hooks.py +3 -3
  47. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/loop.py +22 -8
  48. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/loss.py +0 -1
  49. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/math_.py +13 -1
  50. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/matmul.py +0 -1
  51. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/module.py +8 -1
  52. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/nested.py +127 -2
  53. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/normalization.py +4 -3
  54. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/parameter.py +8 -1
  55. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/parametrizations.py +2 -2
  56. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/rand.py +14 -0
  57. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/rec.py +4 -1
  58. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/reduce.py +8 -2
  59. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/run_ctx.py +62 -21
  60. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/signal.py +1 -2
  61. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/types.py +2 -4
  62. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/native_op.py +13 -0
  63. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/sprint/cache.py +2 -4
  64. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/sprint/interface.py +3 -4
  65. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tensor/_dim_extra.py +386 -568
  66. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tensor/_tensor_extra.py +26 -20
  67. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tensor/_tensor_op_overloads.py +0 -1
  68. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tensor/tensor.py +1 -1
  69. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tensor/tensor_dict.py +9 -9
  70. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/engine.py +60 -65
  71. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/frontend_layers/_backend.py +12 -5
  72. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/frontend_layers/cond.py +6 -6
  73. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/frontend_layers/debug_eager_mode.py +0 -1
  74. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/frontend_layers/layer.py +12 -12
  75. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/frontend_layers/loop.py +3 -3
  76. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/frontend_layers/make_layer.py +0 -1
  77. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/frontend_low_level/_backend.py +15 -0
  78. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/layers/base.py +56 -49
  79. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/layers/basic.py +196 -105
  80. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/layers/rec.py +74 -74
  81. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/native_op.py +1 -3
  82. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/network.py +60 -57
  83. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/updater.py +3 -3
  84. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/util/basic.py +27 -25
  85. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/torch/data/extern_data.py +9 -6
  86. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/torch/data/pipeline.py +43 -7
  87. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/torch/data/returnn_dataset_wrapper.py +9 -3
  88. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/torch/distributed.py +18 -5
  89. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/torch/engine.py +161 -87
  90. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/torch/frontend/_backend.py +66 -30
  91. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/torch/frontend/bridge.py +3 -3
  92. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/torch/updater.py +104 -41
  93. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/torch/util/debug_inf_nan.py +0 -2
  94. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/torch/util/diagnose_gpu.py +65 -31
  95. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/torch/util/exception_helper.py +1 -1
  96. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/torch/util/scaled_gradient.py +0 -1
  97. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/util/basic.py +82 -50
  98. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/util/better_exchook.py +259 -110
  99. returnn-1.20251105.112921/returnn/util/collect_outputs_dict.py +79 -0
  100. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/util/file_cache.py +192 -67
  101. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/util/lru_cache.py +1 -1
  102. {returnn-1.20250227.110407 → returnn-1.20251105.112921/returnn.egg-info}/PKG-INFO +1 -1
  103. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn.egg-info/SOURCES.txt +4 -0
  104. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/_setup_test_env.py +0 -1
  105. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/pycharm-inspect.py +35 -4
  106. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/rf_utils.py +33 -9
  107. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_Dataset.py +248 -7
  108. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_HDFDataset.py +75 -0
  109. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_TFNativeOp.py +2 -6
  110. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_TFNetworkLayer.py +3 -3
  111. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_TFNetworkRecLayer.py +5 -7
  112. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_TFUtil.py +1 -70
  113. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_TranslationDataset.py +8 -11
  114. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_Util.py +6 -2
  115. returnn-1.20251105.112921/tests/test_datasets_huggingface.py +201 -0
  116. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_rf_array.py +44 -3
  117. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_rf_attention.py +2 -2
  118. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_rf_base.py +60 -0
  119. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_rf_cond.py +85 -13
  120. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_rf_conv.py +110 -27
  121. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_rf_decoder_transformer.py +245 -0
  122. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_rf_encoder_conformer.py +136 -25
  123. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_rf_loop.py +21 -10
  124. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_rf_math.py +18 -0
  125. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_rf_normalization.py +10 -1
  126. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_rf_rec.py +12 -16
  127. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_rf_signal.py +34 -0
  128. returnn-1.20251105.112921/tests/test_tensor.py +189 -0
  129. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_torch_engine.py +122 -0
  130. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_torch_frontend.py +1 -3
  131. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/dump-dataset.py +15 -9
  132. returnn-1.20251105.112921/tools/file-cache.py +109 -0
  133. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/hdf_dump_translation_dataset.py +9 -11
  134. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/tf_avg_checkpoints.py +1 -1
  135. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/tf_inspect_checkpoint.py +1 -1
  136. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/torch_export_to_onnx.py +12 -12
  137. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/torch_scale_tuning.py +2 -2
  138. returnn-1.20250227.110407/_setup_info_generated.py +0 -2
  139. returnn-1.20250227.110407/tests/test_tensor.py +0 -40
  140. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/.editorconfig +0 -0
  141. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/.gitignore +0 -0
  142. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/.gitmodules +0 -0
  143. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/.kateconfig +0 -0
  144. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/CHANGELOG.md +0 -0
  145. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/CODEOWNERS +0 -0
  146. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/LICENSE +0 -0
  147. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/MANIFEST.in +0 -0
  148. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/README.rst +0 -0
  149. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/12AX.cluster_map +0 -0
  150. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/_setup_returnn_env.py +0 -0
  151. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-fwd.config +0 -0
  152. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-horovod-mpi.py +0 -0
  153. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-horovod-mpi.py.sh +0 -0
  154. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-horovod-mpi.sh +0 -0
  155. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-hyper-param-tuning.config +0 -0
  156. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-iter-dataset.py +0 -0
  157. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-list-devices.py +0 -0
  158. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-lua-torch-layer.config +0 -0
  159. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-pretrain.config +0 -0
  160. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-record-and-push-to-webserver.py +0 -0
  161. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-returnn-as-framework.py +0 -0
  162. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-rf-pt-benchmark.py +0 -0
  163. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-rf.config +0 -0
  164. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-rhn-enwik8.config +0 -0
  165. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-sprint-interface.py +0 -0
  166. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-tf-att-copy.config +0 -0
  167. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-tf-attention.config +0 -0
  168. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-tf-chunking-blstm.12ax.config +0 -0
  169. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-tf-contribrnn-lstm.12ax.config +0 -0
  170. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-tf-enc-dec.config +0 -0
  171. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-tf-hard-att-copy.config +0 -0
  172. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-tf-lstm-benchmark.py +0 -0
  173. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-tf-maxgradnorm-lstm.12ax.config +0 -0
  174. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-tf-native-lstm-lowmem.12ax.config +0 -0
  175. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-tf-native-lstm.12ax.config +0 -0
  176. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-tf-native-lstm2.12ax.config +0 -0
  177. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-tf-native-lstm2.12ax.tuned.config +0 -0
  178. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-tf-neural-transducer.12ax.config +0 -0
  179. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-tf-rec-explicit-lstm.config +0 -0
  180. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-tf-rec-explicit-rnn.config +0 -0
  181. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-tf-rec-self-att.config +0 -0
  182. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-tf-vanilla-lstm.12ax.config +0 -0
  183. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-timit-lstm-ctc.config +0 -0
  184. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-torch.config +0 -0
  185. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo-upd-mult-model.lstm.12ax.config +0 -0
  186. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/demo.sh +0 -0
  187. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/mdlstm/IAM/IAM_lines/a01-000u-00.png +0 -0
  188. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/mdlstm/IAM/IAM_lines/a01-007-04.png +0 -0
  189. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/mdlstm/IAM/IAM_lines/a01-007-06.png +0 -0
  190. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/mdlstm/IAM/README.txt +0 -0
  191. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/mdlstm/IAM/chars.txt +0 -0
  192. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/mdlstm/IAM/config_demo +0 -0
  193. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/mdlstm/IAM/config_fwd +0 -0
  194. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/mdlstm/IAM/config_real +0 -0
  195. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/mdlstm/IAM/create_IAM_dataset.py +0 -0
  196. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/mdlstm/IAM/decode.py +0 -0
  197. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/mdlstm/IAM/features/raw/demo.h5 +0 -0
  198. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/mdlstm/IAM/go.sh +0 -0
  199. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/mdlstm/IAM/lines.txt +0 -0
  200. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/mdlstm/IAM/split/eval.txt +0 -0
  201. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/mdlstm/IAM/split/train.txt +0 -0
  202. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/mdlstm/IAM/split/valid.txt +0 -0
  203. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/mdlstm/README.md +0 -0
  204. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/mdlstm/artificial/create_test_h5.py +0 -0
  205. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/mdlstm/artificial/forwardconfig +0 -0
  206. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/mdlstm/artificial/go.sh +0 -0
  207. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/mdlstm/artificial/trainconfig +0 -0
  208. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/mdlstm/artificial_rgb/create_test_h5.py +0 -0
  209. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/mdlstm/artificial_rgb/forwardconfig +0 -0
  210. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/mdlstm/artificial_rgb/go.sh +0 -0
  211. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/demos/mdlstm/artificial_rgb/trainconfig +0 -0
  212. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/requirements.txt +0 -0
  213. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/__init__.py +0 -0
  214. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/__old_mod_loader__.py +0 -0
  215. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/__setup__.py +0 -0
  216. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/datasets/__init__.py +0 -0
  217. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/datasets/audio.py +0 -0
  218. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/datasets/bundle_file.py +0 -0
  219. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/datasets/map.py +0 -0
  220. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/datasets/numpy_dump.py +0 -0
  221. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/datasets/raw_wav.py +0 -0
  222. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/datasets/stereo.py +0 -0
  223. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/datasets/util/__init__.py +0 -0
  224. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/datasets/util/feature_extraction.py +0 -0
  225. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/engine/__init__.py +0 -0
  226. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/engine/base.py +0 -0
  227. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/engine/batch.py +0 -0
  228. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/WarpRna/__init__.py +0 -0
  229. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/WarpRna/__main__.py +0 -0
  230. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/WarpRna/warp-rna/.git +0 -0
  231. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/WarpRna/warp-rna/.gitignore +0 -0
  232. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/WarpRna/warp-rna/LICENSE +0 -0
  233. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/WarpRna/warp-rna/README.md +0 -0
  234. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/WarpRna/warp-rna/aligner.gif +0 -0
  235. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/WarpRna/warp-rna/check.png +0 -0
  236. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/WarpRna/warp-rna/core.cu +0 -0
  237. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/WarpRna/warp-rna/core.h +0 -0
  238. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/WarpRna/warp-rna/core_cpu.cpp +0 -0
  239. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/WarpRna/warp-rna/pytorch_binding/LICENSE +0 -0
  240. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/WarpRna/warp-rna/pytorch_binding/MANIFEST.in +0 -0
  241. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/WarpRna/warp-rna/pytorch_binding/README.md +0 -0
  242. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/WarpRna/warp-rna/pytorch_binding/binding.cpp +0 -0
  243. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/WarpRna/warp-rna/pytorch_binding/core.cu +0 -0
  244. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/WarpRna/warp-rna/pytorch_binding/core.h +0 -0
  245. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/WarpRna/warp-rna/pytorch_binding/requirements.txt +0 -0
  246. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/WarpRna/warp-rna/pytorch_binding/setup.py +0 -0
  247. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/WarpRna/warp-rna/pytorch_binding/warp_rna/__init__.py +0 -0
  248. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/WarpRna/warp-rna/pytorch_binding/warp_rna/test.py +0 -0
  249. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/WarpRna/warp-rna/ref_rna.py +0 -0
  250. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/WarpRna/warp-rna/tensorflow_binding/setup.py +0 -0
  251. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/WarpRna/warp-rna/tensorflow_binding/src/warp_rna_op.cc +0 -0
  252. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/WarpRna/warp-rna/tensorflow_binding/src/warp_rna_op_kernel_tmpl.h +0 -0
  253. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/WarpRna/warp-rna/tensorflow_binding/warp_rna/__init__.py +0 -0
  254. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/WarpRna/warp-rna/test.cpp +0 -0
  255. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/__init__.py +0 -0
  256. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/graph_editor/README.md +0 -0
  257. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/graph_editor/__init__.py +0 -0
  258. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/graph_editor/edit.py +0 -0
  259. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/graph_editor/reroute.py +0 -0
  260. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/extern/graph_editor/select.py +0 -0
  261. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/forward_iface.py +0 -0
  262. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/__init__.py +0 -0
  263. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/_native/__init__.py +0 -0
  264. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/_native/backend.cpp +0 -0
  265. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/_native/backend.hpp +0 -0
  266. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/_native/py_utils.hpp +0 -0
  267. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/_native/tensor_ops.hpp +0 -0
  268. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/_numpy_backend.py +0 -0
  269. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/_random_journal.py +0 -0
  270. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/audio/__init__.py +0 -0
  271. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/backend.py +0 -0
  272. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/build_from_dict.py +0 -0
  273. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/cond.py +0 -0
  274. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/container.py +0 -0
  275. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/control_flow_ctx.py +0 -0
  276. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/conversions/__init__.py +0 -0
  277. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/conversions/espnet_e_branchformer.py +0 -0
  278. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/conversions/hf_llama.py +0 -0
  279. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/conversions/torch_nn.py +0 -0
  280. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/decoder/__init__.py +0 -0
  281. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/dtype.py +0 -0
  282. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/encoder/__init__.py +0 -0
  283. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/encoder/base.py +0 -0
  284. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/encoder/conformer_v2.py +0 -0
  285. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/encoder/transformer.py +0 -0
  286. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/gradient.py +0 -0
  287. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/graph.py +0 -0
  288. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/init.py +0 -0
  289. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/label_smoothing.py +0 -0
  290. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/linear.py +0 -0
  291. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/parametrize.py +0 -0
  292. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/piecewise_linear.py +0 -0
  293. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/state.py +0 -0
  294. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/stepwise_scheduler.py +0 -0
  295. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/frontend/tensor_array.py +0 -0
  296. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/import_/__init__.py +0 -0
  297. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/import_/common.py +0 -0
  298. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/import_/git.py +0 -0
  299. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/import_/import_.py +0 -0
  300. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/learning_rate_control.py +0 -0
  301. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/log.py +0 -0
  302. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/native_op.cpp +0 -0
  303. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/pretrain.py +0 -0
  304. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/sprint/__init__.py +0 -0
  305. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/sprint/control.py +0 -0
  306. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/sprint/error_signals.py +0 -0
  307. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/sprint/extern_interface.py +0 -0
  308. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tensor/README.md +0 -0
  309. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tensor/__init__.py +0 -0
  310. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tensor/_tensor_mixin_base.py +0 -0
  311. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tensor/control_flow_ctx.py +0 -0
  312. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tensor/dim.py +0 -0
  313. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tensor/marked_dim.py +0 -0
  314. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tensor/utils.py +0 -0
  315. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/__init__.py +0 -0
  316. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/compat.py +0 -0
  317. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/data_pipeline.py +0 -0
  318. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/distributed.py +0 -0
  319. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/frontend_layers/README.md +0 -0
  320. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/frontend_layers/__init__.py +0 -0
  321. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/frontend_layers/_utils.py +0 -0
  322. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/frontend_layers/config_entry_points.py +0 -0
  323. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/frontend_layers/dims.py +0 -0
  324. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/frontend_layers/masked_computation.py +0 -0
  325. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/frontend_layers/parameter_assign.py +0 -0
  326. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/frontend_layers/prev_tensor_ref.py +0 -0
  327. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/frontend_low_level/__init__.py +0 -0
  328. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/horovod.py +0 -0
  329. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/hyper_param_tuning.py +0 -0
  330. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/layers/__init__.py +0 -0
  331. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/layers/segmental_model.py +0 -0
  332. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/layers/signal_processing.py +0 -0
  333. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/layers/variable.py +0 -0
  334. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/sprint.py +0 -0
  335. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/util/__init__.py +0 -0
  336. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/util/data.py +0 -0
  337. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/util/gradient_checkpoint.py +0 -0
  338. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/util/ken_lm.py +0 -0
  339. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/tf/util/open_fst.py +0 -0
  340. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/torch/README.md +0 -0
  341. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/torch/__init__.py +0 -0
  342. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/torch/data/__init__.py +0 -0
  343. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/torch/data/queued_data_iter.py +0 -0
  344. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/torch/data/tensor_utils.py +0 -0
  345. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/torch/frontend/__init__.py +0 -0
  346. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/torch/frontend/_rand.py +0 -0
  347. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/torch/frontend/raw_ops.py +0 -0
  348. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/torch/optim/README.md +0 -0
  349. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/torch/optim/__init__.py +0 -0
  350. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/torch/optim/lion.py +0 -0
  351. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/torch/util/README.md +0 -0
  352. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/torch/util/__init__.py +0 -0
  353. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/torch/util/array_.py +0 -0
  354. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/torch/util/gradient_checkpoint.py +0 -0
  355. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/torch/util/module.py +0 -0
  356. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/util/__init__.py +0 -0
  357. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/util/bpe.py +0 -0
  358. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/util/debug.py +0 -0
  359. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/util/debug_helpers.py +0 -0
  360. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/util/fsa.py +0 -0
  361. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/util/literal_py_to_pickle.py +0 -0
  362. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/util/math.py +0 -0
  363. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/util/multi_proc_non_daemonic_spawn.py +0 -0
  364. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/util/native_code_compiler.py +0 -0
  365. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/util/pprint.py +0 -0
  366. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/util/py-to-pickle.cpp +0 -0
  367. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/util/py_ext_mod_compiler.py +0 -0
  368. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/util/result_with_reason.py +0 -0
  369. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/util/sig_proc.py +0 -0
  370. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/util/task_system.py +0 -0
  371. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/util/train_proc_manager.py +0 -0
  372. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn/util/watch_memory.py +0 -0
  373. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn.egg-info/dependency_links.txt +0 -0
  374. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn.egg-info/requires.txt +0 -0
  375. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/returnn.egg-info/top_level.txt +0 -0
  376. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/rnn.py +0 -0
  377. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/setup.cfg +0 -0
  378. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/setup.py +0 -0
  379. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/DummySprintExec.py +0 -0
  380. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/PyCharm-inspection-profile.xml +0 -0
  381. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/PyCharm.idea/.gitignore +0 -0
  382. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/PyCharm.idea/.name +0 -0
  383. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/PyCharm.idea/codeStyleSettings.xml +0 -0
  384. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/PyCharm.idea/codeStyles/Project.xml +0 -0
  385. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/PyCharm.idea/codeStyles/codeStyleConfig.xml +0 -0
  386. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/PyCharm.idea/inspectionProfiles/Project_Default.xml +0 -0
  387. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/PyCharm.idea/inspectionProfiles/profiles_settings.xml +0 -0
  388. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/PyCharm.idea/misc.xml +0 -0
  389. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/PyCharm.idea/modules.xml +0 -0
  390. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/PyCharm.idea/returnn.iml +0 -0
  391. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/PyCharm.idea/scopes/scope_settings.xml +0 -0
  392. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/_set_num_threads1.py +0 -0
  393. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/_setup_returnn_env.py +0 -0
  394. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/bpe-unicode-demo.codes +0 -0
  395. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/bpe-unicode-demo.vocab +0 -0
  396. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/lexicon_opt.fst +0 -0
  397. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/lexicon_opt.isyms +0 -0
  398. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/lexicon_opt.jpg +0 -0
  399. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/lexicon_opt.osyms +0 -0
  400. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/lint_common.py +0 -0
  401. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/pylint.py +0 -0
  402. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/returnn-as-framework.py +0 -0
  403. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/spelling.dic +0 -0
  404. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_Config.py +0 -0
  405. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_Fsa.py +0 -0
  406. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_GeneratingDataset.py +0 -0
  407. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_LearningRateControl.py +0 -0
  408. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_Log.py +0 -0
  409. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_MultiProcDataset.py +0 -0
  410. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_Pretrain.py +0 -0
  411. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_ResNet.py +0 -0
  412. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_SprintDataset.py +0 -0
  413. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_SprintInterface.py +0 -0
  414. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_TFEngine.py +0 -0
  415. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_TFNetworkSigProcLayer.py +0 -0
  416. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_TFUpdater.py +0 -0
  417. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_TF_determinism.py +0 -0
  418. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_TaskSystem.py +0 -0
  419. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_TaskSystem_SharedMem.py +0 -0
  420. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_demos.py +0 -0
  421. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_fork_exec.py +0 -0
  422. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_hdf_dump.py +0 -0
  423. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_rf_const.py +0 -0
  424. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_rf_container.py +0 -0
  425. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_rf_gradient.py +0 -0
  426. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_rf_label_smoothing.py +0 -0
  427. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_rf_piecewise_linear.py +0 -0
  428. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_rf_reduce.py +0 -0
  429. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_threading.py +0 -0
  430. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_tools.py +0 -0
  431. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_torch_dataset.py +0 -0
  432. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_torch_internal_frontend.py +0 -0
  433. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/test_torch_util.py +0 -0
  434. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tests/torch_utils.py +0 -0
  435. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/_setup_returnn_env.py +0 -0
  436. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/analyze-dataset-batches.py +0 -0
  437. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/bliss-collect-seq-lens.py +0 -0
  438. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/bliss-dump-text.py +0 -0
  439. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/bliss-get-segment-names.py +0 -0
  440. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/bliss-to-ogg-zip.py +0 -0
  441. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/bpe-create-lexicon.py +0 -0
  442. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/calculate-word-error-rate.py +0 -0
  443. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/cleanup-old-models.py +0 -0
  444. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/collect-orth-symbols.py +0 -0
  445. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/collect-words.py +0 -0
  446. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/compile_native_op.py +0 -0
  447. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/compile_tf_graph.py +0 -0
  448. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/debug-dump-search-scores.py +0 -0
  449. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/debug-plot-search-scores.py +0 -0
  450. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/dump-dataset-raw-strings.py +0 -0
  451. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/dump-forward-stats.py +0 -0
  452. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/dump-forward.py +0 -0
  453. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/dump-network-json.py +0 -0
  454. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/dump-pickle.py +0 -0
  455. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/extract_state_tying_from_dataset.py +0 -0
  456. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/get-attention-weights.py +0 -0
  457. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/get-best-model-epoch.py +0 -0
  458. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/hdf_dump.py +0 -0
  459. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/import-blocks-mt-model.py +0 -0
  460. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/import-t2t-mt-model.py +0 -0
  461. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/lattice_rescorer/.gitignore +0 -0
  462. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/lattice_rescorer/Makefile +0 -0
  463. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/lattice_rescorer/README.md +0 -0
  464. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/lattice_rescorer/example/README.md +0 -0
  465. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/lattice_rescorer/example/libs_list +0 -0
  466. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/lattice_rescorer/example/network.040/i600_m600_m600.sgd_b16_lr0_cl2.newbobabs.config +0 -0
  467. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/lattice_rescorer/example/network.040/i600_m600_m600.sgd_b16_lr0_cl2.newbobabs.keep_over_epoch.lstm2.config +0 -0
  468. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/lattice_rescorer/example/rescore_lattice.sh +0 -0
  469. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/lattice_rescorer/example/state_vars_list +0 -0
  470. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/lattice_rescorer/example/tensor_names_list +0 -0
  471. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/lattice_rescorer/file.h +0 -0
  472. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/lattice_rescorer/htklatticerescorer.cc +0 -0
  473. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/lattice_rescorer/htklatticerescorer.h +0 -0
  474. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/lattice_rescorer/main.cc +0 -0
  475. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/lattice_rescorer/rescorer.h +0 -0
  476. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/lattice_rescorer/vocabulary.cc +0 -0
  477. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/lattice_rescorer/vocabulary.h +0 -0
  478. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/tf_inspect_summary_log.py +0 -0
  479. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/torch_avg_checkpoints.py +0 -0
  480. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/torch_inspect_checkpoint.py +0 -0
  481. {returnn-1.20250227.110407 → returnn-1.20251105.112921}/tools/torch_inspect_checkpoint_and_opt.py +0 -0
@@ -18,7 +18,7 @@ General rules when contributing to the code of RETURNN:
18
18
  Our code style uses most common Python conventions.
19
19
  If you are not an expert in Python, use PyCharm,
20
20
  and follow [our PyCharm configuration guide](https://github.com/rwth-i6/returnn/wiki/PyCharm-Configuration).
21
- Apply [black](https://black.readthedocs.io/).
21
+ Apply [ruff](https://github.com/astral-sh/ruff).
22
22
  * Make sure all [tests](https://returnn.readthedocs.io/en/latest/advanced/test_suite.html) pass.
23
23
  * At the time being, we want to support earlier versions of TF 1
24
24
  (consider at least TF 1.8, but maybe even TF 1.4)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: returnn
3
- Version: 1.20250227.110407
3
+ Version: 1.20251105.112921
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
@@ -7,7 +7,6 @@ This was used for the old flat code file structure, for usage like::
7
7
  We want to support the same code.
8
8
  """
9
9
 
10
-
11
10
  from __future__ import annotations
12
11
  import os
13
12
  import sys
@@ -0,0 +1,2 @@
1
+ version = '1.20251105.112921'
2
+ long_version = '1.20251105.112921+git.d5d3efd'
@@ -8,12 +8,12 @@ This is just for demonstration, testing and debugging purpose. The search itself
8
8
 
9
9
  # No RETURNN dependency needed for the basic search. Just TF itself.
10
10
 
11
- import typing
12
11
  import os
13
12
  import json
14
13
  import argparse
15
14
  import tensorflow as tf
16
15
  import numpy
16
+ from typing import List, Optional, Tuple
17
17
 
18
18
 
19
19
  class Hyp:
@@ -26,7 +26,7 @@ class Hyp:
26
26
  :param int idx: hyp idx (to identify it in a beam)
27
27
  """
28
28
  self.idx = idx
29
- self.source_idx = None # type: typing.Optional[int] # source hyp idx
29
+ self.source_idx: Optional[int] = None # source hyp idx
30
30
  self.score = 0.0
31
31
  self.seq = [] # label seq
32
32
 
@@ -91,7 +91,6 @@ def main():
91
91
  # Now loop over decoder steps.
92
92
  max_dec_len = 100 # TODO better default... depending on input len. or configurable...
93
93
  for i in range(max_dec_len):
94
-
95
94
  # Loop over all stochastic variables.
96
95
  for stochastic_var in info["stochastic_var_order"]:
97
96
  assert isinstance(stochastic_var, str)
@@ -108,9 +107,7 @@ def main():
108
107
  # TODO: length norm here?
109
108
 
110
109
  # Select new hypotheses.
111
- best_possibilities = sorted(all_possibilities)[
112
- : args.beam_size
113
- ] # type: typing.List[typing.Tuple[float,int,Hyp]]
110
+ best_possibilities: List[Tuple[float, int, Hyp]] = sorted(all_possibilities)[: args.beam_size]
114
111
  assert len(best_possibilities) == args.beam_size
115
112
  hyps = [
116
113
  hyp.expand(idx=i, label=label, score=score)
@@ -121,8 +118,9 @@ def main():
121
118
  session.run(
122
119
  info["state_vars"]["stochastic_var_scores_%s" % stochastic_var] + "/Assign...?", # TODO...
123
120
  feed_dict={
124
- info["state_vars"]["stochastic_var_scores_%s" % stochastic_var]
125
- + "/Initial...?": [[hyp.seq[-1] for hyp in hyps]] # TODO...
121
+ info["state_vars"]["stochastic_var_scores_%s" % stochastic_var] + "/Initial...?": [
122
+ [hyp.seq[-1] for hyp in hyps]
123
+ ] # TODO...
126
124
  },
127
125
  )
128
126
 
@@ -13,5 +13,9 @@ extend-exclude = '''
13
13
  )/
14
14
  '''
15
15
 
16
+ [tool.ruff]
17
+ line-length = 120
18
+ target-version = "py38" # https://github.com/rwth-i6/returnn/issues/1326
19
+
16
20
  [build-system]
17
21
  requires = ["setuptools", "numpy"]
@@ -34,21 +34,21 @@ from returnn.util.basic import BackendEngine, BehaviorVersion
34
34
 
35
35
  # These imports are not directly used here, but make them available, as other code imports them from here.
36
36
  # noinspection PyUnresolvedReferences
37
- from returnn.util.debug import init_ipython_kernel, init_better_exchook, init_faulthandler, debug_shell
37
+ from returnn.util.debug import init_ipython_kernel, init_better_exchook, init_faulthandler, debug_shell # noqa: F401
38
38
 
39
39
  # Some external scripts import those functions from here, thus keep this here.
40
40
  # noinspection PyUnresolvedReferences
41
- from returnn.util.basic import init_thread_join_hack, describe_returnn_version
41
+ from returnn.util.basic import init_thread_join_hack, describe_returnn_version # noqa: F401
42
42
 
43
43
  if TYPE_CHECKING:
44
44
  import returnn.tf.engine
45
45
  import returnn.torch.engine
46
46
 
47
- config = None # type: Optional[Config]
48
- engine = None # type: Optional[Union[returnn.tf.engine.Engine, returnn.torch.engine.Engine]]
49
- train_data = None # type: Optional[Dataset]
50
- dev_data = None # type: Optional[Dataset]
51
- eval_data = None # type: Optional[Dataset]
47
+ config: Optional[Config] = None
48
+ engine: Optional[Union[returnn.tf.engine.Engine, returnn.torch.engine.Engine]] = None
49
+ train_data: Optional[Dataset] = None
50
+ dev_data: Optional[Dataset] = None
51
+ eval_data: Optional[Dataset] = None
52
52
  quit_returnn = False
53
53
 
54
54
 
@@ -801,7 +801,7 @@ class SubProcCopyGlobalConfigPreInitFunc:
801
801
  from returnn.log import log
802
802
  from returnn import __old_mod_loader__
803
803
 
804
- better_exchook.install()
804
+ better_exchook.setup_all()
805
805
  __old_mod_loader__.disable_lazy_mod_loads()
806
806
 
807
807
  if self.global_config:
@@ -19,8 +19,8 @@ import os
19
19
  import math
20
20
  import numpy
21
21
  import functools
22
- import typing
23
- from typing import TYPE_CHECKING, Optional, Any, Union, Type, Dict, Sequence, List, Callable
22
+ import types
23
+ from typing import TYPE_CHECKING, Optional, Any, Set, Tuple, Union, Type, Dict, Sequence, List, Callable
24
24
 
25
25
  from returnn.log import log
26
26
  from returnn.engine.batch import Batch, BatchSetGenerator
@@ -141,12 +141,10 @@ class Dataset:
141
141
  :param int _shard_index: local shard index, when sharding is enabled
142
142
  """
143
143
  self.name = name or ("dataset_id%s" % id(self))
144
- self.lock = None # type: Optional[RLock] # Used when manipulating our data potentially from multiple threads.
145
- self.rnd_seq_drop = None # type: typing.Optional[Random]
144
+ self.lock: Optional[RLock] = None # Used when manipulating our data potentially from multiple threads.
145
+ self.rnd_seq_drop: Optional[Random] = None
146
146
  self.num_inputs = 0 # usually not used, but num_outputs instead, which is more generic
147
- self.num_outputs = (
148
- None
149
- ) # type: typing.Optional[typing.Dict[str,typing.Tuple[int,int]]] # tuple is num-classes, len(shape). # nopep8
147
+ self.num_outputs: Optional[Dict[str, Tuple[int, int]]] = None # tuple is num-classes, len(shape).
150
148
  self.window = window
151
149
  self.seq_ordering = seq_ordering # "default", "sorted" or "random". See self.get_seq_order_for_epoch().
152
150
  self.fixed_random_seed = fixed_random_seed
@@ -157,12 +155,12 @@ class Dataset:
157
155
  self.seq_tags_filter = set(self._load_seq_list_file(seq_list_filter_file)) if seq_list_filter_file else None
158
156
  self.unique_seq_tags = unique_seq_tags
159
157
  self._seq_order_seq_lens_file = seq_order_seq_lens_file
160
- self._seq_order_seq_lens_by_idx = None
158
+ self._seq_order_seq_lens_by_idx: Optional[Sequence[Union[int, float]]] = None
161
159
  # There is probably no use case for combining the two, so avoid potential misconfiguration.
162
- assert (
163
- self.partition_epoch == 1 or self.repeat_epoch == 1
164
- ), "Combining partition_epoch and repeat_epoch is prohibited."
165
- self.labels = {} # type: typing.Dict[str,typing.List[str]]
160
+ assert self.partition_epoch == 1 or self.repeat_epoch == 1, (
161
+ "Combining partition_epoch and repeat_epoch is prohibited."
162
+ )
163
+ self.labels: Dict[str, List[str]] = {}
166
164
  self.weights = {}
167
165
  self._num_timesteps = 0
168
166
  self._num_seqs = 0
@@ -213,8 +211,8 @@ class Dataset:
213
211
  getattr(self, "epoch", "<unknown>"),
214
212
  )
215
213
 
216
- _getnewargs_exclude_attrs = set() # type: typing.Set[str]
217
- _getnewargs_remap = {} # type: typing.Dict[str,str]
214
+ _getnewargs_exclude_attrs: Set[str] = set()
215
+ _getnewargs_remap: Dict[str, str] = {}
218
216
 
219
217
  @staticmethod
220
218
  def _create_from_reduce(cls, kwargs, state) -> Dataset:
@@ -430,9 +428,9 @@ class Dataset:
430
428
  """
431
429
  raise OptionalNotImplementedError
432
430
 
433
- def get_num_timesteps(self):
431
+ def get_num_timesteps(self) -> Union[int, NumbersDict]:
434
432
  """
435
- :rtype: int
433
+ :return: how much frames we have in total.
436
434
  """
437
435
  assert self._num_timesteps > 0
438
436
  return self._num_timesteps
@@ -489,12 +487,8 @@ class Dataset:
489
487
  """
490
488
  raise NotImplementedError
491
489
 
492
- def _get_seq_order_seq_lens_by_idx(self, seq_idx):
493
- """
494
- :param int seq_idx:
495
- :rtype: int
496
- """
497
- if not self._seq_order_seq_lens_by_idx:
490
+ def _get_seq_order_seq_lens_by_idx(self, seq_idx: int) -> Union[int, float]:
491
+ if self._seq_order_seq_lens_by_idx is None:
498
492
  assert self._seq_order_seq_lens_file
499
493
  if self._seq_order_seq_lens_file.endswith(".gz"):
500
494
  import gzip
@@ -505,11 +499,12 @@ class Dataset:
505
499
  seq_lens = eval(raw)
506
500
  assert isinstance(seq_lens, dict)
507
501
  all_tags = self.get_all_tags()
508
- self._seq_order_seq_lens_by_idx = [seq_lens[tag] for tag in all_tags]
502
+ self._seq_order_seq_lens_by_idx = numpy.array([seq_lens[tag] for tag in all_tags])
503
+ self._get_seq_order_seq_lens_by_idx = self._seq_order_seq_lens_by_idx.__getitem__ # faster
509
504
  return self._seq_order_seq_lens_by_idx[seq_idx]
510
505
 
511
506
  def get_seq_order_for_epoch(
512
- self, epoch: Optional[int], num_seqs: int, get_seq_len: Optional[Callable[[int], int]] = None
507
+ self, epoch: Optional[int], num_seqs: int, get_seq_len: Optional[Callable[[int], Union[int, float]]] = None
513
508
  ) -> Sequence[int]:
514
509
  """
515
510
  Returns the order of the given epoch.
@@ -518,7 +513,7 @@ class Dataset:
518
513
 
519
514
  :param epoch: for 'random', this determines the random seed
520
515
  :param num_seqs:
521
- :param get_seq_len: function (originalSeqIdx: int) -> int
516
+ :param get_seq_len: function (originalSeqIdx: int) -> int|float
522
517
  :return: the order for the given epoch. such that seq_idx -> underlying idx
523
518
  """
524
519
  if epoch is None:
@@ -561,20 +556,33 @@ class Dataset:
561
556
  for i in range(1, num):
562
557
  seq_index[i::num] += i * (num_seqs // num)
563
558
  elif seq_ordering_method == "reverse":
564
- seq_index = range(num_seqs - 1, -1, -1) # type: Union[range, typing.Sequence[int]]
559
+ seq_index = range(num_seqs - 1, -1, -1) # type: Union[range, Sequence[int]]
565
560
  elif seq_ordering_method in ["sorted", "sorted_reverse"]:
566
561
  assert get_seq_len
567
- reverse = -1 if seq_ordering_method == "sorted_reverse" else 1
568
- seq_lens = [reverse * get_seq_len(i) for i in range(num_seqs)]
562
+ seq_lens = _get_seq_len_as_array(get_seq_len, num_seqs)
563
+ if seq_ordering_method == "sorted_reverse":
564
+ seq_lens = -seq_lens
569
565
  seq_index = numpy.argsort(seq_lens, kind="stable")
570
- elif seq_ordering_method.startswith("random"):
571
- tmp = seq_ordering_method.split(":")
566
+ elif seq_ordering_method == "random" or seq_ordering_method.startswith("random:"):
567
+ tmp = seq_ordering_method.split(":", 1)
572
568
  nth = int(tmp[1]) if len(tmp) > 1 else 1
573
569
  # Keep this deterministic! Use fixed seed.
574
570
  rnd_seed = self._get_random_seed_for_epoch(epoch=epoch, num_epochs_fixed=nth)
575
571
  random_generator = numpy.random.RandomState(rnd_seed)
576
572
  seq_index = random_generator.permutation(num_seqs)
577
- elif seq_ordering_method.startswith("sort_bin_shuffle"):
573
+ elif seq_ordering_method == "random_sample" or seq_ordering_method.startswith("random_sample:"):
574
+ tmp = seq_ordering_method.split(":", 1)
575
+ nth = int(tmp[1]) if len(tmp) > 1 else 1
576
+ # Keep this deterministic! Use fixed seed.
577
+ rnd_seed = self._get_random_seed_for_epoch(epoch=epoch, num_epochs_fixed=nth)
578
+ random_generator = numpy.random.RandomState(rnd_seed)
579
+ seq_index = random_generator.randint(0, num_seqs, size=num_seqs)
580
+ elif (
581
+ seq_ordering_method == "sort_bin_shuffle"
582
+ or seq_ordering_method.startswith("sort_bin_shuffle:")
583
+ or seq_ordering_method == "sort_bin_shuffle_x2"
584
+ or seq_ordering_method.startswith("sort_bin_shuffle_x2:")
585
+ ):
578
586
  # Shuffle seqs, sort by length, and shuffle bins (then shuffle seqs within each bin if sort_bin_shuffle_x2).
579
587
  assert get_seq_len
580
588
  tmp = seq_ordering_method.split(":")[1:]
@@ -605,7 +613,7 @@ class Dataset:
605
613
  random_generator.shuffle(part) # Shuffle within the bin.
606
614
  out_index.append(part)
607
615
  seq_index = numpy.concatenate(out_index)
608
- elif seq_ordering_method.startswith("laplace"):
616
+ elif seq_ordering_method == "laplace" or seq_ordering_method.startswith("laplace:"):
609
617
  assert get_seq_len
610
618
  tmp = seq_ordering_method.split(":")[1:]
611
619
  if len(tmp) == 0:
@@ -619,7 +627,7 @@ class Dataset:
619
627
  nth = 1
620
628
  else:
621
629
  nth = int(tmp[1])
622
- seq_lens = numpy.array([get_seq_len(i) for i in range(num_seqs)])
630
+ seq_lens = _get_seq_len_as_array(get_seq_len, num_seqs)
623
631
  rnd_seed = self._get_random_seed_for_epoch(epoch=epoch, num_epochs_fixed=nth)
624
632
  random_generator = numpy.random.RandomState(rnd_seed)
625
633
  seq_index = random_generator.permutation(num_seqs) # type: Union[numpy.ndarray, List[int]]
@@ -660,12 +668,13 @@ class Dataset:
660
668
  )
661
669
  old_seq_index = seq_index
662
670
  seq_index = [i for i in seq_index if all_seq_tags[i] in self.seq_tags_filter]
663
- assert (
664
- seq_index
665
- ), "%s: empty after applying seq_list_filter_file. Example filter tags: %r, used tags: %r" % (
666
- self,
667
- sorted(self.seq_tags_filter)[:3],
668
- [all_seq_tags[i] for i in old_seq_index[:3]],
671
+ assert seq_index, (
672
+ "%s: empty after applying seq_list_filter_file. Example filter tags: %r, used tags: %r"
673
+ % (
674
+ self,
675
+ sorted(self.seq_tags_filter)[:3],
676
+ [all_seq_tags[i] for i in old_seq_index[:3]],
677
+ )
669
678
  )
670
679
  return seq_index
671
680
 
@@ -736,9 +745,9 @@ class Dataset:
736
745
  """
737
746
  self.epoch = epoch
738
747
  self.rnd_seq_drop = Random(self._get_random_seed_for_epoch(epoch=epoch))
739
- assert (
740
- self._num_shards == 1 or self.supports_sharding()
741
- ), f"{self}: does not support sharding, but got num_shards == {self._num_shards}"
748
+ assert self._num_shards == 1 or self.supports_sharding(), (
749
+ f"{self}: does not support sharding, but got num_shards == {self._num_shards}"
750
+ )
742
751
  return False
743
752
 
744
753
  def finish_epoch(self, *, free_resources: bool = False):
@@ -749,12 +758,11 @@ class Dataset:
749
758
  """
750
759
  self.epoch = None
751
760
 
752
- def get_current_seq_order(self):
761
+ def get_current_seq_order(self) -> Sequence[int]:
753
762
  """
754
763
  :return: many datasets use self.get_seq_order_for_epoch. this function would return the current seq order
755
764
  for the current epoch, after self.init_seq_order was called.
756
765
  Not all datasets implement this.
757
- :rtype: typing.Sequence[int]
758
766
  """
759
767
  raise OptionalNotImplementedError
760
768
 
@@ -864,18 +872,16 @@ class Dataset:
864
872
  data = self.get_data(seq_idx, key)
865
873
  return data[s0_start:s0_end]
866
874
 
867
- def get_tag(self, sorted_seq_idx):
875
+ def get_tag(self, sorted_seq_idx: int) -> str:
868
876
  """
869
- :param int sorted_seq_idx:
870
- :rtype: str
877
+ :param sorted_seq_idx:
871
878
  """
872
879
  return "seq-%i" % sorted_seq_idx
873
880
 
874
- def get_all_tags(self):
881
+ def get_all_tags(self) -> List[str]:
875
882
  """
876
883
  :return: list of all seq tags, of the whole dataset, without partition epoch.
877
884
  Note that this is not possible with all datasets.
878
- :rtype: list[str]
879
885
  """
880
886
  raise OptionalNotImplementedError(f"{self} get_all_tags not implemented")
881
887
 
@@ -905,7 +911,7 @@ class Dataset:
905
911
  if self.seq_ordering == "default" and self.partition_epoch == 1:
906
912
  return seq_idx
907
913
  assert self.have_corpus_seq_idx()
908
- raise NotImplemented
914
+ raise NotImplementedError
909
915
 
910
916
  def have_get_corpus_seq(self) -> bool:
911
917
  """
@@ -972,16 +978,16 @@ class Dataset:
972
978
  except Exception: # also not always available
973
979
  num_seqs = None # ignore
974
980
 
975
- if math.isinf(num_seqs):
981
+ if num_seqs is not None and math.isinf(num_seqs):
976
982
  if allow_only_lr_suitable:
977
983
  # cannot compute meaningful complete_frac for infinite num_seqs
978
984
  return None
979
985
  else:
980
986
  num_seqs = None
981
987
 
982
- assert (
983
- num_seqs is None or 0 <= sorted_seq_idx < num_seqs
984
- ), f"{self}: invalid seq indices: 0 <= seq_idx ({sorted_seq_idx}) < num_seqs ({num_seqs}) violated"
988
+ assert num_seqs is None or 0 <= sorted_seq_idx < num_seqs, (
989
+ f"{self}: invalid seq indices: 0 <= seq_idx ({sorted_seq_idx}) < num_seqs ({num_seqs}) violated"
990
+ )
985
991
  return self.generic_complete_frac(sorted_seq_idx, num_seqs)
986
992
 
987
993
  @property
@@ -1064,7 +1070,7 @@ class Dataset:
1064
1070
  if key in self.num_outputs:
1065
1071
  if self.num_outputs[key][1] <= 1:
1066
1072
  return []
1067
- res_shape = [None] * (self.num_outputs[key][1] - 1) # type: typing.List[typing.Union[None,int]]
1073
+ res_shape: List[Union[None, int]] = [None] * (self.num_outputs[key][1] - 1)
1068
1074
  if not self.is_data_sparse(key):
1069
1075
  res_shape[-1] = self.get_data_dim(key)
1070
1076
  return res_shape
@@ -1118,7 +1124,9 @@ class Dataset:
1118
1124
 
1119
1125
  def serialize_data(self, key: str, data: numpy.ndarray) -> str:
1120
1126
  """
1121
- In case you have a :class:`Vocabulary`, just use :func:`Vocabulary.get_seq_labels`.
1127
+ This is deprecated, as this is slow!
1128
+ In case you have a :class:`Vocabulary`, just use :func:`Vocabulary.get_seq_labels`
1129
+ or :func:`Vocabulary.serialize_labels`.
1122
1130
 
1123
1131
  :param key: e.g. "classes". self.labels[key] should be set
1124
1132
  :param numpy.ndarray data: 0D or 1D
@@ -1492,6 +1500,7 @@ def get_dataset_class(name: Union[str, Type[Dataset]]) -> Optional[Type[Dataset]
1492
1500
  "distrib_files",
1493
1501
  "postprocessing",
1494
1502
  "text_dict",
1503
+ "huggingface",
1495
1504
  ]
1496
1505
  for mod_name in mod_names:
1497
1506
  mod = import_module("returnn.datasets.%s" % mod_name)
@@ -1748,3 +1757,19 @@ def set_config_extern_data_from_dataset(config, dataset):
1748
1757
  "extern_data",
1749
1758
  {key: _data_kwargs_from_dataset_key(dataset=dataset, key=key) for key in dataset.get_data_keys()},
1750
1759
  )
1760
+
1761
+
1762
+ def _get_seq_len_as_array(get_seq_len: Callable[[int], Union[int, float]], num_seqs: int) -> numpy.ndarray:
1763
+ if num_seqs == 0:
1764
+ return numpy.zeros((0,), dtype=numpy.int32)
1765
+ if isinstance(get_seq_len, (types.BuiltinMethodType, types.MethodWrapperType, types.MethodType)):
1766
+ # Call it once. This might trigger some caching.
1767
+ get_seq_len(0)
1768
+ # Get it again. This might now get us a different (cached) function, e.g. array.__getitem__.
1769
+ get_seq_len = getattr(get_seq_len.__self__, get_seq_len.__name__)
1770
+ assert isinstance(get_seq_len, (types.BuiltinMethodType, types.MethodWrapperType, types.MethodType))
1771
+ obj = get_seq_len.__self__
1772
+ if isinstance(obj, numpy.ndarray) and get_seq_len.__name__ == "__getitem__":
1773
+ assert obj.shape == (num_seqs,)
1774
+ return obj
1775
+ return numpy.array([get_seq_len(i) for i in range(num_seqs)])
@@ -46,9 +46,10 @@ class CachedDataset(Dataset):
46
46
  self._index_map = range(len(self._seq_index)) # sorted seq idx -> seq_index idx
47
47
  self._tag_idx = {} # type: typing.Dict[str,int] # map of tag -> real-seq-idx. call _update_tag_idx
48
48
  self.targets = {}
49
- self.target_keys = (
50
- []
51
- ) # the keys for which we provide data; we may have labels for additional keys in self.labels
49
+ # the keys for which we provide data;
50
+ # we may have labels for additional keys in self.labels
51
+ self.target_keys = []
52
+
52
53
  self.timestamps = None
53
54
 
54
55
  def initialize(self):
@@ -4,18 +4,10 @@ Provides :class:`CachedDataset2`.
4
4
 
5
5
  from __future__ import annotations
6
6
  import numpy
7
- import typing
8
- from typing import Optional
7
+ from typing import Optional, List
9
8
  from threading import Condition
10
9
  from .basic import Dataset, DatasetSeq
11
10
 
12
- try:
13
- # noinspection PyCompatibility
14
- from _thread import interrupt_main
15
- except ImportError:
16
- # noinspection PyUnresolvedReferences,PyCompatibility
17
- from thread import interrupt_main
18
-
19
11
 
20
12
  class CachedDataset2(Dataset):
21
13
  """
@@ -36,7 +28,7 @@ class CachedDataset2(Dataset):
36
28
  self._num_timesteps = None
37
29
  self.epoch = None
38
30
  self.reached_final_seq = False
39
- self.added_data = [] # type: typing.List[DatasetSeq]
31
+ self.added_data: List[DatasetSeq] = []
40
32
  self.expected_load_seq_start = 0
41
33
  self._num_timesteps_accumulated = 0
42
34