returnn 1.20241011.20141__tar.gz → 1.20241015.225231__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 (465) hide show
  1. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/PKG-INFO +1 -1
  2. returnn-1.20241015.225231/_setup_info_generated.py +2 -0
  3. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/datasets/audio.py +4 -0
  4. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/datasets/basic.py +43 -13
  5. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/datasets/cached.py +4 -0
  6. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/datasets/distrib_files.py +12 -6
  7. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/datasets/generating.py +12 -0
  8. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/datasets/hdf.py +4 -0
  9. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/datasets/lm.py +4 -0
  10. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/datasets/meta.py +12 -2
  11. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/datasets/multi_proc.py +136 -72
  12. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/datasets/postprocessing.py +12 -0
  13. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/datasets/sprint.py +4 -0
  14. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tensor/_dim_extra.py +3 -3
  15. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/util/basic.py +22 -3
  16. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn.egg-info/PKG-INFO +1 -1
  17. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_MultiProcDataset.py +18 -0
  18. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_TFUtil.py +9 -0
  19. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_Util.py +8 -0
  20. returnn-1.20241011.20141/_setup_info_generated.py +0 -2
  21. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/.editorconfig +0 -0
  22. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/.gitignore +0 -0
  23. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/.gitmodules +0 -0
  24. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/.kateconfig +0 -0
  25. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/CHANGELOG.md +0 -0
  26. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/CODEOWNERS +0 -0
  27. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/CONTRIBUTING.md +0 -0
  28. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/LICENSE +0 -0
  29. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/MANIFEST.in +0 -0
  30. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/README.rst +0 -0
  31. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/__init__.py +0 -0
  32. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/12AX.cluster_map +0 -0
  33. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/_setup_returnn_env.py +0 -0
  34. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-fwd.config +0 -0
  35. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-horovod-mpi.py +0 -0
  36. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-horovod-mpi.py.sh +0 -0
  37. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-horovod-mpi.sh +0 -0
  38. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-hyper-param-tuning.config +0 -0
  39. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-iter-dataset.py +0 -0
  40. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-list-devices.py +0 -0
  41. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-lua-torch-layer.config +0 -0
  42. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-pretrain.config +0 -0
  43. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-record-and-push-to-webserver.py +0 -0
  44. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-returnn-as-framework.py +0 -0
  45. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-rf-pt-benchmark.py +0 -0
  46. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-rf.config +0 -0
  47. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-rhn-enwik8.config +0 -0
  48. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-sprint-interface.py +0 -0
  49. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-tf-att-copy.config +0 -0
  50. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-tf-attention.config +0 -0
  51. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-tf-chunking-blstm.12ax.config +0 -0
  52. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-tf-contribrnn-lstm.12ax.config +0 -0
  53. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-tf-enc-dec.config +0 -0
  54. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-tf-hard-att-copy.config +0 -0
  55. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-tf-lstm-benchmark.py +0 -0
  56. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-tf-maxgradnorm-lstm.12ax.config +0 -0
  57. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-tf-native-lstm-lowmem.12ax.config +0 -0
  58. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-tf-native-lstm.12ax.config +0 -0
  59. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-tf-native-lstm2.12ax.config +0 -0
  60. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-tf-native-lstm2.12ax.tuned.config +0 -0
  61. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-tf-neural-transducer.12ax.config +0 -0
  62. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-tf-rec-explicit-lstm.config +0 -0
  63. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-tf-rec-explicit-rnn.config +0 -0
  64. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-tf-rec-self-att.config +0 -0
  65. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-tf-search-compiled-graph.py +0 -0
  66. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-tf-vanilla-lstm.12ax.config +0 -0
  67. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-timit-lstm-ctc.config +0 -0
  68. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-torch.config +0 -0
  69. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo-upd-mult-model.lstm.12ax.config +0 -0
  70. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/demo.sh +0 -0
  71. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/mdlstm/IAM/IAM_lines/a01-000u-00.png +0 -0
  72. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/mdlstm/IAM/IAM_lines/a01-007-04.png +0 -0
  73. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/mdlstm/IAM/IAM_lines/a01-007-06.png +0 -0
  74. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/mdlstm/IAM/README.txt +0 -0
  75. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/mdlstm/IAM/chars.txt +0 -0
  76. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/mdlstm/IAM/config_demo +0 -0
  77. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/mdlstm/IAM/config_fwd +0 -0
  78. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/mdlstm/IAM/config_real +0 -0
  79. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/mdlstm/IAM/create_IAM_dataset.py +0 -0
  80. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/mdlstm/IAM/decode.py +0 -0
  81. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/mdlstm/IAM/features/raw/demo.h5 +0 -0
  82. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/mdlstm/IAM/go.sh +0 -0
  83. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/mdlstm/IAM/lines.txt +0 -0
  84. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/mdlstm/IAM/split/eval.txt +0 -0
  85. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/mdlstm/IAM/split/train.txt +0 -0
  86. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/mdlstm/IAM/split/valid.txt +0 -0
  87. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/mdlstm/README.md +0 -0
  88. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/mdlstm/artificial/create_test_h5.py +0 -0
  89. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/mdlstm/artificial/forwardconfig +0 -0
  90. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/mdlstm/artificial/go.sh +0 -0
  91. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/mdlstm/artificial/trainconfig +0 -0
  92. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/mdlstm/artificial_rgb/create_test_h5.py +0 -0
  93. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/mdlstm/artificial_rgb/forwardconfig +0 -0
  94. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/mdlstm/artificial_rgb/go.sh +0 -0
  95. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/demos/mdlstm/artificial_rgb/trainconfig +0 -0
  96. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/pyproject.toml +0 -0
  97. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/requirements.txt +0 -0
  98. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/__init__.py +0 -0
  99. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/__main__.py +0 -0
  100. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/__old_mod_loader__.py +0 -0
  101. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/__setup__.py +0 -0
  102. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/config.py +0 -0
  103. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/datasets/__init__.py +0 -0
  104. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/datasets/bundle_file.py +0 -0
  105. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/datasets/cached2.py +0 -0
  106. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/datasets/map.py +0 -0
  107. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/datasets/normalization_data.py +0 -0
  108. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/datasets/numpy_dump.py +0 -0
  109. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/datasets/raw_wav.py +0 -0
  110. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/datasets/stereo.py +0 -0
  111. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/datasets/util/__init__.py +0 -0
  112. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/datasets/util/feature_extraction.py +0 -0
  113. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/datasets/util/strings.py +0 -0
  114. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/datasets/util/vocabulary.py +0 -0
  115. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/engine/__init__.py +0 -0
  116. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/engine/base.py +0 -0
  117. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/engine/batch.py +0 -0
  118. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/WarpRna/__init__.py +0 -0
  119. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/WarpRna/__main__.py +0 -0
  120. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/WarpRna/warp-rna/.git +0 -0
  121. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/WarpRna/warp-rna/.gitignore +0 -0
  122. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/WarpRna/warp-rna/LICENSE +0 -0
  123. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/WarpRna/warp-rna/README.md +0 -0
  124. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/WarpRna/warp-rna/aligner.gif +0 -0
  125. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/WarpRna/warp-rna/check.png +0 -0
  126. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/WarpRna/warp-rna/core.cu +0 -0
  127. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/WarpRna/warp-rna/core.h +0 -0
  128. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/WarpRna/warp-rna/core_cpu.cpp +0 -0
  129. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/WarpRna/warp-rna/pytorch_binding/LICENSE +0 -0
  130. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/WarpRna/warp-rna/pytorch_binding/MANIFEST.in +0 -0
  131. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/WarpRna/warp-rna/pytorch_binding/README.md +0 -0
  132. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/WarpRna/warp-rna/pytorch_binding/binding.cpp +0 -0
  133. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/WarpRna/warp-rna/pytorch_binding/core.cu +0 -0
  134. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/WarpRna/warp-rna/pytorch_binding/core.h +0 -0
  135. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/WarpRna/warp-rna/pytorch_binding/requirements.txt +0 -0
  136. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/WarpRna/warp-rna/pytorch_binding/setup.py +0 -0
  137. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/WarpRna/warp-rna/pytorch_binding/warp_rna/__init__.py +0 -0
  138. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/WarpRna/warp-rna/pytorch_binding/warp_rna/test.py +0 -0
  139. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/WarpRna/warp-rna/ref_rna.py +0 -0
  140. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/WarpRna/warp-rna/tensorflow_binding/setup.py +0 -0
  141. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/WarpRna/warp-rna/tensorflow_binding/src/warp_rna_op.cc +0 -0
  142. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/WarpRna/warp-rna/tensorflow_binding/src/warp_rna_op_kernel_tmpl.h +0 -0
  143. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/WarpRna/warp-rna/tensorflow_binding/warp_rna/__init__.py +0 -0
  144. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/WarpRna/warp-rna/test.cpp +0 -0
  145. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/__init__.py +0 -0
  146. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/graph_editor/README.md +0 -0
  147. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/graph_editor/__init__.py +0 -0
  148. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/graph_editor/edit.py +0 -0
  149. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/graph_editor/reroute.py +0 -0
  150. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/graph_editor/select.py +0 -0
  151. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/graph_editor/subgraph.py +0 -0
  152. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/graph_editor/transform.py +0 -0
  153. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/extern/graph_editor/util.py +0 -0
  154. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/forward_iface.py +0 -0
  155. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/__init__.py +0 -0
  156. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/_backend.py +0 -0
  157. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/_native/__init__.py +0 -0
  158. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/_native/backend.cpp +0 -0
  159. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/_native/backend.hpp +0 -0
  160. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/_native/module.cpp +0 -0
  161. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/_native/module.hpp +0 -0
  162. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/_native/py_utils.hpp +0 -0
  163. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/_native/tensor_ops.cpp +0 -0
  164. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/_native/tensor_ops.hpp +0 -0
  165. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/_numpy_backend.py +0 -0
  166. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/_random_journal.py +0 -0
  167. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/_utils.py +0 -0
  168. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/array_.py +0 -0
  169. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/attention.py +0 -0
  170. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/audio/__init__.py +0 -0
  171. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/audio/mel.py +0 -0
  172. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/audio/specaugment.py +0 -0
  173. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/backend.py +0 -0
  174. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/build_from_dict.py +0 -0
  175. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/cond.py +0 -0
  176. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/const.py +0 -0
  177. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/container.py +0 -0
  178. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/control_flow_ctx.py +0 -0
  179. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/conv.py +0 -0
  180. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/conversions/__init__.py +0 -0
  181. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/conversions/espnet_e_branchformer.py +0 -0
  182. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/conversions/hf_llama.py +0 -0
  183. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/conversions/torch_nn.py +0 -0
  184. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/decoder/__init__.py +0 -0
  185. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/decoder/transformer.py +0 -0
  186. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/device.py +0 -0
  187. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/dims.py +0 -0
  188. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/dropout.py +0 -0
  189. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/dtype.py +0 -0
  190. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/encoder/__init__.py +0 -0
  191. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/encoder/base.py +0 -0
  192. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/encoder/conformer.py +0 -0
  193. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/encoder/e_branchformer.py +0 -0
  194. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/encoder/transformer.py +0 -0
  195. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/gradient.py +0 -0
  196. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/graph.py +0 -0
  197. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/hooks.py +0 -0
  198. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/init.py +0 -0
  199. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/label_smoothing.py +0 -0
  200. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/linear.py +0 -0
  201. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/loop.py +0 -0
  202. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/loss.py +0 -0
  203. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/math_.py +0 -0
  204. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/matmul.py +0 -0
  205. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/module.py +0 -0
  206. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/normalization.py +0 -0
  207. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/parameter.py +0 -0
  208. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/parametrizations.py +0 -0
  209. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/parametrize.py +0 -0
  210. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/piecewise_linear.py +0 -0
  211. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/rand.py +0 -0
  212. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/rec.py +0 -0
  213. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/reduce.py +0 -0
  214. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/run_ctx.py +0 -0
  215. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/signal.py +0 -0
  216. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/state.py +0 -0
  217. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/stepwise_scheduler.py +0 -0
  218. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/tensor_array.py +0 -0
  219. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/frontend/types.py +0 -0
  220. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/import_/__init__.py +0 -0
  221. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/import_/common.py +0 -0
  222. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/import_/git.py +0 -0
  223. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/import_/import_.py +0 -0
  224. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/learning_rate_control.py +0 -0
  225. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/log.py +0 -0
  226. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/native_op.cpp +0 -0
  227. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/native_op.py +0 -0
  228. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/pretrain.py +0 -0
  229. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/sprint/__init__.py +0 -0
  230. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/sprint/cache.py +0 -0
  231. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/sprint/control.py +0 -0
  232. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/sprint/error_signals.py +0 -0
  233. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/sprint/extern_interface.py +0 -0
  234. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/sprint/interface.py +0 -0
  235. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tensor/README.md +0 -0
  236. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tensor/__init__.py +0 -0
  237. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tensor/_tensor_extra.py +0 -0
  238. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tensor/_tensor_mixin_base.py +0 -0
  239. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tensor/_tensor_op_overloads.py +0 -0
  240. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tensor/control_flow_ctx.py +0 -0
  241. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tensor/dim.py +0 -0
  242. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tensor/marked_dim.py +0 -0
  243. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tensor/tensor.py +0 -0
  244. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tensor/tensor_dict.py +0 -0
  245. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tensor/utils.py +0 -0
  246. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/__init__.py +0 -0
  247. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/compat.py +0 -0
  248. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/data_pipeline.py +0 -0
  249. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/distributed.py +0 -0
  250. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/engine.py +0 -0
  251. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/frontend_layers/README.md +0 -0
  252. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/frontend_layers/__init__.py +0 -0
  253. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/frontend_layers/_backend.py +0 -0
  254. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/frontend_layers/_utils.py +0 -0
  255. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/frontend_layers/cond.py +0 -0
  256. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/frontend_layers/config_entry_points.py +0 -0
  257. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/frontend_layers/debug_eager_mode.py +0 -0
  258. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/frontend_layers/dims.py +0 -0
  259. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/frontend_layers/layer.py +0 -0
  260. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/frontend_layers/loop.py +0 -0
  261. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/frontend_layers/make_layer.py +0 -0
  262. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/frontend_layers/masked_computation.py +0 -0
  263. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/frontend_layers/parameter_assign.py +0 -0
  264. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/frontend_layers/prev_tensor_ref.py +0 -0
  265. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/frontend_low_level/__init__.py +0 -0
  266. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/frontend_low_level/_backend.py +0 -0
  267. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/horovod.py +0 -0
  268. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/hyper_param_tuning.py +0 -0
  269. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/layers/__init__.py +0 -0
  270. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/layers/base.py +0 -0
  271. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/layers/basic.py +0 -0
  272. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/layers/rec.py +0 -0
  273. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/layers/segmental_model.py +0 -0
  274. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/layers/signal_processing.py +0 -0
  275. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/layers/variable.py +0 -0
  276. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/native_op.py +0 -0
  277. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/network.py +0 -0
  278. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/sprint.py +0 -0
  279. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/updater.py +0 -0
  280. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/util/__init__.py +0 -0
  281. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/util/basic.py +0 -0
  282. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/util/data.py +0 -0
  283. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/util/gradient_checkpoint.py +0 -0
  284. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/util/ken_lm.py +0 -0
  285. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/tf/util/open_fst.py +0 -0
  286. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/torch/README.md +0 -0
  287. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/torch/__init__.py +0 -0
  288. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/torch/data/__init__.py +0 -0
  289. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/torch/data/extern_data.py +0 -0
  290. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/torch/data/pipeline.py +0 -0
  291. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/torch/data/queued_data_iter.py +0 -0
  292. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/torch/data/returnn_dataset_wrapper.py +0 -0
  293. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/torch/data/tensor_utils.py +0 -0
  294. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/torch/distributed.py +0 -0
  295. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/torch/engine.py +0 -0
  296. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/torch/frontend/__init__.py +0 -0
  297. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/torch/frontend/_backend.py +0 -0
  298. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/torch/frontend/_rand.py +0 -0
  299. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/torch/frontend/bridge.py +0 -0
  300. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/torch/frontend/raw_ops.py +0 -0
  301. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/torch/updater.py +0 -0
  302. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/torch/util/README.md +0 -0
  303. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/torch/util/__init__.py +0 -0
  304. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/torch/util/array_.py +0 -0
  305. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/torch/util/diagnose_gpu.py +0 -0
  306. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/torch/util/exception_helper.py +0 -0
  307. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/torch/util/gradient_checkpoint.py +0 -0
  308. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/torch/util/module.py +0 -0
  309. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/torch/util/scaled_gradient.py +0 -0
  310. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/util/__init__.py +0 -0
  311. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/util/better_exchook.py +0 -0
  312. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/util/bpe.py +0 -0
  313. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/util/debug.py +0 -0
  314. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/util/debug_helpers.py +0 -0
  315. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/util/file_cache.py +0 -0
  316. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/util/fsa.py +0 -0
  317. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/util/literal_py_to_pickle.py +0 -0
  318. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/util/math.py +0 -0
  319. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/util/multi_proc_non_daemonic_spawn.py +0 -0
  320. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/util/native_code_compiler.py +0 -0
  321. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/util/pprint.py +0 -0
  322. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/util/py-to-pickle.cpp +0 -0
  323. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/util/py_compat.py +0 -0
  324. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/util/py_ext_mod_compiler.py +0 -0
  325. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/util/result_with_reason.py +0 -0
  326. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/util/sig_proc.py +0 -0
  327. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/util/task_system.py +0 -0
  328. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/util/train_proc_manager.py +0 -0
  329. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn/util/watch_memory.py +0 -0
  330. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn.egg-info/SOURCES.txt +0 -0
  331. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn.egg-info/dependency_links.txt +0 -0
  332. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/returnn.egg-info/top_level.txt +0 -0
  333. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/rnn.py +0 -0
  334. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/setup.cfg +0 -0
  335. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/setup.py +0 -0
  336. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/DummySprintExec.py +0 -0
  337. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/PyCharm-inspection-profile.xml +0 -0
  338. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/PyCharm.idea/.gitignore +0 -0
  339. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/PyCharm.idea/.name +0 -0
  340. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/PyCharm.idea/codeStyleSettings.xml +0 -0
  341. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/PyCharm.idea/codeStyles/Project.xml +0 -0
  342. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/PyCharm.idea/codeStyles/codeStyleConfig.xml +0 -0
  343. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/PyCharm.idea/inspectionProfiles/Project_Default.xml +0 -0
  344. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/PyCharm.idea/inspectionProfiles/profiles_settings.xml +0 -0
  345. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/PyCharm.idea/misc.xml +0 -0
  346. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/PyCharm.idea/modules.xml +0 -0
  347. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/PyCharm.idea/returnn.iml +0 -0
  348. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/PyCharm.idea/scopes/scope_settings.xml +0 -0
  349. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/_set_num_threads1.py +0 -0
  350. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/_setup_returnn_env.py +0 -0
  351. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/_setup_test_env.py +0 -0
  352. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/bpe-unicode-demo.codes +0 -0
  353. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/bpe-unicode-demo.vocab +0 -0
  354. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/lexicon_opt.fst +0 -0
  355. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/lexicon_opt.isyms +0 -0
  356. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/lexicon_opt.jpg +0 -0
  357. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/lexicon_opt.osyms +0 -0
  358. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/lint_common.py +0 -0
  359. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/pycharm-inspect.py +0 -0
  360. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/pylint.py +0 -0
  361. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/returnn-as-framework.py +0 -0
  362. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/rf_utils.py +0 -0
  363. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/spelling.dic +0 -0
  364. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_Config.py +0 -0
  365. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_Dataset.py +0 -0
  366. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_Fsa.py +0 -0
  367. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_GeneratingDataset.py +0 -0
  368. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_HDFDataset.py +0 -0
  369. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_LearningRateControl.py +0 -0
  370. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_Log.py +0 -0
  371. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_Pretrain.py +0 -0
  372. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_ResNet.py +0 -0
  373. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_SprintDataset.py +0 -0
  374. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_SprintInterface.py +0 -0
  375. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_TFEngine.py +0 -0
  376. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_TFNativeOp.py +0 -0
  377. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_TFNetworkLayer.py +0 -0
  378. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_TFNetworkRecLayer.py +0 -0
  379. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_TFNetworkSigProcLayer.py +0 -0
  380. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_TFUpdater.py +0 -0
  381. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_TF_determinism.py +0 -0
  382. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_TaskSystem.py +0 -0
  383. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_TaskSystem_SharedMem.py +0 -0
  384. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_TranslationDataset.py +0 -0
  385. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_demos.py +0 -0
  386. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_fork_exec.py +0 -0
  387. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_hdf_dump.py +0 -0
  388. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_rf_array.py +0 -0
  389. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_rf_attention.py +0 -0
  390. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_rf_base.py +0 -0
  391. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_rf_cond.py +0 -0
  392. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_rf_const.py +0 -0
  393. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_rf_container.py +0 -0
  394. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_rf_conv.py +0 -0
  395. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_rf_decoder_transformer.py +0 -0
  396. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_rf_encoder_conformer.py +0 -0
  397. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_rf_gradient.py +0 -0
  398. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_rf_label_smoothing.py +0 -0
  399. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_rf_loop.py +0 -0
  400. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_rf_math.py +0 -0
  401. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_rf_normalization.py +0 -0
  402. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_rf_piecewise_linear.py +0 -0
  403. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_rf_rec.py +0 -0
  404. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_rf_reduce.py +0 -0
  405. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_rf_signal.py +0 -0
  406. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_tensor.py +0 -0
  407. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_tools.py +0 -0
  408. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_torch_dataset.py +0 -0
  409. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_torch_engine.py +0 -0
  410. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_torch_frontend.py +0 -0
  411. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_torch_internal_frontend.py +0 -0
  412. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/test_torch_util.py +0 -0
  413. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tests/torch_utils.py +0 -0
  414. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/_setup_returnn_env.py +0 -0
  415. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/analyze-dataset-batches.py +0 -0
  416. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/bliss-collect-seq-lens.py +0 -0
  417. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/bliss-dump-text.py +0 -0
  418. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/bliss-get-segment-names.py +0 -0
  419. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/bliss-to-ogg-zip.py +0 -0
  420. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/bpe-create-lexicon.py +0 -0
  421. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/calculate-word-error-rate.py +0 -0
  422. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/cleanup-old-models.py +0 -0
  423. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/collect-orth-symbols.py +0 -0
  424. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/collect-words.py +0 -0
  425. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/compile_native_op.py +0 -0
  426. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/compile_tf_graph.py +0 -0
  427. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/debug-dump-search-scores.py +0 -0
  428. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/debug-plot-search-scores.py +0 -0
  429. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/dump-dataset-raw-strings.py +0 -0
  430. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/dump-dataset.py +0 -0
  431. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/dump-forward-stats.py +0 -0
  432. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/dump-forward.py +0 -0
  433. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/dump-network-json.py +0 -0
  434. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/dump-pickle.py +0 -0
  435. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/extract_state_tying_from_dataset.py +0 -0
  436. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/get-attention-weights.py +0 -0
  437. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/get-best-model-epoch.py +0 -0
  438. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/hdf_dump.py +0 -0
  439. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/hdf_dump_translation_dataset.py +0 -0
  440. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/import-blocks-mt-model.py +0 -0
  441. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/import-t2t-mt-model.py +0 -0
  442. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/lattice_rescorer/.gitignore +0 -0
  443. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/lattice_rescorer/Makefile +0 -0
  444. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/lattice_rescorer/README.md +0 -0
  445. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/lattice_rescorer/example/README.md +0 -0
  446. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/lattice_rescorer/example/libs_list +0 -0
  447. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/lattice_rescorer/example/network.040/i600_m600_m600.sgd_b16_lr0_cl2.newbobabs.config +0 -0
  448. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/lattice_rescorer/example/network.040/i600_m600_m600.sgd_b16_lr0_cl2.newbobabs.keep_over_epoch.lstm2.config +0 -0
  449. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/lattice_rescorer/example/rescore_lattice.sh +0 -0
  450. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/lattice_rescorer/example/state_vars_list +0 -0
  451. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/lattice_rescorer/example/tensor_names_list +0 -0
  452. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/lattice_rescorer/file.h +0 -0
  453. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/lattice_rescorer/htklatticerescorer.cc +0 -0
  454. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/lattice_rescorer/htklatticerescorer.h +0 -0
  455. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/lattice_rescorer/main.cc +0 -0
  456. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/lattice_rescorer/rescorer.h +0 -0
  457. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/lattice_rescorer/vocabulary.cc +0 -0
  458. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/lattice_rescorer/vocabulary.h +0 -0
  459. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/tf_avg_checkpoints.py +0 -0
  460. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/tf_inspect_checkpoint.py +0 -0
  461. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/tf_inspect_summary_log.py +0 -0
  462. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/torch_avg_checkpoints.py +0 -0
  463. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/torch_export_to_onnx.py +0 -0
  464. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/torch_inspect_checkpoint.py +0 -0
  465. {returnn-1.20241011.20141 → returnn-1.20241015.225231}/tools/torch_inspect_checkpoint_and_opt.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: returnn
