-
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 cleanup 376~381] reformat example code with google style #57853
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
Sorry to inform you that e83c011's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
@@ -72,6 +72,7 @@ class Bernoulli(exponential_family.ExponentialFamily): | |||
|
|||
.. code-block:: python | |||
|
|||
>>> # doctest: +REQUIRES(env:DISTRIBUTED) |
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.
376-381 是添加 SKIP reason,这些额外修改的原因是?
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.
那我恢复?
@@ -64,7 +65,7 @@ class Categorical(distribution.Distribution): | |||
>>> cat = Categorical(x) | |||
>>> cat2 = Categorical(y) | |||
|
|||
>>> # doctest: +SKIP | |||
>>> # doctest: +SKIP('`paddle.distribution` can not run in xdoctest') |
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.
并不是说直接 xxx can not run in xdoctest
就可以了,这样和直接空着没啥区别
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.
咋说呢,其实我是照着
#57676
来做的,不知道可否进一步指导一下?
@@ -1140,7 +1140,7 @@ class Model: | |||
... | |||
... model = paddle.Model(net) | |||
... optim = paddle.optimizer.SGD(learning_rate=1e-3, parameters=model.parameters()) | |||
... | |||
|
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.
为什么要删?
close due to the following PR is merged: |
PR types
Others
PR changes
Others
Description
清理遗留代码
修改如下文件的示例代码,使其通过 xdoctest 检查:
python/paddle/distribution/bernoulli.py
python/paddle/distribution/categorical.py
python/paddle/distribution/gumbel.py
python/paddle/hapi/dynamic_flops.py
python/paddle/hapi/model.py
python/paddle/hapi/model_summary.py
Related links
#55629
#55295
@sunzhongkai588 @SigureMo
请评审!