returnn 1.20250211.210150__py3-none-any.whl → 1.20250212.155802__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of returnn might be problematic. Click here for more details.
- returnn/PKG-INFO +1 -1
- returnn/_setup_info_generated.py +2 -2
- returnn/frontend/_cache.py +3 -0
- returnn/frontend/audio/specaugment.py +20 -18
- returnn/util/lru_cache.py +2 -1
- {returnn-1.20250211.210150.dist-info → returnn-1.20250212.155802.dist-info}/METADATA +1 -1
- {returnn-1.20250211.210150.dist-info → returnn-1.20250212.155802.dist-info}/RECORD +10 -10
- {returnn-1.20250211.210150.dist-info → returnn-1.20250212.155802.dist-info}/LICENSE +0 -0
- {returnn-1.20250211.210150.dist-info → returnn-1.20250212.155802.dist-info}/WHEEL +0 -0
- {returnn-1.20250211.210150.dist-info → returnn-1.20250212.155802.dist-info}/top_level.txt +0 -0
returnn/PKG-INFO
CHANGED
returnn/_setup_info_generated.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
version = '1.
|
|
2
|
-
long_version = '1.
|
|
1
|
+
version = '1.20250212.155802'
|
|
2
|
+
long_version = '1.20250212.155802+git.51918eb'
|
returnn/frontend/_cache.py
CHANGED
|
@@ -39,6 +39,9 @@ class Cache:
|
|
|
39
39
|
# not shared over all instances of this class.
|
|
40
40
|
self._lru_cache = lru_cache(max_size)(_lru_cache_dummy_func)
|
|
41
41
|
|
|
42
|
+
def __repr__(self):
|
|
43
|
+
return f"<{self.__class__.__module__}.{self.__class__.__qualname__} {self._lru_cache.cache_info()}>"
|
|
44
|
+
|
|
42
45
|
def get(self, key, default=None):
|
|
43
46
|
"""
|
|
44
47
|
:param key:
|
|
@@ -44,25 +44,27 @@ def specaugment(
|
|
|
44
44
|
x_masked = x
|
|
45
45
|
spatial_len = spatial_dim.get_dim_value_tensor()
|
|
46
46
|
# time mask
|
|
47
|
-
|
|
48
|
-
x_masked
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
rf.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
47
|
+
if max_consecutive_spatial_dims > 0 and num_spatial_mask_factor > 0:
|
|
48
|
+
x_masked = random_mask(
|
|
49
|
+
x_masked,
|
|
50
|
+
mask_axis=spatial_dim,
|
|
51
|
+
broadcast_axis=feature_dim,
|
|
52
|
+
min_num=rf.minimum(step1 + step2, spatial_len),
|
|
53
|
+
max_num=rf.minimum(
|
|
54
|
+
rf.maximum(spatial_len // num_spatial_mask_factor, 2) * (step0 + step1 + step2 * 2), spatial_len
|
|
55
|
+
),
|
|
56
|
+
max_dims=max_consecutive_spatial_dims,
|
|
57
|
+
)
|
|
57
58
|
# feature mask
|
|
58
|
-
|
|
59
|
-
x_masked
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
59
|
+
if max_consecutive_feature_dims > 0:
|
|
60
|
+
x_masked = random_mask(
|
|
61
|
+
x_masked,
|
|
62
|
+
mask_axis=feature_dim,
|
|
63
|
+
broadcast_axis=spatial_dim,
|
|
64
|
+
min_num=step1 + step2,
|
|
65
|
+
max_num=step0 * 2 + step1 + step2 * 2,
|
|
66
|
+
max_dims=max_consecutive_feature_dims,
|
|
67
|
+
)
|
|
66
68
|
return x_masked
|
|
67
69
|
|
|
68
70
|
return rf.cond(rf.get_run_ctx().train_flag | (not only_on_train), _mask_branch, lambda: x)
|
returnn/util/lru_cache.py
CHANGED
|
@@ -196,7 +196,7 @@ def _lru_cache_wrapper(user_function, maxsize: int, typed: bool):
|
|
|
196
196
|
"""
|
|
197
197
|
Removes the entry from the cache.
|
|
198
198
|
"""
|
|
199
|
-
nonlocal hits, misses
|
|
199
|
+
nonlocal hits, misses, full
|
|
200
200
|
key = make_key(args, kwargs, typed)
|
|
201
201
|
with lock:
|
|
202
202
|
link = cache_get(key)
|
|
@@ -208,6 +208,7 @@ def _lru_cache_wrapper(user_function, maxsize: int, typed: bool):
|
|
|
208
208
|
oldvalue = link[RESULT]
|
|
209
209
|
link.clear()
|
|
210
210
|
del cache[oldkey]
|
|
211
|
+
full = cache_len() >= maxsize
|
|
211
212
|
return oldvalue
|
|
212
213
|
if fallback is not_specified:
|
|
213
214
|
raise KeyError("key not found")
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
returnn/PKG-INFO,sha256=
|
|
1
|
+
returnn/PKG-INFO,sha256=xdtQHT-Fi1y7BOcDVBr3H0Zng8daLVy1ynfAWc245lY,5215
|
|
2
2
|
returnn/__init__.py,sha256=biBtRsM0WZ406vShaeH-9WFoqJ8XwTbn6g0EeFJ7l8E,1012
|
|
3
3
|
returnn/__main__.py,sha256=qBFbuB1yN3adgVM5pXt2-Yq9vorjRNchNPL8kDKx44M,31752
|
|
4
4
|
returnn/__old_mod_loader__.py,sha256=nvsNY-xELdS_IPNkv66Q9Rmvg4dbGW0-EBRDcCmctos,7654
|
|
5
5
|
returnn/__setup__.py,sha256=22kQn2fh11iPM0hLb2Fy5sLmoU1JGvmDxXRYuRgQkwU,4659
|
|
6
|
-
returnn/_setup_info_generated.py,sha256=
|
|
6
|
+
returnn/_setup_info_generated.py,sha256=cDHTBiDio3dRhpH6jwi7dPW8SnLTpG5N66gm0NoY6Kw,77
|
|
7
7
|
returnn/config.py,sha256=3tmKhB6FnQZaNdtcYsiB61JnEY--iZ2qmJ4yq0b6tE0,29140
|
|
8
8
|
returnn/forward_iface.py,sha256=A_OJiaXsX4MlXQRzST86ylyxSUZbC402PQL1REcqHjM,911
|
|
9
9
|
returnn/learning_rate_control.py,sha256=ZvWryAn_tv9DhV8sh1LV3eE34Yltl3On3mYZAG4hR9s,34684
|
|
@@ -76,7 +76,7 @@ returnn/extern/graph_editor/transform.py,sha256=d9fEgu0JC342q0g9niVxRWMKzkQQA9mr
|
|
|
76
76
|
returnn/extern/graph_editor/util.py,sha256=QMrQeQZ7lJwsrNQub9tof0h3quEaoHiGJaZmogQ7jXE,18707
|
|
77
77
|
returnn/frontend/__init__.py,sha256=2aS7nbxXniIrBp2DODl0xN0f3IJ_dX4Bi9ZlR7W5_DE,1472
|
|
78
78
|
returnn/frontend/_backend.py,sha256=datTTGM6xhvpiSPphDZgRjruU-SxrowG15_ZnTkEKy0,50108
|
|
79
|
-
returnn/frontend/_cache.py,sha256=
|
|
79
|
+
returnn/frontend/_cache.py,sha256=JAhi7L-raQ3A-NC3JUYDtdRTwT3BGJJGGZxrZ8MfEWQ,8403
|
|
80
80
|
returnn/frontend/_numpy_backend.py,sha256=_akZZkZplzR8XNVIrenvR99s-CapWDYL9WSD7VXwGYI,7790
|
|
81
81
|
returnn/frontend/_random_journal.py,sha256=_ktP_mjgx8vtQQGX_DofdhewJj0aPiczefTWeemPkmo,5457
|
|
82
82
|
returnn/frontend/_utils.py,sha256=4A3MSRM0i86J77550uR_AjcBEPu6nymLUZ9Xd1V3Fkc,12073
|
|
@@ -129,7 +129,7 @@ returnn/frontend/_native/tensor_ops.cpp,sha256=G_geJq_9yaTYoG7YsZydiTTkJoqdYB-D8
|
|
|
129
129
|
returnn/frontend/_native/tensor_ops.hpp,sha256=dDqvUejRNHjItnmOP5aHyAQbAmXmXoDVXSe3tveEU8A,3732
|
|
130
130
|
returnn/frontend/audio/__init__.py,sha256=8mahwucBje8qHKw0bOvoySlvvD0rFKxviSvcAHSjiJY,67
|
|
131
131
|
returnn/frontend/audio/mel.py,sha256=VZdxf2mTLzLOXsLRzCvaad712Zf0c2iwdthrzeVfgxk,7885
|
|
132
|
-
returnn/frontend/audio/specaugment.py,sha256=
|
|
132
|
+
returnn/frontend/audio/specaugment.py,sha256=nw8PepKPPwmI13-QyGBm45QjnoY4I_FEjA-_X6KIwzM,5798
|
|
133
133
|
returnn/frontend/conversions/__init__.py,sha256=7plsDxWVYhASa-3qmqbdzSI34A9ujUH2iMkL3eRD0TI,84
|
|
134
134
|
returnn/frontend/conversions/espnet_e_branchformer.py,sha256=Mmp3G6nySy0CqeHa-um-RAuUSnFH1DKNjBbqQB_Pomo,9018
|
|
135
135
|
returnn/frontend/conversions/hf_llama.py,sha256=1WQOhQyUWwkAznaRqK2zpThP8XZbaomkaE8qMG_bZPY,9662
|
|
@@ -241,7 +241,7 @@ returnn/util/debug_helpers.py,sha256=0EINLK4uLtoSt5_kHs1M2NIFpMd0S7i4c4rx90U4fJk
|
|
|
241
241
|
returnn/util/file_cache.py,sha256=JvJ4C7NFr8WpiIN0hLk3c33oX4-JfWSpchTjY7JGpCc,23127
|
|
242
242
|
returnn/util/fsa.py,sha256=k2lJ8tyf_g44Xk1EPVLwDwpP4spoMTqIigDVOWocQHY,59177
|
|
243
243
|
returnn/util/literal_py_to_pickle.py,sha256=3dnjWPeeiDT2xp4bRDgIf9yddx7b1AG7mOKEn_jiSl8,2173
|
|
244
|
-
returnn/util/lru_cache.py,sha256=
|
|
244
|
+
returnn/util/lru_cache.py,sha256=Kd6j_SitMERTfXvNKGdtzErKXkZ4jCJNETtaCv4HzKM,11443
|
|
245
245
|
returnn/util/math.py,sha256=ximPqNsv0Wu6VNcCLqNfsmSu1s-VPsAJYt5nEvFZVtY,6691
|
|
246
246
|
returnn/util/multi_proc_non_daemonic_spawn.py,sha256=YCW3Gry0RJ9Dsc5bKfZ77Q06eLjq6winGniYllJE7PU,9057
|
|
247
247
|
returnn/util/native_code_compiler.py,sha256=T6eZwzNA7AnkpNpo61AbYVNVtKqdWBbQfvJEQVe-cHE,13172
|
|
@@ -253,8 +253,8 @@ returnn/util/sig_proc.py,sha256=Tjz0VOAVyqu2qDCF5HZ1JjALjcFsHcNkcd96WgZeKfE,7265
|
|
|
253
253
|
returnn/util/task_system.py,sha256=y4sMVXQ25Qd2z0rx03uOlXlkE-jbCYC1Sjfn-XlraVU,26003
|
|
254
254
|
returnn/util/train_proc_manager.py,sha256=Pjht28k6uz6BNQ47uW6Gf880iyq5q4wx7P_K2tmoAM8,3266
|
|
255
255
|
returnn/util/watch_memory.py,sha256=BR5P2kvBN6UI81cE0_1WAA6Hd1SByLbBaiDxvLhPOew,4213
|
|
256
|
-
returnn-1.
|
|
257
|
-
returnn-1.
|
|
258
|
-
returnn-1.
|
|
259
|
-
returnn-1.
|
|
260
|
-
returnn-1.
|
|
256
|
+
returnn-1.20250212.155802.dist-info/LICENSE,sha256=ywBD_U2aD4vpuoIgNAsjIGBYydl0tVKll3De0Z8s77c,11041
|
|
257
|
+
returnn-1.20250212.155802.dist-info/METADATA,sha256=xdtQHT-Fi1y7BOcDVBr3H0Zng8daLVy1ynfAWc245lY,5215
|
|
258
|
+
returnn-1.20250212.155802.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
259
|
+
returnn-1.20250212.155802.dist-info/top_level.txt,sha256=Lsn4WZc5Pbfk0-xDQOgnFCxOoqxL4CyeM3N1TFbJncw,8
|
|
260
|
+
returnn-1.20250212.155802.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|