3
- Version: 1.20241011.20141
3
+ Version: 1.20241015.225231
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
@@ -0,0 +1,2 @@
1
+ version = '1.20241015.225231'
2
+ long_version = '1.20241015.225231+git.61705b1'
@@ -341,6 +341,10 @@ class OggZipDataset(CachedDataset2):
341
341
 
342
342
  return True
343
343
 
344
+ def supports_sharding(self) -> bool:
345
+ """:return: whether this dataset supports sharding"""
346
+ return True
347
+
344
348
  def supports_seq_order_sorting(self) -> bool:
345
349
  """supports sorting"""
346
350
  return True
@@ -111,6 +111,8 @@ class Dataset(object):
111
111
  min_chunk_size=0,
112
112
  chunking_variance=0,
113
113
  estimated_num_seqs=None,
114
+ _num_shards=1,
115
+ _shard_index=0,
114
116
  ):
115
117
  """
116
118
  :param str name: e.g. "train" or "eval"
@@ -134,6 +136,8 @@ class Dataset(object):
134
136
  :param str|None seq_order_seq_lens_file: for seq order, use the seq length given by this file
135
137
  :param int shuffle_frames_of_nseqs: shuffles the frames. not always supported
136
138
  :param None|int estimated_num_seqs: for progress reporting in case the real num_seqs is unknown
139
+ :param int _num_shards: number of shards the data is split into
140
+ :param int _shard_index: local shard index, when sharding is enabled
137
141
  """
138
142
  self.name = name or ("dataset_id%s" % id(self))
139
143
  self.lock = None # type: Optional[RLock] # Used when manipulating our data potentially from multiple threads.
@@ -167,6 +171,9 @@ class Dataset(object):
167
171
  self._chunking = chunking
168
172
  self.chunk_size, self.chunk_step, self.custom_chunking_func = self._parse_chunking(chunking)
169
173
  self._context_window = context_window
174
+ assert 0 <= _shard_index < _num_shards
175
+ self._num_shards = _num_shards
176
+ self._shard_index = _shard_index
170
177
  if isinstance(context_window, (tuple, list)):
171
178
  assert len(context_window) == 2
172
179
  for elem in context_window:
@@ -597,8 +604,10 @@ class Dataset(object):
597
604
  seq_index = [
598
605
  i for i in seq_index if (all_seq_tags[i] not in used_seq_tags, used_seq_tags.add(all_seq_tags[i]))[0]
599
606
  ]
600
- if partition_epoch > 1:
601
- seq_index = self._apply_partition_epoch(seq_index, partition_epoch, epoch)
607
+ if partition_epoch > 1 or self._num_shards > 1:
608
+ seq_index = self._apply_partition_epoch_and_sharding(
609
+ seq_index, partition_epoch, epoch, self._num_shards, self._shard_index
610
+ )
602
611
  if repeat_epoch > 1:
