Skip to content

Conversation

entired
Copy link
Contributor

@entired entired commented Nov 22, 2023

PR types
others

PR changes
Docs

Description
.. code-block:: python ->COPY-FROM: paddle.distributed.fleet.xxx
[DistributedStrategy_cn]这个不会改
活动 issue : #6300 中文文档 copy-from 清理
@ooooo-create @sunzhongkai588

	modified:   docs/api/paddle/optimizer/Lamb_cn.rst
	modified:   docs/api/paddle/optimizer/Optimizer_cn.rst
	modified:   docs/api/paddle/optimizer/RMSProp_cn.rst
Copy link

paddle-bot bot commented Nov 22, 2023

感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-6327.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html
预览工具的更多说明,请参考:飞桨文档预览工具

Copy link
Collaborator

@ooooo-create ooooo-create left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

其他没问题~,就是DistributedStrategy_cn.rst这个文件本身不规范的地方有点多,如果感兴趣的话把剩下的也该成cpoy-from叭~
参考 API 文档书写规范
举个例子
image

比如上面是 adaptive_localsgd_configs
copy-from 的就是 COPY-FROM: paddle.distributed.fleet.DistributedStrategy.adaptive_localsgd_configs
然后把示例代码位置放在最后的位置


optimizer = paddle.optimizer.SGD(learning_rate=0.01)
optimizer = fleet.distributed_optimizer(optimizer, strategy)
COPY-FROM: paddle.distributed.fleet.DistributedStrategy.distributed_optimizer
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
COPY-FROM: paddle.distributed.fleet.DistributedStrategy.distributed_optimizer
COPY-FROM: paddle.distributed.fleet.DistributedStrategy.auto

"enable_offload": True,
"checkpoint_shape": [100, 512, 1024]
}
COPY-FROM: paddle.distributed.fleet.DistributedStrategy.recompute_configs
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
COPY-FROM: paddle.distributed.fleet.DistributedStrategy.recompute_configs
COPY-FROM: paddle.distributed.fleet.DistributedStrategy.recompute

strategy = fleet.DistributedStrategy()
strategy.gradient_merge = True
strategy.gradient_merge_configs = {"k_steps": 4, "avg": True}
COPY-FROM: paddle.distributed.fleet.DistributedStrategy.gradient_merge_configs
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
COPY-FROM: paddle.distributed.fleet.DistributedStrategy.gradient_merge_configs
COPY-FROM: paddle.distributed.fleet.DistributedStrategy.gradient_merge

'lamb_weight_decay': 0.01,
'exclude_from_weight_decay': [],
}
COPY-FROM: paddle.distributed.fleet.DistributedStrategy.lamb_configs
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
COPY-FROM: paddle.distributed.fleet.DistributedStrategy.lamb_configs
COPY-FROM: paddle.distributed.fleet.DistributedStrategy.lamb

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的(•̤̀ᵕ•̤́๑)ᵒᵏᵎᵎᵎᵎ,谢谢o师傅

@ooooo-create ooooo-create reopened this Dec 2, 2023
@ooooo-create
Copy link
Collaborator

rerun 一下 ci

@entired
Copy link
Contributor Author

entired commented Dec 4, 2023

rerun 一下 ci

o师傅,怎么rerun ci啊~

@ooooo-create
Copy link
Collaborator

rerun 一下 ci

o师傅,怎么rerun ci啊~

重新构建~
image
image

@ooooo-create
Copy link
Collaborator

麻烦处理一下 codestyle~

@entired
Copy link
Contributor Author

entired commented Dec 5, 2023

麻烦处理一下 codestyle~

来啦来啦>~<

@entired
Copy link
Contributor Author

entired commented Dec 5, 2023

rerun 一下 ci

o师傅,怎么rerun ci啊~

重新构建~ image image

没找到重新构建,网上说提交空提交能rerun ci,我就提了一个空的QAQ

@entired
Copy link
Contributor Author

entired commented Dec 5, 2023

麻烦处理一下 codestyle~

codestyle是什么啊?o师傅,对不起我是笨蛋,呜~看不懂

@ooooo-create
Copy link
Collaborator

麻烦处理一下 codestyle~

codestyle是什么啊?o师傅,对不起我是笨蛋,呜~看不懂

代码风格~,如图需要使用 pre-commit 工具进行检查
image
https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/dev_guides/git_guides/codestyle_check_guide_cn.html

@entired entired closed this by deleting the head repository Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants