-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor Dygraph Flags #40786
Refactor Dygraph Flags #40786
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
… fix_ci_problem
… fix_ci_problem
… fix_ci_problem
… fix_ci_problem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
TODO:Fix docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
设置单测超时时间
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR types
Function optimization
PR changes
Others
Describe
为了动态图可以方便转正 这边重构了python端对于dygraph_mode和eager_mode的判断目的有两个1. 让eager在dygraph_mode下直接成为默认模式(依赖全局变量)不进行额外的二次判断 2. 修改test_eager_guard使其可以支持从eager->fluid,再从fluid->eager 这个修改较大 对于yaml迁移的同学来说 主要关注的是对于计算型api从
的调用形式变成了
具体flag的关系我在fluild/framework.py最开始做了注释解释。简单来说是将执行机制在python分成static和non_static通过_non_static_mode来判断,这里_non_static_mode等同于从前in_dygraph_mode的功能。而在_non_static_mode下区分是否是_in_legacy_dygraph如果是则运行老动态图,否则运行新动态图,而原来的in_dygraph_mode将作为进入新动态图执行模式的判断等同于之前in_eager_mode的功能呢,而之前的in_eager_mode将删除。