returnn 1.20250317.160550__py3-none-any.whl → 1.20250318.214311__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/util/better_exchook.py +23 -7
- {returnn-1.20250317.160550.dist-info → returnn-1.20250318.214311.dist-info}/METADATA +1 -1
- {returnn-1.20250317.160550.dist-info → returnn-1.20250318.214311.dist-info}/RECORD +8 -8
- {returnn-1.20250317.160550.dist-info → returnn-1.20250318.214311.dist-info}/LICENSE +0 -0
- {returnn-1.20250317.160550.dist-info → returnn-1.20250318.214311.dist-info}/WHEEL +0 -0
- {returnn-1.20250317.160550.dist-info → returnn-1.20250318.214311.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.20250318.214311'
|
|
2
|
+
long_version = '1.20250318.214311+git.0d4a307'
|
returnn/util/better_exchook.py
CHANGED
|
@@ -66,7 +66,7 @@ except ImportError:
|
|
|
66
66
|
|
|
67
67
|
try:
|
|
68
68
|
from traceback import StackSummary, FrameSummary
|
|
69
|
-
except ImportError:
|
|
69
|
+
except ImportError: # StackSummary, FrameSummary were added in Python 3.5
|
|
70
70
|
|
|
71
71
|
class _Dummy:
|
|
72
72
|
pass
|
|
@@ -930,31 +930,36 @@ class _OutputLinesCollector:
|
|
|
930
930
|
self.lines = []
|
|
931
931
|
self.dom_term = DomTerm() if DomTerm.is_domterm() else None
|
|
932
932
|
|
|
933
|
-
def __call__(self, s1, s2=None, **kwargs):
|
|
933
|
+
def __call__(self, s1, s2=None, merge_into_prev=True, **kwargs):
|
|
934
934
|
"""
|
|
935
935
|
Adds to self.lines.
|
|
936
936
|
This strange function signature is for historical reasons.
|
|
937
937
|
|
|
938
938
|
:param str s1:
|
|
939
939
|
:param str|None s2:
|
|
940
|
+
:param bool merge_into_prev: if True and existing self.lines, merge into prev line.
|
|
940
941
|
:param kwargs: passed to self.color
|
|
941
942
|
"""
|
|
942
943
|
if kwargs:
|
|
943
944
|
s1 = self.color(s1, **kwargs)
|
|
944
945
|
if s2 is not None:
|
|
945
946
|
s1 = add_indent_lines(s1, s2)
|
|
946
|
-
self.lines
|
|
947
|
+
if merge_into_prev and self.lines:
|
|
948
|
+
self.lines[-1] += s1 + "\n"
|
|
949
|
+
else:
|
|
950
|
+
self.lines.append(s1 + "\n")
|
|
947
951
|
|
|
948
952
|
@contextlib.contextmanager
|
|
949
|
-
def fold_text_ctx(self, line):
|
|
953
|
+
def fold_text_ctx(self, line, merge_into_prev=True):
|
|
950
954
|
"""
|
|
951
955
|
Folds text, via :class:`DomTerm`, if available.
|
|
952
956
|
Notes that this temporarily overwrites self.lines.
|
|
953
957
|
|
|
954
958
|
:param str line: always visible
|
|
959
|
+
:param bool merge_into_prev: if True and existing self.lines, merge into prev line.
|
|
955
960
|
"""
|
|
956
961
|
if not self.dom_term:
|
|
957
|
-
self.__call__(line)
|
|
962
|
+
self.__call__(line, merge_into_prev=merge_into_prev)
|
|
958
963
|
yield
|
|
959
964
|
return
|
|
960
965
|
self.lines, old_lines = [], self.lines # overwrite self.lines
|
|
@@ -970,7 +975,10 @@ class _OutputLinesCollector:
|
|
|
970
975
|
line = line[1:]
|
|
971
976
|
self.dom_term.fold_text(line, hidden=hidden_text, file=output_buf, align=len(prefix))
|
|
972
977
|
output_text = prefix[1:] + output_buf.getvalue()
|
|
973
|
-
self.lines
|
|
978
|
+
if merge_into_prev and self.lines:
|
|
979
|
+
self.lines[-1] += output_text
|
|
980
|
+
else:
|
|
981
|
+
self.lines.append(output_text)
|
|
974
982
|
|
|
975
983
|
def _pp_extra_info(self, obj, depth_limit=3):
|
|
976
984
|
"""
|
|
@@ -1197,7 +1205,7 @@ def format_tb(
|
|
|
1197
1205
|
name,
|
|
1198
1206
|
]
|
|
1199
1207
|
)
|
|
1200
|
-
with output.fold_text_ctx(file_descr):
|
|
1208
|
+
with output.fold_text_ctx(file_descr, merge_into_prev=False):
|
|
1201
1209
|
source_code = get_source_code(filename, lineno, f.f_globals)
|
|
1202
1210
|
if source_code:
|
|
1203
1211
|
source_code = remove_indent_lines(replace_tab_indents(source_code)).rstrip()
|
|
@@ -1689,6 +1697,14 @@ class ExtendedFrameSummary(FrameSummary):
|
|
|
1689
1697
|
super(ExtendedFrameSummary, self).__init__(**kwargs)
|
|
1690
1698
|
self.tb_frame = frame
|
|
1691
1699
|
|
|
1700
|
+
def __reduce__(self):
|
|
1701
|
+
# We deliberately serialize this as just a FrameSummary,
|
|
1702
|
+
# excluding the tb_frame, as this cannot be serialized (via pickle at least),
|
|
1703
|
+
# and also we do not want this to be serialized.
|
|
1704
|
+
# We also exclude _line and locals as it's not so easy to add them here,
|
|
1705
|
+
# and also not so important.
|
|
1706
|
+
return FrameSummary, (self.filename, self.lineno, self.name)
|
|
1707
|
+
|
|
1692
1708
|
|
|
1693
1709
|
class DummyFrame:
|
|
1694
1710
|
"""
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
returnn/PKG-INFO,sha256=
|
|
1
|
+
returnn/PKG-INFO,sha256=ad2i6uCYdaa6fq8vzbwhfZfT_h_Baai_WZp3-gABaSg,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=QxRiQyIvJSPE6v4w_WN2ZTQAJzkql4VUcgu5L3ijZTU,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
|
|
@@ -234,7 +234,7 @@ returnn/torch/util/module.py,sha256=MXHIrF9Isu575DDJIa81212ULKwdqu1oOLxDVZecVSk,
|
|
|
234
234
|
returnn/torch/util/scaled_gradient.py,sha256=3585VuNypBty-pW6r3BKK047H3MqZQSdMjXeYAb4cmU,3192
|
|
235
235
|
returnn/util/__init__.py,sha256=UIG1qw4idqhW71BV60ha7h9PktxvEVcBIu0lYRossK8,336
|
|
236
236
|
returnn/util/basic.py,sha256=eLlzR-ARGWJoiyRb5-SH5v2zx1jgR_5vuQ5jwYO5Cww,142380
|
|
237
|
-
returnn/util/better_exchook.py,sha256=
|
|
237
|
+
returnn/util/better_exchook.py,sha256=TAtb_ZyM-357UnOg_HMoBZUSxzt0WPgumlvprmlCprA,63921
|
|
238
238
|
returnn/util/bpe.py,sha256=LWFhICZsEOnMwNws0lybPNzKRX6rSr8yKCvP65vjl9Y,19656
|
|
239
239
|
returnn/util/debug.py,sha256=wuRzdg9zB84WWCGyTjmRR_zYypu8gXxlc0nZ6si9OC8,28224
|
|
240
240
|
returnn/util/debug_helpers.py,sha256=0EINLK4uLtoSt5_kHs1M2NIFpMd0S7i4c4rx90U4fJk,2914
|
|
@@ -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.20250318.214311.dist-info/LICENSE,sha256=ywBD_U2aD4vpuoIgNAsjIGBYydl0tVKll3De0Z8s77c,11041
|
|
257
|
+
returnn-1.20250318.214311.dist-info/METADATA,sha256=ad2i6uCYdaa6fq8vzbwhfZfT_h_Baai_WZp3-gABaSg,5215
|
|
258
|
+
returnn-1.20250318.214311.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
|
|
259
|
+
returnn-1.20250318.214311.dist-info/top_level.txt,sha256=Lsn4WZc5Pbfk0-xDQOgnFCxOoqxL4CyeM3N1TFbJncw,8
|
|
260
|
+
returnn-1.20250318.214311.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|