Skip to content

Conversation

@0x45f
Copy link
Contributor

@0x45f 0x45f commented Oct 26, 2021

PR types

Others

PR changes

Others

Describe

show paddle traceback after last user code traceback

  1. 动转静模块报错信息优化之前,报错格式如下所示。其中( * user code *)指明了出错的用户代码行,报错信息中夹杂了框架层面的报错信息。
    image
  2. 动转静模块报错信息优化之后,报错格式如下所示。只保留了( * user code *)所指示的出错用户代码,将最后一个( * user code *)所指示用户代码进行了上下文扩展,并且将框架层面的报错信息全部隐藏了,简化了报错信息。
    image
  3. 但是优化后带来的问题是,将框架层面的报错信息全部隐藏,有时难以定位出错位置,比如2中截图显示动转静中调用int()出错,但是报错信息中并没有显示调用int的框架代码。本PR对这个问题进行了修改,显示了最后一条( * user code *)之后的框架报错信息,现在动转静模块的报错形式如下所示。
    image
@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Copy link
Contributor

@Aurelius84 Aurelius84 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Aurelius84 Aurelius84 merged commit 63f3ae0 into PaddlePaddle:develop Oct 27, 2021
@0x45f 0x45f deleted the dy2stat_polish_error branch October 27, 2021 02:12
0x45f added a commit to 0x45f/Paddle that referenced this pull request Oct 27, 2021
lanxianghit pushed a commit that referenced this pull request Oct 28, 2021
show paddle traceback after last user code traceback
ghost pushed a commit to piotrekobi/Paddle that referenced this pull request Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants