[SOT] Add `SotCapturedException` by DrRyanHuang · Pull Request #72472 · PaddlePaddle/Paddle

Conversation

@DrRyanHuang

PR Category

Execute Infrastructure

PR Types

New features

Description

添加 SotCapturedException 类,在SOT模拟字节码执行过程中,将所遇到的 Exception 映射为 SotCapturedException,方便SOT对Python异常处理相关字节码的模拟

PCard-66972

@paddle-bot

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@DrRyanHuang

SigureMo

SigureMo

Choose a reason for hiding this comment

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

LGTMeow 🐾

不影响合入

Comment on lines +404 to +410

origin_exc: Exception | None = None,
exc_type: type[Exception] | None = None,
args: list[Any] | tuple[Any] | None = None,
context: Exception | None = None,
cause: Exception | None = None,
suppress_context: bool | None = None,
traceback: None = None,

Choose a reason for hiding this comment

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

这里需要这么多可选值吗?没必要的不建议用可选值,args 有必要用三种类型吗?建议用一种,tuple 类型标注也不对,如果是多个元素应该是 tuple[Any, ...]

@SigureMo SigureMo changed the title [SOT][3.13] Add SotCapturedException [SOT] Add SotCapturedException

Apr 28, 2025

YqGe585 pushed a commit to YqGe585/Paddle that referenced this pull request

May 7, 2025

Labels

2 participants

@DrRyanHuang @SigureMo