-
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
[xdoctest][task 125-137] reformat example code with google style in static/* #56121
Conversation
你的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.
@SigureMo static 里面太多重复 name 的变量了,导致很多示例没法跑 ~
static 处理 name 在 scope.h/scope.cc 里面,python 这边还不好 hack 。
看看怎么处理?跳过?重命名?
还有,这个 name 在底层可以为 None:
def create_var(self, *args, **kwargs):
if in_dygraph_mode():
var = _create_tensor(*args, **kwargs)
else:
var = Variable(block=self, *args, **kwargs)
if 'initializer' in kwargs:
kwargs['initializer'](var, self)
return var
这里 _create_tensor
和 Variable
的 name 都可以是 None,可是 data
方法却限制不能为 None ~
我测试的可以 ~ 所以先更新了 convert-doctest 工具,可以验证一下可行性。 |
Sorry to inform you that 3a1bbef's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
@DrRyanHuang 不好意思,这个 PR 可能要等一下,xdoctest 没法做到环境隔离,导致 static 的一些示例不能跑 ~ 等这个问题解决了,可以重新跑一下 CI ~ 不好意思 ~ 😅 |
#56400 已 merge,麻烦 merge 下最新的 develop 试试~ |
For static xdoc
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.
东西很多,辛苦了!~~~
主要问题是,paddle.static.amp.bf16 里面的一些接口怎么给改为了 fp16?!🤣
另外,一些 examples 拆分的地方,相应的 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 ~ 辛苦!
反馈几个文档问题
- ctr_metric_bundle 缺少中文文档
- paddle.static.auc 中文文档的示例没有分开
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.
好的,这个我和api负责人反馈一下~ |
…static/* (PaddlePaddle#56121) * LGTM * [Doctest]fix No.125-137, test=docs_preview * [Doctest]fix No.125-137, test=docs_preview * fix codestyle * resolve conversation * change Example * fix example format... * fix my stupid fp16 * fix codestyple
PR types
Others
PR changes
Others
Description
修改如下文件的示例代码,使其通过
xdoctest
检查:任务125-137
任务125-137中还缺少
python/paddle/static/nn/common.py
python/paddle/static/nn/control_flow.py
预览:
Related links