Skip to content

4th-batch-39-代码使用了已被弃置地函数#75777

Merged
luotao1 merged 1 commit intoPaddlePaddle:developfrom
ApricityXX:4th_batch_39
Oct 14, 2025
Merged

4th-batch-39-代码使用了已被弃置地函数#75777
luotao1 merged 1 commit intoPaddlePaddle:developfrom
ApricityXX:4th_batch_39

Conversation

@ApricityXX
Copy link
Contributor

PR Category

Execute Infrastructure

PR Types

Bug fixes

Description

第四批-编号39(共1个)
代码使用了 paddle.fluid 模块下的 program_guard 上下文管理器,通过别名 base 引用。这是旧版动态图前编程范式的典型用法,在当前 PaddlePaddle 主流版本(2.0+)中已被弃用。
base.program_guard 替换为 paddle.static.program_guard,以符合当前 PaddlePaddle 官方推荐的静态图编程方式,提升代码可维护性和未来兼容性。paddle.staticpaddle.fluid 中静态图相关功能的官方迁移路径。

@paddle-bot
Copy link

paddle-bot bot commented Oct 12, 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.

@luotao1 luotao1 merged commit 938be7a into PaddlePaddle:develop Oct 14, 2025
72 of 73 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants