-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
【Hackathon No.89】 Remove circle import Part2 #51199
【Hackathon No.89】 Remove circle import Part2 #51199
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
from typing import Any, List | ||
|
||
import numpy | ||
|
||
from paddle.fluid.dygraph.layers import Layer | ||
from paddle.jit.dy2static.logging_utils import TranslatorLogger | ||
from paddle.jit.dy2static.utils import is_paddle_func, unwrap | ||
from paddle.jit.dy2static.utils import is_builtin, is_paddle_func, unwrap |
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.
后续 from paddle.jit.dy2static.xxx
可以考虑优化为 from .xxx
么?
@@ -44,7 +44,6 @@ | |||
# should return. | |||
|
|||
# Assign not support float64, use float32 value as magic number. | |||
RETURN_NO_VALUE_MAGIC_NUM = 1.77113e27 | |||
RETURN_NO_VALUE_VAR_NAME = "__no_value_return_var" |
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.
RETURN_NO_VALUE_VAR_NAME 是否也可以考虑到utils.py里,与RETURN_NO_VALUE_MAGIC_NUM这个magic number放一起?
python/paddle/jit/dy2static/utils.py
Outdated
FALSE_FUNC_PREFIX = 'false_fn' | ||
|
||
WHILE_BODY_PREFIX = 'while_body' | ||
FOR_CONDITION_PREFIX = 'for_loop_condition' |
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.
可否将这些全局的config字段统一放到文件import 语句后面?
@Aurelius84 根据上述的建议修改了本PR涉及的内容。codestyle那块没法过去,因为对应的包是通过执行字符串的形式使用的,所以必须保留引用~ |
Co-authored-by: Aurelius84 <[email protected]>
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
@Liyulingyue 请解决下冲突 |
很抱歉,经过我们的反复讨论,你的PR暂未达到合入标准,请阅读飞桨原生算子开发规范,你可以重新提交新的PR,我们先将此PR关闭,感谢你的贡献。 |
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
Others
PR changes
Others
Describe
Details
StaticFunction,
convert_to_static,
unwrap_decorators,
):移动CONVERSION_OPTIONS的声明到program_translator,统一import program_translator
ProgramTranslator,
):直接删除
RETURN_NO_VALUE_MAGIC_NUM,
):将声明迁移到utils
FALSE_FUNC_PREFIX,
TRUE_FUNC_PREFIX,
):将声明移动到utils
FOR_BODY_PREFIX,
FOR_CONDITION_PREFIX,
WHILE_BODY_PREFIX,
): 将声明移动到utils