returnn 1.20240619.184216__tar.gz → 1.20240620.105009__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.
- {returnn-1.20240619.184216/returnn.egg-info → returnn-1.20240620.105009}/PKG-INFO +1 -1
- returnn-1.20240620.105009/_setup_info_generated.py +2 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/datasets/basic.py +18 -6
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/datasets/distrib_files.py +80 -28
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/util/bpe.py +30 -39
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/util/file_cache.py +63 -11
- {returnn-1.20240619.184216 → returnn-1.20240620.105009/returnn.egg-info}/PKG-INFO +1 -1
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_Dataset.py +3 -3
- returnn-1.20240619.184216/_setup_info_generated.py +0 -2
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/.editorconfig +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/.gitignore +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/.gitmodules +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/.kateconfig +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/CHANGELOG.md +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/CODEOWNERS +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/CONTRIBUTING.md +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/LICENSE +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/MANIFEST.in +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/README.rst +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/__init__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/12AX.cluster_map +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/_setup_returnn_env.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-fwd.config +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-horovod-mpi.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-horovod-mpi.py.sh +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-horovod-mpi.sh +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-hyper-param-tuning.config +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-iter-dataset.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-list-devices.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-lua-torch-layer.config +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-pretrain.config +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-record-and-push-to-webserver.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-returnn-as-framework.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-rf-pt-benchmark.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-rf.config +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-rhn-enwik8.config +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-sprint-interface.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-tf-att-copy.config +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-tf-attention.config +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-tf-chunking-blstm.12ax.config +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-tf-contribrnn-lstm.12ax.config +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-tf-enc-dec.config +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-tf-hard-att-copy.config +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-tf-lstm-benchmark.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-tf-maxgradnorm-lstm.12ax.config +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-tf-native-lstm-lowmem.12ax.config +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-tf-native-lstm.12ax.config +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-tf-native-lstm2.12ax.config +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-tf-native-lstm2.12ax.tuned.config +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-tf-neural-transducer.12ax.config +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-tf-rec-explicit-lstm.config +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-tf-rec-explicit-rnn.config +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-tf-rec-self-att.config +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-tf-search-compiled-graph.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-tf-vanilla-lstm.12ax.config +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-timit-lstm-ctc.config +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-torch.config +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-upd-mult-model.lstm.12ax.config +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo.sh +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/mdlstm/IAM/IAM_lines/a01-000u-00.png +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/mdlstm/IAM/IAM_lines/a01-007-04.png +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/mdlstm/IAM/IAM_lines/a01-007-06.png +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/mdlstm/IAM/README.txt +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/mdlstm/IAM/chars.txt +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/mdlstm/IAM/config_demo +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/mdlstm/IAM/config_fwd +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/mdlstm/IAM/config_real +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/mdlstm/IAM/create_IAM_dataset.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/mdlstm/IAM/decode.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/mdlstm/IAM/features/raw/demo.h5 +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/mdlstm/IAM/go.sh +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/mdlstm/IAM/lines.txt +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/mdlstm/IAM/split/eval.txt +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/mdlstm/IAM/split/train.txt +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/mdlstm/IAM/split/valid.txt +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/mdlstm/README.md +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/mdlstm/artificial/create_test_h5.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/mdlstm/artificial/forwardconfig +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/mdlstm/artificial/go.sh +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/mdlstm/artificial/trainconfig +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/mdlstm/artificial_rgb/create_test_h5.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/mdlstm/artificial_rgb/forwardconfig +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/mdlstm/artificial_rgb/go.sh +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/mdlstm/artificial_rgb/trainconfig +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/pyproject.toml +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/requirements.txt +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/__init__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/__main__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/__old_mod_loader__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/__setup__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/config.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/datasets/__init__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/datasets/audio.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/datasets/bundle_file.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/datasets/cached.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/datasets/cached2.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/datasets/generating.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/datasets/hdf.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/datasets/lm.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/datasets/map.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/datasets/meta.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/datasets/multi_proc.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/datasets/normalization_data.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/datasets/numpy_dump.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/datasets/raw_wav.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/datasets/sprint.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/datasets/stereo.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/datasets/util/__init__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/datasets/util/feature_extraction.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/datasets/util/strings.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/datasets/util/vocabulary.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/engine/__init__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/engine/base.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/engine/batch.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/WarpRna/__init__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/WarpRna/__main__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/WarpRna/warp-rna/.git +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/WarpRna/warp-rna/.gitignore +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/WarpRna/warp-rna/LICENSE +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/WarpRna/warp-rna/README.md +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/WarpRna/warp-rna/aligner.gif +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/WarpRna/warp-rna/check.png +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/WarpRna/warp-rna/core.cu +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/WarpRna/warp-rna/core.h +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/WarpRna/warp-rna/core_cpu.cpp +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/WarpRna/warp-rna/pytorch_binding/LICENSE +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/WarpRna/warp-rna/pytorch_binding/MANIFEST.in +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/WarpRna/warp-rna/pytorch_binding/README.md +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/WarpRna/warp-rna/pytorch_binding/binding.cpp +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/WarpRna/warp-rna/pytorch_binding/core.cu +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/WarpRna/warp-rna/pytorch_binding/core.h +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/WarpRna/warp-rna/pytorch_binding/requirements.txt +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/WarpRna/warp-rna/pytorch_binding/setup.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/WarpRna/warp-rna/pytorch_binding/warp_rna/__init__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/WarpRna/warp-rna/pytorch_binding/warp_rna/test.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/WarpRna/warp-rna/ref_rna.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/WarpRna/warp-rna/tensorflow_binding/setup.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/WarpRna/warp-rna/tensorflow_binding/src/warp_rna_op.cc +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/WarpRna/warp-rna/tensorflow_binding/src/warp_rna_op_kernel_tmpl.h +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/WarpRna/warp-rna/tensorflow_binding/warp_rna/__init__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/WarpRna/warp-rna/test.cpp +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/__init__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/graph_editor/README.md +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/graph_editor/__init__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/graph_editor/edit.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/graph_editor/reroute.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/graph_editor/select.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/graph_editor/subgraph.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/graph_editor/transform.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/extern/graph_editor/util.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/forward_iface.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/__init__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/_backend.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/_native/__init__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/_native/backend.cpp +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/_native/backend.hpp +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/_native/module.cpp +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/_native/module.hpp +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/_native/py_utils.hpp +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/_native/tensor_ops.cpp +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/_native/tensor_ops.hpp +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/_numpy_backend.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/_random_journal.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/_utils.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/array_.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/attention.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/audio/__init__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/audio/mel.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/audio/specaugment.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/backend.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/build_from_dict.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/cond.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/const.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/container.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/control_flow_ctx.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/conv.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/decoder/__init__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/decoder/transformer.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/device.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/dims.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/dropout.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/dtype.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/encoder/__init__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/encoder/base.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/encoder/conformer.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/gradient.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/graph.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/hooks.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/init.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/label_smoothing.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/linear.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/loop.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/loss.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/math_.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/matmul.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/module.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/normalization.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/parameter.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/piecewise_linear.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/rand.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/rec.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/reduce.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/run_ctx.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/signal.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/state.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/stepwise_scheduler.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/tensor_array.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/frontend/types.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/import_/__init__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/import_/common.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/import_/git.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/import_/import_.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/learning_rate_control.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/log.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/native_op.cpp +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/native_op.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/pretrain.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/sprint/__init__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/sprint/cache.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/sprint/control.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/sprint/error_signals.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/sprint/extern_interface.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/sprint/interface.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tensor/README.md +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tensor/__init__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tensor/_dim_extra.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tensor/_tensor_extra.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tensor/_tensor_mixin_base.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tensor/_tensor_op_overloads.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tensor/control_flow_ctx.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tensor/dim.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tensor/marked_dim.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tensor/tensor.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tensor/tensor_dict.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tensor/utils.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/__init__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/compat.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/data_pipeline.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/distributed.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/engine.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/frontend_layers/README.md +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/frontend_layers/__init__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/frontend_layers/_backend.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/frontend_layers/_utils.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/frontend_layers/cond.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/frontend_layers/config_entry_points.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/frontend_layers/debug_eager_mode.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/frontend_layers/dims.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/frontend_layers/layer.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/frontend_layers/loop.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/frontend_layers/make_layer.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/frontend_layers/masked_computation.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/frontend_layers/parameter_assign.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/frontend_layers/prev_tensor_ref.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/frontend_low_level/__init__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/frontend_low_level/_backend.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/horovod.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/hyper_param_tuning.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/layers/__init__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/layers/base.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/layers/basic.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/layers/rec.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/layers/segmental_model.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/layers/signal_processing.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/layers/variable.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/native_op.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/network.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/sprint.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/updater.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/util/__init__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/util/basic.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/util/data.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/util/gradient_checkpoint.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/util/ken_lm.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/tf/util/open_fst.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/torch/README.md +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/torch/__init__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/torch/data/__init__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/torch/data/extern_data.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/torch/data/pipeline.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/torch/data/queued_data_iter.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/torch/data/returnn_dataset_wrapper.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/torch/data/tensor_utils.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/torch/distributed.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/torch/engine.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/torch/frontend/__init__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/torch/frontend/_backend.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/torch/frontend/_rand.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/torch/frontend/bridge.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/torch/frontend/raw_ops.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/torch/updater.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/torch/util/README.md +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/torch/util/__init__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/torch/util/diagnose_gpu.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/torch/util/scaled_gradient.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/util/__init__.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/util/basic.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/util/better_exchook.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/util/debug.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/util/debug_helpers.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/util/fsa.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/util/literal_py_to_pickle.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/util/math.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/util/multi_proc_non_daemonic_spawn.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/util/native_code_compiler.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/util/pprint.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/util/py-to-pickle.cpp +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/util/py_compat.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/util/py_ext_mod_compiler.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/util/result_with_reason.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/util/sig_proc.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/util/task_system.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/util/train_proc_manager.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn/util/watch_memory.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn.egg-info/SOURCES.txt +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn.egg-info/dependency_links.txt +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/returnn.egg-info/top_level.txt +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/rnn.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/setup.cfg +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/setup.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/DummySprintExec.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/PyCharm-inspection-profile.xml +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/PyCharm.idea/.gitignore +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/PyCharm.idea/.name +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/PyCharm.idea/codeStyleSettings.xml +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/PyCharm.idea/codeStyles/Project.xml +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/PyCharm.idea/codeStyles/codeStyleConfig.xml +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/PyCharm.idea/inspectionProfiles/Project_Default.xml +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/PyCharm.idea/inspectionProfiles/profiles_settings.xml +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/PyCharm.idea/misc.xml +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/PyCharm.idea/modules.xml +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/PyCharm.idea/returnn.iml +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/PyCharm.idea/scopes/scope_settings.xml +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/_set_num_threads1.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/_setup_returnn_env.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/_setup_test_env.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/bpe-unicode-demo.codes +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/bpe-unicode-demo.vocab +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/lexicon_opt.fst +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/lexicon_opt.isyms +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/lexicon_opt.jpg +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/lexicon_opt.osyms +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/lint_common.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/pycharm-inspect.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/pylint.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/returnn-as-framework.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/rf_utils.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/spelling.dic +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_Config.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_Fsa.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_GeneratingDataset.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_HDFDataset.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_LearningRateControl.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_Log.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_MultiProcDataset.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_Pretrain.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_ResNet.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_SprintDataset.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_SprintInterface.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_TFEngine.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_TFNativeOp.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_TFNetworkLayer.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_TFNetworkRecLayer.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_TFNetworkSigProcLayer.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_TFUpdater.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_TFUtil.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_TF_determinism.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_TaskSystem.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_TaskSystem_SharedMem.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_TranslationDataset.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_Util.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_demos.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_fork_exec.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_hdf_dump.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_rf_array.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_rf_attention.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_rf_base.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_rf_cond.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_rf_const.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_rf_container.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_rf_conv.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_rf_encoder_conformer.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_rf_gradient.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_rf_label_smoothing.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_rf_loop.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_rf_math.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_rf_normalization.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_rf_piecewise_linear.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_rf_rec.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_rf_reduce.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_rf_signal.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_tensor.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_tools.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_torch_dataset.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_torch_engine.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_torch_frontend.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tests/test_torch_internal_frontend.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/_setup_returnn_env.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/analyze-dataset-batches.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/bliss-collect-seq-lens.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/bliss-dump-text.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/bliss-get-segment-names.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/bliss-to-ogg-zip.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/bpe-create-lexicon.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/calculate-word-error-rate.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/cleanup-old-models.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/collect-orth-symbols.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/collect-words.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/compile_native_op.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/compile_tf_graph.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/debug-dump-search-scores.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/debug-plot-search-scores.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/dump-dataset-raw-strings.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/dump-dataset.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/dump-forward-stats.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/dump-forward.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/dump-network-json.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/dump-pickle.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/extract_state_tying_from_dataset.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/get-attention-weights.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/get-best-model-epoch.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/hdf_dump.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/hdf_dump_translation_dataset.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/import-blocks-mt-model.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/import-t2t-mt-model.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/lattice_rescorer/.gitignore +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/lattice_rescorer/Makefile +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/lattice_rescorer/README.md +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/lattice_rescorer/example/README.md +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/lattice_rescorer/example/libs_list +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/lattice_rescorer/example/network.040/i600_m600_m600.sgd_b16_lr0_cl2.newbobabs.config +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/lattice_rescorer/example/network.040/i600_m600_m600.sgd_b16_lr0_cl2.newbobabs.keep_over_epoch.lstm2.config +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/lattice_rescorer/example/rescore_lattice.sh +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/lattice_rescorer/example/state_vars_list +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/lattice_rescorer/example/tensor_names_list +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/lattice_rescorer/file.h +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/lattice_rescorer/htklatticerescorer.cc +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/lattice_rescorer/htklatticerescorer.h +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/lattice_rescorer/main.cc +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/lattice_rescorer/rescorer.h +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/lattice_rescorer/vocabulary.cc +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/lattice_rescorer/vocabulary.h +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/tf_avg_checkpoints.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/tf_inspect_checkpoint.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/tf_inspect_summary_log.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/torch_avg_checkpoints.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/torch_export_to_onnx.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/torch_inspect_checkpoint.py +0 -0
- {returnn-1.20240619.184216 → returnn-1.20240620.105009}/tools/torch_inspect_checkpoint_and_opt.py +0 -0
|
@@ -144,9 +144,7 @@ class Dataset(object):
|
|
|
144
144
|
self.window = window
|
|
145
145
|
self.seq_ordering = seq_ordering # "default", "sorted" or "random". See self.get_seq_order_for_epoch().
|
|
146
146
|
self.fixed_random_seed = fixed_random_seed
|
|
147
|
-
|
|
148
|
-
random_seed_offset = self._get_default_random_seed_offset()
|
|
149
|
-
self.random_seed_offset = random_seed_offset
|
|
147
|
+
self._random_seed_offset = random_seed_offset
|
|
150
148
|
self.partition_epoch = partition_epoch or 1
|
|
151
149
|
self.repeat_epoch = repeat_epoch or 1
|
|
152
150
|
self._seq_list_filter_file = seq_list_filter_file
|
|
@@ -242,18 +240,32 @@ class Dataset(object):
|
|
|
242
240
|
state = {attr: getattr(self, attr) for attr in ["epoch", "zpad"]}
|
|
243
241
|
return Dataset._create_from_reduce, (self.__class__, kwargs, state)
|
|
244
242
|
|
|
245
|
-
@
|
|
246
|
-
def
|
|
243
|
+
@property
|
|
244
|
+
def random_seed_offset(self) -> int:
|
|
245
|
+
""":return: random seed offset for shuffling"""
|
|
246
|
+
if self._random_seed_offset is None:
|
|
247
|
+
self._random_seed_offset = self._get_default_random_seed_offset()
|
|
248
|
+
return self._random_seed_offset
|
|
249
|
+
|
|
250
|
+
def _uses_custom_distributed_sharding(self) -> bool:
|
|
251
|
+
"""
|
|
252
|
+
:return: if dataset has its own data sharding logic independent of TF/PT.
|
|
253
|
+
Leads to a fixed random_seed_offset independent of the workers local rank.
|
|
254
|
+
"""
|
|
255
|
+
return False
|
|
256
|
+
|
|
257
|
+
def _get_default_random_seed_offset(self):
|
|
247
258
|
"""
|
|
248
259
|
:return: 0 usually
|
|
249
260
|
:rtype: int
|
|
250
261
|
"""
|
|
251
262
|
from returnn.config import get_global_config
|
|
252
263
|
|
|
264
|
+
if self._uses_custom_distributed_sharding():
|
|
265
|
+
return 0
|
|
253
266
|
config = get_global_config(raise_exception=False)
|
|
254
267
|
if not config:
|
|
255
268
|
return 0
|
|
256
|
-
|
|
257
269
|
env_val = os.environ.get(RANDOM_SEED_OFFSET_ENV_VAR)
|
|
258
270
|
if env_val is not None:
|
|
259
271
|
return int(env_val)
|
|
@@ -62,6 +62,12 @@ class DistributeFilesDataset(CachedDataset2):
|
|
|
62
62
|
Specifically, we don't want that some data might be visited more often than others
|
|
63
63
|
(at least its expected value should be the same).
|
|
64
64
|
|
|
65
|
+
In case the dataset grows so large it is unreasonable to expect one worker to
|
|
66
|
+
ever see all the data, this dataset can also shard the file list on a per-worker
|
|
67
|
+
basis before distributing across subepochs.
|
|
68
|
+
This behavior can be configured by setting the property ``"distrib_shard_files": True``.
|
|
69
|
+
The dataset attempts to split the files as evenly as possible based on the file size.
|
|
70
|
+
|
|
65
71
|
Example usage::
|
|
66
72
|
|
|
67
73
|
def get_sub_epoch_dataset(files_subepoch: List[str]) -> Dict[str, Any]:
|
|
@@ -131,6 +137,7 @@ class DistributeFilesDataset(CachedDataset2):
|
|
|
131
137
|
preload_next_n_sub_epochs: int = 1,
|
|
132
138
|
buffer_size: int = 1,
|
|
133
139
|
file_cache_opts: Optional[Dict[str, Any]] = None,
|
|
140
|
+
distrib_shard_files: bool = False,
|
|
134
141
|
_meta_info_cache: Optional[Dict[str, Any]] = None,
|
|
135
142
|
**kwargs,
|
|
136
143
|
):
|
|
@@ -140,6 +147,8 @@ class DistributeFilesDataset(CachedDataset2):
|
|
|
140
147
|
:param get_sub_epoch_dataset: callable which returns a dataset dict for a given subset of files
|
|
141
148
|
:param preload_next_n_sub_epochs: how many sub epoch datasets to preload
|
|
142
149
|
:param buffer_size: buffer size for each worker, amount of seqs to prefetch
|
|
150
|
+
:param distrib_shard_files: set to true to shard the data across worker processes in
|
|
151
|
+
distributed training scenaria
|
|
143
152
|
:param _meta_info_cache: for internal use
|
|
144
153
|
"""
|
|
145
154
|
super().__init__(**kwargs)
|
|
@@ -152,6 +161,7 @@ class DistributeFilesDataset(CachedDataset2):
|
|
|
152
161
|
self._file_sizes: Optional[Dict[str, int]] = None # key -> size. for equal distribution across sub epochs
|
|
153
162
|
self._data_keys: Optional[List[str]] = None
|
|
154
163
|
self._num_seqs: Optional[int] = None
|
|
164
|
+
self._shard_index, self._num_shards = _get_rank_and_size() if distrib_shard_files else 0, 1
|
|
155
165
|
|
|
156
166
|
self._file_cache: Optional[_FileCacheProc] = None
|
|
157
167
|
self._workers: Dict[int, _WorkerProcParent] = {} # epoch -> worker
|
|
@@ -187,6 +197,9 @@ class DistributeFilesDataset(CachedDataset2):
|
|
|
187
197
|
"file_sizes": self._file_sizes,
|
|
188
198
|
}
|
|
189
199
|
|
|
200
|
+
def _uses_custom_distributed_sharding(self) -> bool:
|
|
201
|
+
return self._num_shards > 1
|
|
202
|
+
|
|
190
203
|
def _lazy_init_num_outputs(self):
|
|
191
204
|
if self.num_outputs:
|
|
192
205
|
return
|
|
@@ -245,8 +258,9 @@ class DistributeFilesDataset(CachedDataset2):
|
|
|
245
258
|
self._lazy_init_file_sizes()
|
|
246
259
|
self._lazy_init_file_cache_proc()
|
|
247
260
|
|
|
248
|
-
# Cleanup and fill _files_order_cache.
|
|
249
261
|
full_epoch_0idx = (epoch - 1) // self.partition_epoch
|
|
262
|
+
|
|
263
|
+
# Cleanup and fill _files_order_cache, also shard files across GPU workers
|
|
250
264
|
for k in list(self._files_order_cache.keys()):
|
|
251
265
|
if k < full_epoch_0idx:
|
|
252
266
|
del self._files_order_cache[k]
|
|
@@ -257,15 +271,22 @@ class DistributeFilesDataset(CachedDataset2):
|
|
|
257
271
|
if self.seq_ordering == "default":
|
|
258
272
|
files_order_flat = self.files
|
|
259
273
|
elif self.seq_ordering == "random":
|
|
274
|
+
# when sharding, _get_random_seed_for_epoch makes sure to use a fixed
|
|
275
|
+
# random_seed_offset
|
|
260
276
|
rnd_seed = self._get_random_seed_for_epoch(full_epoch_0idx_ * self.partition_epoch + 1)
|
|
261
277
|
random_generator = numpy.random.RandomState(rnd_seed)
|
|
262
278
|
files_order_flat = list(self.files)
|
|
263
279
|
random_generator.shuffle(files_order_flat)
|
|
264
280
|
else:
|
|
265
281
|
raise ValueError(f"{self}: seq_ordering {self.seq_ordering!r} not supported")
|
|
266
|
-
|
|
267
|
-
|
|
282
|
+
file_bins = self._distribute_evenly_by_size(
|
|
283
|
+
num_bins=self._num_shards * self.partition_epoch,
|
|
284
|
+
file_sizes=self._file_sizes,
|
|
285
|
+
files_order=files_order_flat,
|
|
268
286
|
)
|
|
287
|
+
self_index_base = self.partition_epoch * self._shard_index
|
|
288
|
+
self_index_end = self_index_base + self.partition_epoch
|
|
289
|
+
self._files_order_cache[full_epoch_0idx_] = file_bins[self_index_base:self_index_end]
|
|
269
290
|
|
|
270
291
|
# Cleanup and fill _workers.
|
|
271
292
|
for k, worker in list(self._workers.items()):
|
|
@@ -308,62 +329,67 @@ class DistributeFilesDataset(CachedDataset2):
|
|
|
308
329
|
return dataset_dict, exit_hook
|
|
309
330
|
|
|
310
331
|
@staticmethod
|
|
311
|
-
def
|
|
312
|
-
*,
|
|
332
|
+
def _distribute_evenly_by_size(
|
|
333
|
+
*, num_bins: int, file_sizes: Dict[str, int], files_order: Sequence[FileTree]
|
|
313
334
|
) -> List[List[FileTree]]:
|
|
335
|
+
"""
|
|
336
|
+
Distributes the files from files_order into ``num_bins`` while attempting
|
|
337
|
+
to make every bin as evenly sized (based on ``file_sizes``) as possible.
|
|
338
|
+
"""
|
|
339
|
+
|
|
314
340
|
total_size = sum(file_sizes.values())
|
|
315
|
-
avg_size_per_sub_epoch = total_size /
|
|
316
|
-
# Now evenly distribute the files over the
|
|
341
|
+
avg_size_per_sub_epoch = total_size / num_bins
|
|
342
|
+
# Now evenly distribute the files over the bins.
|
|
317
343
|
# Note that many one-pass variants of algorithms to evenly distribute
|
|
318
|
-
# can end up with some empty
|
|
344
|
+
# can end up with some empty bins,
|
|
319
345
|
# so we need to make sure that this is not the case.
|
|
320
|
-
# E.g. consider the seqs of size [1,1,78,120] and
|
|
346
|
+
# E.g. consider the seqs of size [1,1,78,120] and num_bins=4.
|
|
321
347
|
# That has avg size per sub epoch 50.
|
|
322
348
|
# Some simple algorithms could end up with the sub epochs
|
|
323
349
|
# [[1,1], [78], [120], []] or [[1,1,78], [120], [], []].
|
|
324
|
-
# Or consider [5,5]+[10]*7,
|
|
350
|
+
# Or consider [5,5]+[10]*7, num_bins=5, which has avg size 16.
|
|
325
351
|
# A simple algorithm could end up with [[5,5,10], [10,10], [10,10], [10,10], []].
|
|
326
|
-
# See
|
|
327
|
-
assert len(files_order) >=
|
|
328
|
-
|
|
329
|
-
assert len(
|
|
330
|
-
|
|
352
|
+
# See test_DistributeFilesDataset_distribute_evenly_by_size for some test cases.
|
|
353
|
+
assert len(files_order) >= num_bins
|
|
354
|
+
files_per_bin = [[] for _ in range(num_bins)]
|
|
355
|
+
assert len(files_per_bin) == num_bins
|
|
356
|
+
bin_idx = 0
|
|
331
357
|
size_taken = 0
|
|
332
358
|
for i, f_tree in enumerate(files_order):
|
|
333
359
|
size = file_sizes[_get_key_for_file_tree(f_tree)]
|
|
334
360
|
num_remaining = len(files_order) - i
|
|
335
|
-
if num_remaining <=
|
|
361
|
+
if num_remaining <= num_bins - bin_idx - 1:
|
|
336
362
|
# All remaining sub epochs must be filled.
|
|
337
|
-
assert
|
|
338
|
-
|
|
339
|
-
|
|
363
|
+
assert files_per_bin[bin_idx]
|
|
364
|
+
bin_idx += 1
|
|
365
|
+
files_per_bin[bin_idx].append(f_tree)
|
|
340
366
|
size_taken = size
|
|
341
367
|
continue
|
|
342
|
-
if
|
|
368
|
+
if bin_idx == num_bins - 1:
|
|
343
369
|
# We are done. Just add the rest to the last sub epoch.
|
|
344
|
-
|
|
370
|
+
files_per_bin[bin_idx].append(f_tree)
|
|
345
371
|
size_taken += size
|
|
346
372
|
continue
|
|
347
373
|
assert size_taken <= avg_size_per_sub_epoch
|
|
348
374
|
if size_taken + size <= avg_size_per_sub_epoch:
|
|
349
|
-
|
|
375
|
+
files_per_bin[bin_idx].append(f_tree)
|
|
350
376
|
size_taken += size
|
|
351
377
|
continue
|
|
352
378
|
# We should increase the sub epoch index.
|
|
353
379
|
# We need to decide where to add this file, to the current or the next sub epoch.
|
|
354
|
-
if not
|
|
380
|
+
if not files_per_bin[bin_idx] or (
|
|
355
381
|
# Better to add this file to the current sub epoch?
|
|
356
382
|
abs((size_taken + size) - avg_size_per_sub_epoch)
|
|
357
383
|
<= abs(size_taken - avg_size_per_sub_epoch)
|
|
358
384
|
):
|
|
359
|
-
|
|
385
|
+
files_per_bin[bin_idx].append(f_tree)
|
|
360
386
|
size_taken = 0
|
|
361
387
|
else:
|
|
362
|
-
|
|
388
|
+
files_per_bin[bin_idx + 1].append(f_tree)
|
|
363
389
|
size_taken = size
|
|
364
|
-
|
|
365
|
-
assert all(
|
|
366
|
-
return
|
|
390
|
+
bin_idx += 1
|
|
391
|
+
assert all(files_per_bin)
|
|
392
|
+
return files_per_bin
|
|
367
393
|
|
|
368
394
|
def _collect_single_seq(self, seq_idx: int) -> Optional[DatasetSeq]:
|
|
369
395
|
if seq_idx >= self._num_seqs:
|
|
@@ -413,6 +439,32 @@ def _get_key_for_file_tree(t: FileTree) -> str:
|
|
|
413
439
|
return ":".join(tree.flatten(t))
|
|
414
440
|
|
|
415
441
|
|
|
442
|
+
def _get_rank_and_size() -> Tuple[int, int]:
|
|
443
|
+
"""
|
|
444
|
+
:return: tuple (rank, size): the global rank and size for distributed trainings
|
|
445
|
+
"""
|
|
446
|
+
|
|
447
|
+
from returnn.config import get_global_config
|
|
448
|
+
|
|
449
|
+
config = get_global_config(raise_exception=False)
|
|
450
|
+
if not config:
|
|
451
|
+
return 0, 1
|
|
452
|
+
if config.typed_value("torch_distributed") is not None:
|
|
453
|
+
import returnn.torch.distributed
|
|
454
|
+
|
|
455
|
+
ctx = returnn.torch.distributed.get_ctx(config=config)
|
|
456
|
+
return ctx.rank(), ctx.size()
|
|
457
|
+
elif config.is_true("use_horovod"):
|
|
458
|
+
assert config.bool("use_tensorflow", False) or config.value("backend", "").startswith("tensorflow")
|
|
459
|
+
|
|
460
|
+
import returnn.tf.horovod
|
|
461
|
+
|
|
462
|
+
ctx = returnn.tf.horovod.get_ctx(config=config)
|
|
463
|
+
return ctx.rank(), ctx.size()
|
|
464
|
+
else:
|
|
465
|
+
return 0, 1
|
|
466
|
+
|
|
467
|
+
|
|
416
468
|
class _WorkerProcParent:
|
|
417
469
|
def __init__(
|
|
418
470
|
self,
|
|
@@ -3,8 +3,7 @@ Provide basic Byte-Pair-Encoding (BPE) utilities.
|
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
|
-
from typing import Dict
|
|
7
|
-
import typing
|
|
6
|
+
from typing import Optional, List, Dict, Callable
|
|
8
7
|
import re
|
|
9
8
|
import numpy
|
|
10
9
|
|
|
@@ -234,10 +233,10 @@ class PrefixTree:
|
|
|
234
233
|
This class represents both a single node and the tree.
|
|
235
234
|
"""
|
|
236
235
|
|
|
237
|
-
def __init__(self, prefix="", root=None):
|
|
236
|
+
def __init__(self, prefix: str = "", root: Optional[PrefixTree] = None):
|
|
238
237
|
"""
|
|
239
|
-
:param
|
|
240
|
-
:param
|
|
238
|
+
:param prefix:
|
|
239
|
+
:param root:
|
|
241
240
|
"""
|
|
242
241
|
self.prefix = prefix
|
|
243
242
|
self.arcs: Dict[str, PrefixTree] = {} # single char (or BpePostMergeSymbol) -> sub tree
|
|
@@ -246,11 +245,10 @@ class PrefixTree:
|
|
|
246
245
|
self.is_root = not root
|
|
247
246
|
self.root = root
|
|
248
247
|
|
|
249
|
-
def add(self, postfix, root=None):
|
|
248
|
+
def add(self, postfix: str, root: Optional[PrefixTree] = None) -> PrefixTree:
|
|
250
249
|
"""
|
|
251
|
-
:param
|
|
252
|
-
:param
|
|
253
|
-
:rtype: PrefixTree
|
|
250
|
+
:param postfix:
|
|
251
|
+
:param root:
|
|
254
252
|
"""
|
|
255
253
|
if not root:
|
|
256
254
|
if self.is_root:
|
|
@@ -300,21 +298,21 @@ class CharSyncSearch:
|
|
|
300
298
|
Covers the search hyps and the search itself.
|
|
301
299
|
"""
|
|
302
300
|
|
|
303
|
-
def __init__(self, bpe, word, word_pos=0):
|
|
301
|
+
def __init__(self, bpe: PrefixTree, word: str, word_pos: int = 0):
|
|
304
302
|
"""
|
|
305
|
-
:param
|
|
306
|
-
:param
|
|
307
|
-
:param
|
|
303
|
+
:param bpe:
|
|
304
|
+
:param word:
|
|
305
|
+
:param word_pos:
|
|
308
306
|
"""
|
|
309
307
|
self.bpe = bpe
|
|
310
308
|
self.word = word
|
|
311
309
|
self.word_pos = word_pos
|
|
312
|
-
self.hyps = [Hyp(bpe_sym_history=[], cur_node=bpe)]
|
|
313
|
-
self.final_bpe_seqs
|
|
310
|
+
self.hyps: List[Hyp] = [Hyp(bpe_sym_history=[], cur_node=bpe)]
|
|
311
|
+
self.final_bpe_seqs: Optional[List[List[str]]] = None
|
|
314
312
|
|
|
315
313
|
def _get_finished(self):
|
|
316
314
|
assert self.word_pos == len(self.word)
|
|
317
|
-
finals
|
|
315
|
+
finals: List[List[str]] = []
|
|
318
316
|
for hyp in self.hyps:
|
|
319
317
|
if hyp.cur_node.finished:
|
|
320
318
|
finals.append(hyp.bpe_sym_history + [hyp.cur_node.prefix])
|
|
@@ -323,7 +321,7 @@ class CharSyncSearch:
|
|
|
323
321
|
def _expand(self):
|
|
324
322
|
assert self.word_pos < len(self.word)
|
|
325
323
|
char = self.word[self.word_pos]
|
|
326
|
-
new_hyps
|
|
324
|
+
new_hyps: List[Hyp] = []
|
|
327
325
|
for hyp in self.hyps:
|
|
328
326
|
if hyp.cur_node.bpe_finished:
|
|
329
327
|
# Start again from root node.
|
|
@@ -340,10 +338,9 @@ class CharSyncSearch:
|
|
|
340
338
|
new_hyps.append(Hyp(bpe_sym_history=hyp.bpe_sym_history, cur_node=next_node))
|
|
341
339
|
self.hyps = new_hyps
|
|
342
340
|
|
|
343
|
-
def search(self):
|
|
341
|
+
def search(self) -> List[List[str]]:
|
|
344
342
|
"""
|
|
345
343
|
:return: collection of possible BPE symbol seqs
|
|
346
|
-
:rtype: list[list[str]]
|
|
347
344
|
"""
|
|
348
345
|
while self.word_pos < len(self.word):
|
|
349
346
|
self._expand()
|
|
@@ -373,23 +370,20 @@ class DepthFirstSearch:
|
|
|
373
370
|
Depth-first search.
|
|
374
371
|
"""
|
|
375
372
|
|
|
376
|
-
def __init__(self, bpe, word, sampler=None):
|
|
373
|
+
def __init__(self, bpe: PrefixTree, word: str, sampler: Optional[Callable[[], bool]] = None):
|
|
377
374
|
"""
|
|
378
|
-
:param
|
|
379
|
-
:param
|
|
380
|
-
:param
|
|
375
|
+
:param bpe:
|
|
376
|
+
:param word:
|
|
377
|
+
:param sampler:
|
|
381
378
|
"""
|
|
382
379
|
self.bpe = bpe
|
|
383
380
|
self.word = word
|
|
384
381
|
self.sampler = sampler
|
|
385
|
-
self.hyps
|
|
386
|
-
self.final_bpe_seq
|
|
382
|
+
self.hyps: List[HypInPos] = []
|
|
383
|
+
self.final_bpe_seq: Optional[List[str]] = None
|
|
387
384
|
self._add_hyp(HypInPos(bpe_sym_history=[], cur_node=bpe, pos=0))
|
|
388
385
|
|
|
389
|
-
def _add_hyp(self, hyp):
|
|
390
|
-
"""
|
|
391
|
-
:param HypInPos hyp:
|
|
392
|
-
"""
|
|
386
|
+
def _add_hyp(self, hyp: HypInPos):
|
|
393
387
|
if hyp.pos >= len(self.word):
|
|
394
388
|
if hyp.cur_node.finished:
|
|
395
389
|
self.final_bpe_seq = hyp.bpe_sym_history + [hyp.cur_node.prefix]
|
|
@@ -401,7 +395,7 @@ class DepthFirstSearch:
|
|
|
401
395
|
|
|
402
396
|
# Now check for possible further hyps.
|
|
403
397
|
char = self.word[hyp.pos]
|
|
404
|
-
new_hyps
|
|
398
|
+
new_hyps: List[HypInPos] = []
|
|
405
399
|
if hyp.cur_node.bpe_finished:
|
|
406
400
|
# Start again from root node.
|
|
407
401
|
next_node = self.bpe.arcs.get(char)
|
|
@@ -423,10 +417,9 @@ class DepthFirstSearch:
|
|
|
423
417
|
for hyp in new_hyps:
|
|
424
418
|
self._add_hyp(hyp)
|
|
425
419
|
|
|
426
|
-
def search(self):
|
|
420
|
+
def search(self) -> Optional[List[str]]:
|
|
427
421
|
"""
|
|
428
422
|
:return: BPE symbol seq if one is found
|
|
429
|
-
:rtype: list[str]|None
|
|
430
423
|
"""
|
|
431
424
|
while self.hyps and self.final_bpe_seq is None:
|
|
432
425
|
self._expand()
|
|
@@ -459,23 +452,21 @@ class SamplingBytePairEncoder:
|
|
|
459
452
|
bpe.add(bpe_sym)
|
|
460
453
|
self._bpe_prefix_tree = bpe
|
|
461
454
|
|
|
462
|
-
def _sampler(self):
|
|
455
|
+
def _sampler(self) -> bool:
|
|
463
456
|
# When this returns true, it will differ from depth-first search.
|
|
464
457
|
return self.rnd.random_sample() <= self.breadth_prob
|
|
465
458
|
|
|
466
|
-
def get_bpe_split_for_word(self, word):
|
|
459
|
+
def get_bpe_split_for_word(self, word: str) -> Optional[List[str]]:
|
|
467
460
|
"""
|
|
468
|
-
:param
|
|
469
|
-
:rtype: list[str]|None
|
|
461
|
+
:param word:
|
|
470
462
|
"""
|
|
471
463
|
return DepthFirstSearch(bpe=self._bpe_prefix_tree, word=word, sampler=self._sampler).search()
|
|
472
464
|
|
|
473
|
-
def segment_sentence(self, sentence):
|
|
465
|
+
def segment_sentence(self, sentence: str) -> List[str]:
|
|
474
466
|
"""
|
|
475
467
|
Segment single sentence (whitespace-tokenized string) with BPE encoding.
|
|
476
468
|
|
|
477
|
-
:param
|
|
478
|
-
:rtype: list[str]
|
|
469
|
+
:param sentence:
|
|
479
470
|
"""
|
|
480
471
|
output = []
|
|
481
472
|
for word in sentence.split():
|
|
@@ -10,6 +10,7 @@ Main class is :class:`FileCache`.
|
|
|
10
10
|
"""
|
|
11
11
|
|
|
12
12
|
from typing import Any, Collection, List, Tuple
|
|
13
|
+
import errno
|
|
13
14
|
import os
|
|
14
15
|
import time
|
|
15
16
|
import shutil
|
|
@@ -56,6 +57,7 @@ class FileCache:
|
|
|
56
57
|
cleanup_files_always_older_than_days: float = 31.0,
|
|
57
58
|
cleanup_files_wanted_older_than_days: float = 7.0,
|
|
58
59
|
cleanup_disk_usage_wanted_free_ratio: float = 0.2, # try to free at least 20% disk space
|
|
60
|
+
num_tries: int = 3, # retry twice by default
|
|
59
61
|
):
|
|
60
62
|
"""
|
|
61
63
|
:param cache_directory: directory where to cache files.
|
|
@@ -64,6 +66,7 @@ class FileCache:
|
|
|
64
66
|
:param cleanup_files_wanted_older_than_days: if cleanup_disk_usage_wanted_free_ratio not reached,
|
|
65
67
|
cleanup files older than this.
|
|
66
68
|
:param cleanup_disk_usage_wanted_free_ratio: try to free at least this ratio of disk space.
|
|
69
|
+
:param num_tries: how many times to try caching a file before giving up
|
|
67
70
|
"""
|
|
68
71
|
self.cache_directory = expand_env_vars(cache_directory)
|
|
69
72
|
self._cleanup_files_always_older_than_days = cleanup_files_always_older_than_days
|
|
@@ -72,6 +75,8 @@ class FileCache:
|
|
|
72
75
|
self._touch_files_thread = _TouchFilesThread(cache_base_dir=self.cache_directory)
|
|
73
76
|
self._touch_files_thread.start()
|
|
74
77
|
self._recent_full_cleanup_time = float("-inf")
|
|
78
|
+
assert num_tries > 0
|
|
79
|
+
self._num_tries = num_tries
|
|
75
80
|
|
|
76
81
|
# Note on lock_timeout: It will check whether a potentially existing lock file is older than this timeout,
|
|
77
82
|
# and if so, then it would delete the existing lock file, assuming it is from a crashed previous run.
|
|
@@ -99,7 +104,23 @@ class FileCache:
|
|
|
99
104
|
:return: cached file path (in the cache directory)
|
|
100
105
|
"""
|
|
101
106
|
dst_filename = self._get_dst_filename(src_filename)
|
|
102
|
-
|
|
107
|
+
last_error = None
|
|
108
|
+
for try_nr in range(self._num_tries):
|
|
109
|
+
if try_nr > 0:
|
|
110
|
+
print(
|
|
111
|
+
f"FileCache: Ignoring error while copying {dst_filename}: {type(last_error).__name__}: {last_error}"
|
|
112
|
+
)
|
|
113
|
+
time.sleep(1)
|
|
114
|
+
try:
|
|
115
|
+
self._copy_file_if_needed(src_filename, dst_filename)
|
|
116
|
+
break
|
|
117
|
+
except OSError as e:
|
|
118
|
+
if e.errno == errno.ENOSPC:
|
|
119
|
+
last_error = e
|
|
120
|
+
else:
|
|
121
|
+
raise e
|
|
122
|
+
if last_error is not None:
|
|
123
|
+
raise last_error
|
|
103
124
|
self._touch_files_thread.files_extend([dst_filename])
|
|
104
125
|
return dst_filename
|
|
105
126
|
|
|
@@ -265,23 +286,21 @@ class FileCache:
|
|
|
265
286
|
os.utime(dst_filename, None) # touch
|
|
266
287
|
return
|
|
267
288
|
|
|
268
|
-
# Make sure we have enough disk space.
|
|
269
|
-
self.cleanup(need_at_least_free_space_size=os.stat(src_filename).st_size)
|
|
270
|
-
|
|
271
|
-
print(f"FileCache: Copy file {src_filename} to cache")
|
|
272
|
-
|
|
273
289
|
# Create dirs.
|
|
274
290
|
dst_dir = os.path.dirname(dst_filename)
|
|
275
291
|
os.makedirs(dst_dir, exist_ok=True)
|
|
276
292
|
|
|
277
293
|
# Copy the file, while holding a lock. See comment on lock_timeout above.
|
|
278
|
-
with LockFile(
|
|
279
|
-
directory=dst_dir, name=os.path.basename(dst_filename) + ".lock", lock_timeout=self._lock_timeout
|
|
280
|
-
) as lock:
|
|
294
|
+
with LockFile(directory=self.cache_directory, name="dir.lock", lock_timeout=self._lock_timeout) as lock:
|
|
281
295
|
# Maybe it was copied in the meantime, while waiting for the lock.
|
|
282
|
-
if
|
|
296
|
+
if self._check_existing_copied_file_maybe_cleanup(src_filename, dst_filename):
|
|
283
297
|
return
|
|
284
298
|
|
|
299
|
+
print(f"FileCache: Copy file {src_filename} to cache")
|
|
300
|
+
|
|
301
|
+
# Make sure we have enough disk space.
|
|
302
|
+
self.cleanup(need_at_least_free_space_size=os.stat(src_filename).st_size)
|
|
303
|
+
|
|
285
304
|
dst_tmp_filename = dst_filename + ".copy"
|
|
286
305
|
if os.path.exists(dst_tmp_filename):
|
|
287
306
|
# The minimum age should be at least the lock_timeout.
|
|
@@ -294,7 +313,7 @@ class FileCache:
|
|
|
294
313
|
)
|
|
295
314
|
|
|
296
315
|
with self._touch_files_thread.files_added_context([dst_dir, lock.lockfile]):
|
|
297
|
-
|
|
316
|
+
_copy_with_prealloc(src_filename, dst_tmp_filename)
|
|
298
317
|
os.rename(dst_tmp_filename, dst_filename)
|
|
299
318
|
|
|
300
319
|
@staticmethod
|
|
@@ -312,6 +331,39 @@ class FileCache:
|
|
|
312
331
|
return True
|
|
313
332
|
|
|
314
333
|
|
|
334
|
+
def _copy_with_prealloc(src: str, dst: str):
|
|
335
|
+
"""
|
|
336
|
+
Copies the file at `src` to `dst` preallocating the space at `dst` before the
|
|
337
|
+
copy to reduce the chance of race conditions w/ free-disk-space checks occuring.
|
|
338
|
+
|
|
339
|
+
Note the function preallocates `size + 1` to allow detecting incompletely copied
|
|
340
|
+
files by a mismatch in the file size, should the copy process be interrupted. The
|
|
341
|
+
additional byte is then truncated away after copying.
|
|
342
|
+
|
|
343
|
+
In practice this function is used to copy to a temporary file first, so the
|
|
344
|
+
+1-size trick is technically not necessary -- but it also does not hurt leaving
|
|
345
|
+
it in.
|
|
346
|
+
"""
|
|
347
|
+
file_size = os.stat(src).st_size
|
|
348
|
+
with open(dst, "wb") as dst_file:
|
|
349
|
+
if file_size > 0:
|
|
350
|
+
# Prealloc size + 1, see docstring for why.
|
|
351
|
+
#
|
|
352
|
+
# See also `_check_existing_copied_file_maybe_cleanup`.
|
|
353
|
+
if os.name == "posix":
|
|
354
|
+
os.posix_fallocate(dst_file.fileno(), 0, file_size + 1)
|
|
355
|
+
else:
|
|
356
|
+
dst_file.seek(file_size)
|
|
357
|
+
dst_file.write(b"\0")
|
|
358
|
+
dst_file.seek(0)
|
|
359
|
+
with open(src, "rb") as src_file:
|
|
360
|
+
if os.name == "posix":
|
|
361
|
+
os.posix_fadvise(src_file.fileno(), 0, file_size, os.POSIX_FADV_SEQUENTIAL)
|
|
362
|
+
os.posix_fadvise(dst_file.fileno(), 0, file_size, os.POSIX_FADV_SEQUENTIAL)
|
|
363
|
+
shutil.copyfileobj(src_file, dst_file)
|
|
364
|
+
dst_file.truncate(file_size)
|
|
365
|
+
|
|
366
|
+
|
|
315
367
|
@dataclass
|
|
316
368
|
class CachedFile:
|
|
317
369
|
"""
|
|
@@ -623,14 +623,14 @@ def test_MapDatasetWrapper():
|
|
|
623
623
|
assert res.features["data"].shape == (5, 3)
|
|
624
624
|
|
|
625
625
|
|
|
626
|
-
def
|
|
626
|
+
def test_DistributeFilesDataset_distribute_evenly_by_size():
|
|
627
627
|
from returnn.datasets.distrib_files import DistributeFilesDataset
|
|
628
628
|
|
|
629
629
|
def _test(sizes: List[int], partition_epoch: int, expected: List[List[int]]):
|
|
630
630
|
files = [f"file-{i}" for i in range(len(sizes))]
|
|
631
631
|
file_sizes = {f: s for f, s in zip(files, sizes)}
|
|
632
|
-
res = DistributeFilesDataset.
|
|
633
|
-
|
|
632
|
+
res = DistributeFilesDataset._distribute_evenly_by_size(
|
|
633
|
+
num_bins=partition_epoch, file_sizes=file_sizes, files_order=files
|
|
634
634
|
)
|
|
635
635
|
assert all(res) and len(res) == partition_epoch
|
|
636
636
|
assert set(sum(res, [])) == set(files)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{returnn-1.20240619.184216 → returnn-1.20240620.105009}/demos/demo-hyper-param-tuning.config
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|