603
612
  seq_index = list(seq_index) * repeat_epoch
604
613
  if self.seq_tags_filter is not None:
@@ -622,28 +631,42 @@ class Dataset(object):
622
631
  return seq_index
623
632
 
624
633
  @classmethod
625
- def _apply_partition_epoch(cls, seq_index, partition_epoch, epoch):
634
+ def _apply_partition_epoch_and_sharding(
635
+ cls,
636
+ seq_index: Sequence[int],
637
+ partition_epoch: int,
638
+ epoch: Optional[int],
639
+ num_shards: int,
640
+ shard_index: int,
641
+ ) -> Sequence[int]:
626
642
  """
627
- :param typing.Sequence[int] seq_index: full list of ordered sequence indices
628
- :param int partition_epoch: number of partitions seq_index should be split into
629
- :param int|None epoch: current epoch
643
+ :param seq_index: full list of ordered sequence indices
644
+ :param partition_epoch: number of partitions seq_index should be split into
645
+ :param epoch: current epoch
646
+ :param num_shards: how many shards the data is split into
647
+ :param shard_index: index of the current data shard
630
648
  :return: partition of seq_index for current epoch
631
- :rtype: typing.Sequence[int]
632
649
  """
650
+ assert 0 <= shard_index < num_shards
633
651
  num_seqs = len(seq_index)
634
- current_partition = ((epoch or 1) - 1) % partition_epoch
635
- seqs_per_epoch = num_seqs // partition_epoch
636
- partition_sizes = [seqs_per_epoch + 1] * (num_seqs % partition_epoch) + [seqs_per_epoch] * (
637
- partition_epoch - num_seqs % partition_epoch
652
+ num_partitions = partition_epoch * num_shards
653
+ current_partition = (((epoch or 1) - 1) % partition_epoch) * num_shards + shard_index
654
+ seqs_per_epoch = num_seqs // num_partitions
655
+ partition_sizes = [seqs_per_epoch + 1] * (num_seqs % num_partitions) + [seqs_per_epoch] * (
656
+ num_partitions - num_seqs % num_partitions
638
657
  )
639
- assert sum(partition_sizes) == num_seqs and len(partition_sizes) == partition_epoch
658
+ assert sum(partition_sizes) == num_seqs and len(partition_sizes) == num_partitions
640
659
  partitions = functools.reduce(lambda a, x: a + [a[-1] + x], partition_sizes, [0]) # cumulative sum
641
- assert len(partitions) == partition_epoch + 1
660
+ assert len(partitions) == num_partitions + 1
642
661
  seq_index = seq_index[partitions[current_partition] : partitions[current_partition + 1]]
643
662
  assert len(seq_index) == partition_sizes[current_partition]
644
663
 
645
664
  return seq_index
646
665
 
666
+ def supports_sharding(self) -> bool:
667
+ """:return: whether the dataset supports sharding based on the seq_order"""
668
+ return False
669
+
647
670
  def _get_random_seed_for_epoch(self, epoch, num_epochs_fixed=1):
648
671
  """
649
672
  :param int|None epoch:
@@ -674,6 +697,9 @@ class Dataset(object):
674
697
  """
675
698
  self.epoch = epoch
676
699
  self.rnd_seq_drop = Random(self._get_random_seed_for_epoch(epoch=epoch))
700
+ assert (
701
+ self._num_shards == 1 or self.supports_sharding()
702
+ ), f"{self}: does not support sharding, but got num_shards == {self._num_shards}"
677
703
  return False
678
704
 
679
705
  def finish_epoch(self, *, free_resources: bool = False):
@@ -1486,6 +1512,10 @@ def _dataset_extend_default_kwargs_from_parent_dataset(
1486
1512
  return default_kwargs
1487
1513
  default_kwargs = default_kwargs.copy() if default_kwargs else {}
1488
1514
  default_kwargs.setdefault("random_seed_offset", parent_dataset.random_seed_offset)
1515
+ # noinspection PyProtectedMember
1516
+ default_kwargs.setdefault("_num_shards", parent_dataset._num_shards)
1517
+ # noinspection PyProtectedMember
1518
+ default_kwargs.setdefault("_shard_index", parent_dataset._shard_index)
1489
1519
  return default_kwargs
1490
1520
 
1491
1521
 
@@ -134,6 +134,10 @@ class CachedDataset(Dataset):
134
134
  """supports sorting"""
135
135
  return True
136
136
 
137
+ def supports_sharding(self) -> bool:
138
+ """supports sharding"""
139
+ return True
140
+
137
141
  def get_current_seq_order(self):
138
142
  assert self.cache_byte_size_limit_at_start == 0 # not implemented otherwise, we ignore _index_map
139
143
  return self._seq_index
@@ -168,17 +168,19 @@ class DistributeFilesDataset(CachedDataset2):
168
168
 
169
169
  self.distrib_shard_files = distrib_shard_files
170
170
  if distrib_shard_files:
171
+ assert self._num_shards == 1 and self._shard_index == 0, ( # ensure defaults are set
172
+ f"{self}: Cannot use both dataset-sharding via properties _num_shards and _shard index "
173
+ f"and {self.__class__.__name__}'s own sharding implementation based on the trainings rank and size."
174
+ )
171
175
  if _distrib_info:
172
176
  # If we're in a child process `_get_rank_and_size()` no longer works,
173
177
  # so we pass the info about the shards via a pickled property.
174
178
  # See also Dataset.__reduce__.
175
- self._shard_index = _distrib_info["shard_index"]
176
- self._num_shards = _distrib_info["num_shards"]
179
+ self._shard_index = _distrib_info["_shard_index"]
180
+ self._num_shards = _distrib_info["_num_shards"]
177
181
  else:
178
182
  self._shard_index, self._num_shards = _get_rank_and_size()
179
- else:
180
- self._shard_index = 0
181
- self._num_shards = 1
183
+ assert 0 <= self._shard_index < self._num_shards
182
184
 
183
185
  if _meta_info_cache:
184
186
  # This allows to skip the lazy init in self.initialize().
@@ -198,9 +200,13 @@ class DistributeFilesDataset(CachedDataset2):
198
200
  self._lazy_init_num_outputs()
199
201
  super().initialize()
200
202
 
203
+ def supports_sharding(self) -> bool:
204
+ """:return: whether the dataset supports sharding based on the seq_order"""
205
+ return True
206
+
201
207
  @property
202
208
  def _distrib_info(self):
203
- return {"num_shards": self._num_shards, "shard_index": self._shard_index}
209
+ return {"_num_shards": self._num_shards, "_shard_index": self._shard_index}
204
210
 
205
211
  @property
206
212
  def _meta_info_cache(self):
@@ -89,6 +89,10 @@ class GeneratingDataset(Dataset):
89
89
  self.added_data = []
90
90
  return True
91
91
 
92
+ def supports_sharding(self) -> bool:
93
+ """:return: whether this dataset supports sharding"""
94
+ return True
95
+
92
96
  def _cleanup_old_seqs(self, seq_idx_end):
93
97
  i = 0
94
98
  while i < len(self.added_data):
@@ -2286,6 +2290,10 @@ class LibriSpeechCorpus(CachedDataset2):
2286
2290
  """supports sorting"""
2287
2291
  return True
2288
2292
 
2293
+ def supports_sharding(self) -> bool:
2294
+ """:return: whether this dataset supports sharding"""
2295
+ return True
2296
+
2289
2297
  def get_current_seq_order(self):
2290
2298
  """
2291
2299
  :rtype: typing.Sequence[int]
@@ -2494,6 +2502,10 @@ class Enwik8Corpus(CachedDataset2):
2494
2502
  self._num_seqs = len(self._seq_order)
2495
2503
  return True
2496
2504
 
2505
+ def supports_sharding(self) -> bool:
2506
+ """:return: whether this dataset supports sharding"""
2507
+ return self._batch_num_seqs is None # otherwise the logic is not implemented
2508
+
2497
2509
  def _collect_single_seq(self, seq_idx):
2498
2510
  idx = self._seq_order[seq_idx]
2499
2511
  src_seq_start = self._seq_starts[idx]
@@ -742,6 +742,10 @@ class NextGenHDFDataset(CachedDataset2):
742
742
  """supports sorting"""
743
743
  return True
744
744
 
745
+ def supports_sharding(self) -> bool:
746
+ """:return: whether this dataset supports sharding"""
747
+ return True
748
+
745
749
  def _get_seq_length(self, orig_seq_idx):
746
750
  """
747
751
  :type orig_seq_idx: int
@@ -458,6 +458,10 @@ class LmDataset(CachedDataset2):
458
458
  """supports sorting"""
459
459
  return True
460
460
 
461
+ def supports_sharding(self) -> bool:
462
+ """:return: whether this dataset supports sharding"""
463
+ return True
464
+
461
465
  def get_total_num_seqs(self, *, fast: bool = False) -> int:
462
466
  """total num seqs"""
463
467
  if fast and self._orths_offsets_and_lens is None:
@@ -445,6 +445,14 @@ class MetaDataset(CachedDataset2):
445
445
  return True
446
446
  return False
447
447
 
448
+ def supports_sharding(self) -> bool:
449
+ """:return: whether this dataset supports sharding"""
450
+ return (
451
+ self.datasets[self.seq_order_control_dataset].supports_sharding()
452
+ if self.seq_order_control_dataset is not None
453
+ else True
454
+ )
455
+
448
456
  def get_current_seq_order(self):
449
457
  """
450
458
  :return: current seq order for the current epoch, after self.init_seq_order was called.
@@ -1141,8 +1149,10 @@ class CombinedDataset(CachedDataset2):
1141
1149
 
1142
1150
  assert sum(counters) == total_num_seqs
1143
1151
 
1144
- if self.partition_epoch:
1145
- seq_order = self._apply_partition_epoch(seq_order, self.partition_epoch, self.epoch)
1152
+ if self.partition_epoch or self._num_shards > 1:
1153
+ seq_order = self._apply_partition_epoch_and_sharding(
1154
+ seq_order, self.partition_epoch, self.epoch, self._num_shards, self._shard_index
1155
+ )
1146
1156
  if self.repeat_epoch:
1147
1157
  seq_order = seq_order * self.repeat_epoch
1148
1158
 
@@ -34,6 +34,7 @@ class MultiProcDataset(CachedDataset2):
34
34
  dataset: Dict[str, Any],
35
35
  num_workers: int,
36
36
  buffer_size: int,
37
+ sharding_method: str = "seq_order",
37
38
  _meta_info_cache: Optional[Dict[str, Any]] = None,
38
39
  **kwargs,
39
40
  ):
@@ -41,6 +42,12 @@ class MultiProcDataset(CachedDataset2):
41
42
  :param dataset: the dataset to use
42
43
  :param num_workers: number of workers to use
43
44
  :param buffer_size: buffer size for each worker, amount of seqs to prefetch
45
+ :param sharding_method: which method to use for sharding the data across the worker procs.
46
+ The default is ``seq_order``, which fetches the full list of seq indices,
47
+ and then distributes shards of that to the other workers.
48
+ Can also be set to ``dedicated`` to enable a worker-index based sharding method.
49
+ This is compatible with more types of datasets, in particular those
50
+ that do not know their total number of segments upfront.
44
51
  :param _meta_info_cache: for internal use
45
52
  """
46
53
  super().__init__(**kwargs)
@@ -52,6 +59,12 @@ class MultiProcDataset(CachedDataset2):
52
59
  self.dataset = dataset
53
60
  self.num_workers = num_workers
54
61
  self.buffer_size = buffer_size
62
+ allowed_sharding_methods = ["seq_order", "dedicated"]
63
+ if sharding_method not in allowed_sharding_methods:
64
+ raise ValueError(
65
+ f"invalid sharding_method '{sharding_method}', must be {' or '.join(allowed_sharding_methods)}"
66
+ )
67
+ self._sharding_method = sharding_method
55
68
  self._data_keys = None
56
69
  self._num_seqs = None
57
70
  self._total_num_seqs = None
@@ -88,61 +101,81 @@ class MultiProcDataset(CachedDataset2):
88
101
  }
89
102
 
90
103
  def _lazy_init(self):
91
- if not self._worker_procs:
92
- _mp = NonDaemonicSpawnContext(process_pre_init_func=SubProcCopyGlobalConfigPreInitFunc())
104
+ if self._worker_procs:
105
+ return
106
+
107
+ _mp = NonDaemonicSpawnContext(process_pre_init_func=SubProcCopyGlobalConfigPreInitFunc())
93
108
 
109
+ seq_order_to_worker = [] # type: List[mpConnection]
110
+ worker_from_seq_order = [] # type: List[mpConnection]
111
+ if self._sharding_method == "seq_order":
94
112
  # Seq order proc (first worker) directly sends the seq order to each (other) worker.
95
- seq_order_to_worker = [] # type: List[mpConnection]
96
- worker_from_seq_order = [] # type: List[mpConnection]
97
113
  for i in range(self.num_workers - 1):
98
114
  reader, writer = _mp.Pipe(duplex=False)
99
115
  seq_order_to_worker.append(writer)
100
116
  worker_from_seq_order.append(reader)
101
117
 
102
- worker_parent_conns = [] # type: List[mpConnection]
103
- worker_child_conns = [] # type: List[mpConnection]
104
- for i in range(self.num_workers):
105
- parent_conn, child_conn = _mp.Pipe()
106
- worker_parent_conns.append(parent_conn)
107
- worker_child_conns.append(child_conn)
108
-
109
- worker_procs = []
110
- for i in range(self.num_workers):
111
- worker_proc = _mp.Process(
112
- name=f"{self.name} worker proc {i + 1}/{self.num_workers}",
113
- target=self._worker_proc_loop,
114
- args=(
115
- i,
116
- self.dataset,
117
- self.buffer_size,
118
- worker_child_conns[i],
119
- worker_from_seq_order[i - 1] if i > 0 else None,
120
- seq_order_to_worker if i == 0 else None,
121
- ),
122
- daemon=True,
118
+ worker_parent_conns = [] # type: List[mpConnection]
119
+ worker_child_conns = [] # type: List[mpConnection]
120
+ for i in range(self.num_workers):
121
+ parent_conn, child_conn = _mp.Pipe()
122
+ worker_parent_conns.append(parent_conn)
123
+ worker_child_conns.append(child_conn)
124
+
125
+ worker_procs = []
126
+ for i in range(self.num_workers):
127
+ if self._sharding_method == "seq_order":
128
+ sub_dataset = self.dataset
129
+ args = (
130
+ i,
131
+ sub_dataset,
132
+ self.buffer_size,
133
+ worker_child_conns[i],
134
+ worker_from_seq_order[i - 1] if i > 0 else None,
135
+ seq_order_to_worker if i == 0 else None,
136
+ self._sharding_method,
137
+ )
138
+ elif self._sharding_method == "dedicated":
139
+ sub_dataset = {**self.dataset, "_num_shards": self.num_workers, "_shard_index": i}
140
+ args = (
141
+ i,
142
+ sub_dataset,
143
+ self.buffer_size,
144
+ worker_child_conns[i],
145
+ None,
146
+ None,
147
+ self._sharding_method,
123
148
  )
124
- worker_proc.start()
125
- worker_procs.append(worker_proc)
126
- # Make sure the child connection is closed here.
127
- # It stays open in the child, until the child dies.
128
- # When that happens, now any consecutive read on the pipe
129
- # should yield an exception -- which is what we want,
130
- # otherwise it would just hang.
131
- worker_child_conns[i].close()
132
-
133
- self._seq_order_proc_parent_conn = worker_parent_conns[0] # type: mpConnection
134
- self._worker_parent_conns = worker_parent_conns
135
- self._worker_procs = worker_procs
136
-
137
- self._seq_order_proc_parent_conn.send(("init", {}))
138
- msg, self.num_inputs = self._seq_order_proc_parent_conn.recv()
139
- assert msg == "num_inputs"
140
- msg, self.num_outputs = self._seq_order_proc_parent_conn.recv()
141
- assert msg == "num_outputs"
142
- msg, self._total_num_seqs = self._seq_order_proc_parent_conn.recv()
143
- assert msg == "total_num_seqs"
144
- msg, self.labels = self._seq_order_proc_parent_conn.recv()
145
- assert msg == "labels"
149
+ else:
150
+ raise ValueError(f"{self}: unknown sharding_method: {self._sharding_method}")
151
+ worker_proc = _mp.Process(
152
+ name=f"{self.name} worker proc {i + 1}/{self.num_workers}",
153
+ target=self._worker_proc_loop,
154
+ args=args,
155
+ daemon=True,
156
+ )
157
+ worker_proc.start()
158
+ worker_procs.append(worker_proc)
159
+ # Make sure the child connection is closed here.
160
+ # It stays open in the child, until the child dies.
161
+ # When that happens, now any consecutive read on the pipe
162
+ # should yield an exception -- which is what we want,
163
+ # otherwise it would just hang.
164
+ worker_child_conns[i].close()
165
+
166
+ self._seq_order_proc_parent_conn = worker_parent_conns[0] # type: mpConnection
167
+ self._worker_parent_conns = worker_parent_conns
168
+ self._worker_procs = worker_procs
169
+
170
+ self._seq_order_proc_parent_conn.send(("init", {}))
171
+ msg, self.num_inputs = self._seq_order_proc_parent_conn.recv()
172
+ assert msg == "num_inputs"
173
+ msg, self.num_outputs = self._seq_order_proc_parent_conn.recv()
174
+ assert msg == "num_outputs"
175
+ msg, self._total_num_seqs = self._seq_order_proc_parent_conn.recv()
176
+ assert msg == "total_num_seqs"
177
+ msg, self.labels = self._seq_order_proc_parent_conn.recv()
178
+ assert msg == "labels"
146
179
 
147
180
  def __del__(self):
148
181
  if self._worker_procs:
@@ -165,6 +198,7 @@ class MultiProcDataset(CachedDataset2):
165
198
  parent_conn: mpConnection,
166
199
  seq_order_conn: Optional[mpConnection],
167
200
  other_worker_conns: Optional[List[mpConnection]],
201
+ sharding_method: str,
168
202
  ):
169
203
  if sys.platform == "linux":
170
204
  with open("/proc/self/comm", "w") as f:
@@ -256,23 +290,40 @@ class MultiProcDataset(CachedDataset2):
256
290
  elif msg == "init_seq_order":
257
291
  if dataset is None:
258
292
  dataset = init_dataset(dataset_dict)
259
- if worker_index == 0:
260
- # We are responsible to get the seq order and distrib it to all the other workers.
261
- assert other_worker_conns is not None
262
- dataset.init_seq_order(**kwargs)
263
- seq_order = dataset.get_current_seq_order()
264
- for i, worker_conn in enumerate(other_worker_conns):
265
- worker_conn.send(("seq_order_shard", seq_order[i + 1 :: len(other_worker_conns) + 1]))
266
- parent_conn.send(("num_seqs", len(seq_order)))
267
- # Now reset seq order for ourself (as the role of a normal worker).
268
- kwargs["seq_order"] = seq_order[0 :: len(other_worker_conns) + 1]
269
- kwargs.pop("seq_list", None)
293
+ if sharding_method == "dedicated":
270
294
  dataset.init_seq_order(**kwargs)
295
+ try:
296
+ num_seqs = dataset.num_seqs
297
+ except NotImplementedError:
298
+ num_seqs = None
299
+ parent_conn.send(("num_seqs", num_seqs))
300
+ elif sharding_method == "seq_order":
301
+ if worker_index == 0:
302
+ # We are responsible to get the seq order and distrib it to all the other workers.
303
+ assert other_worker_conns is not None
304
+ dataset.init_seq_order(**kwargs)
305
+ try:
306
+ seq_order = dataset.get_current_seq_order()
307
+ except Exception as exc:
308
+ raise Exception(
309
+ f"{MultiProcDataset.__name__}: `get_current_seq_order()` failed on {dataset}. "
310
+ f'Consider trying {MultiProcDataset.__name__}\'s "sharding_method": "dedicated", '
311
+ "which uses a different method for distributing the segments across workers."
312
+ ) from exc
313
+ for i, worker_conn in enumerate(other_worker_conns):
314
+ worker_conn.send(("seq_order_shard", seq_order[i + 1 :: len(other_worker_conns) + 1]))
315
+ parent_conn.send(("num_seqs", len(seq_order)))
316
+ # Now reset seq order for ourself (as the role of a normal worker).
317
+ kwargs["seq_order"] = seq_order[0 :: len(other_worker_conns) + 1]
318
+ kwargs.pop("seq_list", None)
319
+ dataset.init_seq_order(**kwargs)
320
+ else:
321
+ assert seq_order_conn is not None
322
+ msg_, seq_order = seq_order_conn.recv()
323
+ assert msg_ == "seq_order_shard"
324
+ dataset.init_seq_order(seq_order=seq_order, **kwargs)
271
325
  else:
272
- assert seq_order_conn is not None
273
- msg_, seq_order = seq_order_conn.recv()
274
- assert msg_ == "seq_order_shard"
275
- dataset.init_seq_order(seq_order=seq_order, **kwargs)
326
+ raise ValueError(f"{MultiProcDataset.__name__}: unknown sharding_method: {sharding_method}")
276
327
  got_init_seq_order = True
277
328
  next_seq_idx = 0
278
329
  cache[:] = []
@@ -300,8 +351,28 @@ class MultiProcDataset(CachedDataset2):
300
351
  :returns whether the order changed (True is always safe to return)
301
352
  """
302
353
  super().init_seq_order(epoch=epoch, seq_list=seq_list, seq_order=seq_order)
303
- if epoch is not None or seq_list is not None or seq_order is not None:
304
- self._lazy_init()
354
+
355
+ if epoch is None and seq_list is None and seq_order is None:
356
+ self._num_seqs = 0
357
+ return True
358
+
359
+ self._lazy_init()
360
+
361
+ if self._sharding_method == "dedicated":
362
+ for worker_conn in self._worker_parent_conns:
363
+ worker_conn.send(("init_seq_order", {"epoch": epoch, "seq_list": seq_list, "seq_order": seq_order}))
364
+ num_child_seqs = []
365
+ for worker_conn in self._worker_parent_conns:
366
+ msg, num_seqs = worker_conn.recv()
367
+ assert msg == "num_seqs"
368
+ num_child_seqs.append(num_seqs)
369
+ if all(num_s is None for num_s in num_child_seqs):
370
+ self._num_seqs = None
371
+ elif all(num_s is not None for num_s in num_child_seqs):
372
+ self._num_seqs = sum(num_child_seqs, 0)
373
+ else:
374
+ raise ValueError(f"heterogenous num_seqs in child datasets: {num_child_seqs}")
375
+ elif self._sharding_method == "seq_order":
305
376
  self._seq_order_proc_parent_conn.send(
306
377
  ("init_seq_order", {"epoch": epoch, "seq_list": seq_list, "seq_order": seq_order})
307
378
  )
@@ -311,13 +382,11 @@ class MultiProcDataset(CachedDataset2):
311
382
  assert msg == "num_seqs"
312
383
  self._num_seqs = num_seqs
313
384
  else:
314
- self._num_seqs = 0
385
+ raise ValueError(f"{self}: unknown sharding_method: {self._sharding_method}")
315
386
 
316
387
  return True
317
388
 
318
389
  def _collect_single_seq(self, seq_idx: int) -> Optional[DatasetSeq]:
319
- if seq_idx >= self._num_seqs:
320
- return None
321
390
  worker_idx = seq_idx % self.num_workers
322
391
  worker = self._worker_parent_conns[worker_idx]
323
392
  worker.send(("get_data_seq", {"seq_idx": seq_idx // self.num_workers}))
@@ -329,11 +398,6 @@ class MultiProcDataset(CachedDataset2):
329
398
  data.seq_idx = seq_idx
330
399
  return data
331
400
 
332
- @property
333
- def num_seqs(self) -> int:
334
- """num seqs"""
335
- return self._num_seqs
336
-
337
401
  def get_total_num_seqs(self, *, fast: bool = False) -> int:
338
402
  """total num seqs"""
339
403
  if self._total_num_seqs is not None:
@@ -186,6 +186,13 @@ class PostprocessingDataset(CachedDataset2):
186
186
  pass # some datasets don't know their num_seqs
187
187
  return True
188
188
 
189
+ def get_current_seq_order(self):
190
+ """:return: current seq order of wrapped dataset, if map_seq_stream is not used"""
191
+ if self._map_seq_stream is not None:
192
+ raise Exception(f"{self}: get_current_seq_order is not allowed when map_seq_stream is set.")
193
+ assert self._dataset is not None
194
+ return self._dataset.get_current_seq_order()
195
+
189
196
  def get_data_keys(self):
190
197
  """:return: available data keys"""
191
198
  return list(self._out_tensor_dict_template.data.keys())
@@ -194,6 +201,11 @@ class PostprocessingDataset(CachedDataset2):
194
201
  """:return: dtype of data entry `key`"""
195
202
  return self._out_tensor_dict_template.data[key].dtype
196
203
 
204
+ def supports_sharding(self) -> bool:
205
+ """:return: whether this dataset supports sharding"""
206
+ assert self._dataset is not None
207
+ return self._dataset.supports_sharding()
208
+
197
209
  def _collect_single_seq(self, seq_idx: int) -> Optional[DatasetSeq]:
198
210
  while True:
199
211
  try:
@@ -1235,6 +1235,10 @@ class SprintCacheDataset(CachedDataset2):
1235
1235
  """supports sorting"""
1236
1236
  return True
1237
1237
 
1238
+ def supports_sharding(self) -> bool:
1239
+ """:return: whether this dataset supports sharding"""
1240
+ return True
1241
+
1238
1242
  def get_dataset_seq_for_name(self, name, seq_idx=-1):
1239
1243
  """
1240
1244
  :param str name:
@@ -29,10 +29,10 @@ class DimTypes:
29
29
  """
30
30
 
31
31
  Unspecified = None
32
- Batch = Entity("batch")
33
- Spatial = Entity("spatial") # also time
32
+ Batch = Entity("batch", global_base=_d, global_name="Dim.Types.Batch")
33
+ Spatial = Entity("spatial", global_base=_d, global_name="Dim.Types.Spatial") # also time
34
34
  Time = Spatial # we don't treat this as different
35
- Feature = Entity("feature")
35
+ Feature = Entity("feature", global_base=_d, global_name="Dim.Types.Feature")
36
36
  Types = (Batch, Spatial, Feature)
37
37
 
38
38
 
@@ -83,19 +83,38 @@ class Entity:
83
83
  This is more efficient than using just the string directly in an enum.
84
84
  """
85
85
 
86
- def __init__(self, name=None):
86
+ def __init__(
87
+ self, name: Optional[str] = None, *, global_base: Optional[Any] = None, global_name: Optional[str] = None
88
+ ):
87
89
  """
88
90
  :param str|None name:
89
91
  """
90
92
  self.name = name
93
+ if global_name and not global_base:
94
+ frame = try_get_stack_frame(1)
95
+ global_base = sys.modules[frame.f_globals["__name__"]]
96
+ self.global_base = global_base
97
+ self.global_name = global_name
91
98
 
92
99
  def __str__(self):
93
- return self.name
100
+ return self.name or self.global_name or "<unnamed Entity>"
94
101
 
95
102
  def __repr__(self):
96
- return "<%s>" % self.name
103
+ return "<%s Entity>" % (self.name or self.global_name or "unnamed")
104
+
105
+ def __reduce__(self):
106
+ if self.global_name:
107
+ # Sanity check that the global ref is correct.
108
+ attrs = self.global_name.split(".")
109
+ assert attr_chain(self.global_base, attrs) is self
110
+ parent = attr_chain(self.global_base, attrs[:-1])
111
+ assert getattr(parent, attrs[-1]) is self
112
+ return getattr, (parent, attrs[-1])
113
+ raise Exception("Cannot pickle Entity object. (%r)" % self)
97
114
 
98
115
  def __getstate__(self):
116
+ if self.global_name:
117
+ raise Exception("We expect that __reduce__ is used, not __getstate__.")
99
118
  raise Exception("Cannot pickle Entity object. (%r)" % self)
100
119
 
101
120