Skip to content

Conversation

@SigureMo
Copy link
Member

PR Category

Execute Infrastructure

PR Types

Devs

Description

SOT log 中添加调用层级,以提高 log 可读性

@SigureMo SigureMo requested a review from Copilot May 19, 2025 07:16
@paddle-bot
Copy link

paddle-bot bot commented May 19, 2025

你的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.

@SigureMo SigureMo changed the title [SOT] Add call level to opcode executor log [SOT][3.13] Add call level to opcode executor log May 19, 2025
@SigureMo SigureMo requested a review from gouzil May 19, 2025 07:17
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the SOT log in the opcode executor by adding the call level to improve log readability.

  • Adds call level information using the current call stack length.
  • Updates the log message formatting in the executor's step method.
if not hasattr(self, instr.opname):
raise FallbackError(f"opcode: {instr.opname} is not supported.")
log_message = f"[Translate {self._name}] (line {self._current_line:>3}) {instr.opname:<12} {instr.argval}, stack is {self.stack}\n"
log_message = f"[Translate {self._name} {len(self.call_stack)}] (line {self._current_line:>3}) {instr.opname:<12} {instr.argval}, stack is {self.stack}\n"
Copy link

Copilot AI May 19, 2025

Choose a reason for hiding this comment

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

Consider formatting the call level with an explicit label, for instance, '[Translate {self._name} | call level: {len(self.call_stack)}]' to clearly indicate what the number represents in the log output.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

太长了,不要

@SigureMo SigureMo requested review from DrRyanHuang and zrr1999 May 19, 2025 07:18
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (develop@919cf45). Learn more about missing BASE report.

Additional details and impacted files
@@ Coverage Diff @@ ## develop #72783 +/- ## =========================================== Coverage ? 100.00% =========================================== Files ? 1 Lines ? 1 Branches ? 0 =========================================== Hits ? 1 Misses ? 0 Partials ? 0 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
@SigureMo SigureMo changed the title [SOT][3.13] Add call level to opcode executor log [SOT] Add call level to opcode executor log May 19, 2025
@SigureMo SigureMo merged commit 988669d into PaddlePaddle:develop May 20, 2025
52 checks passed
@SigureMo SigureMo deleted the sot/add-call-level-to-opcode-executor-log branch May 20, 2025 09:12
co63oc pushed a commit to co63oc/Paddle that referenced this pull request May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants