提交 339b6aba authored 作者: Frederic Bastien's avatar Frederic Bastien

when using traceback.compile_limit, keep internal stack trace.

上级 ac97e23a
......@@ -971,4 +971,5 @@ import theano and print the config variable, as in:
Bool value, default: 0
The number of user stack level to keep for variables during Theano
compilation.
compilation. If higher then 0, will make us keep Theano internal
stack trace.
......@@ -574,7 +574,8 @@ AddConfigVar(
AddConfigVar(
'traceback.compile_limit',
"The number of stack to trace to keep during compilation. -1 mean all.",
"The number of stack to trace to keep during compilation. -1 mean all."
" If greater then 0, will also make us save Theano internal stack trace.",
IntParam(0),
in_c_key=False)
......
......@@ -102,6 +102,9 @@ def add_tag_trace(thing, user_line=None):
"theano/sparse/", "theano\\sparse\\",
"theano/typed_list/", "theano\\typed_list\\"]
if config.traceback.compile_limit > 0:
skips = []
tr = simple_extract_stack(limit=user_line, skips=skips)
# Different python version use different sementic for
# limit. python 2.7 include the call to extrack_stack. The -1 get
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论