Skip to content
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

Fix api reference docs #11314

Merged
merged 13 commits into from
Jun 17, 2018
Merged

Conversation

typhoonzero
Copy link
Contributor

@typhoonzero typhoonzero commented Jun 8, 2018

Some document polish work.

machi 2018-06-15 12-38-17

machi 2018-06-15 12-38-03

machi 2018-06-15 12-35-12

machi 2018-06-15 12-34-42

machi 2018-06-15 12-33-43

machi 2018-06-15 12-29-04

machi 2018-06-15 12-27-59

machi 2018-06-15 12-27-21

machi 2018-06-15 12-22-34

machi 2018-06-15 12-21-59

machi 2018-06-15 12-21-17

machi 2018-06-15 12-20-50

@reyoung
Copy link
Collaborator

reyoung commented Jun 8, 2018

I just polish templatedoc() a little bit to generate better documentation. Make it support inline math and correct the google style comments. See #11308.

Also, as discussed with @shanyi15 yesterday, we decided to use a new repo to manage documentation of fluid for several reasons.

  1. We need cross hyperlink between API-reference, API-Guide and User story. In Paddle, we separate API, use case into many sphinx projects( around 10 sphinx projects before... T_T ). They cannot be cross-link well.
  2. It is hard to build documentation before. Use cmake to drive sphinx-build is tricky. We can separate them into two projects. It is easy to complete i18n later if we use a standard sphinx project structure.

Current, this repo(https://github.com/reyoung/FluidDoc) is in very early stage and flux. However, it is very simple to build a documentation site follow the readme.

You can install your developing version of paddle, and make html. The documentation will be generated well at build/html directory.

The develop branch of this documentation will be generated to readthedocs.org. http://fluiddoc.readthedocs.io/zh_CN/develop/ . It uses our latest release paddle to generate.

@typhoonzero
Copy link
Contributor Author

@reyoung Thanks for polishing templatedoc, I was looking into the format problem using local compiled server. Glad that you already make a fix.

@@ -42,7 +42,7 @@ void FuseVarsOpHandle::RunImpl() {
out_t->ShareDataWith(out_tensor->Slice(s, s + numel));
s += numel;
}
this->RunAndRecordEvent([this] {});
this->RunAndRecordEvent([] {});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This line is intended to fix build on macos

@shanyi15 shanyi15 requested a review from skylarch June 12, 2018 03:34
skylarch
skylarch previously approved these changes Jun 12, 2018
@skylarch
Copy link
Collaborator

skylarch commented Jun 12, 2018

@typhoonzero

• API Definition:
• Function Description
	○ Function Description:缺标题:chunk_eval、sequence_conv、matmul、row_conv;标题格式除介词外首字母大写,无句号:smooth_l1、lrn;删除标题:cross_entropy、square_error_cost、conv2d_transpose、sequence_expand、2_normalize、sequence_reshape、transpose、multiplex、softmax_with_cross_entropy、one_hot、lod_reset
	○ Formula:linear_chain_crf、crf_decoding、cos_sim、dropout、chunk_eval、sequence_conv、sequence_pool、pool2d、sequence_expand、reduce_sum 、reduce_mean、reduce_max、reduce_min、reduce_prod、split、matmul、edit_distance、warpctc、sequence_reshape、transpose、smooth_l1、one_hot、autoincreased_step_counter、reshape、lod_reset、pad(如果有API没有formula,就可不做修改)
	○ Symbols' Descriptions if necessary:改为列表格式,和之前的保持一致: dynamic_lstm、dynamic_gru、gru_unit、multiplex、label_smooth
	○ References if necessary:
• Args Description
	○ [Arg’s Name]:
	○ [(Data Type, Default Value(无需重复))]
	○ [Description]:
• Returns
	○ [Name][Shape]:
	○ Tuple逐个介绍各参数:
• Raises
	○ [Exception Type][Condition]:
• Note分条列出:
• Examples:linear_chain_crf、crf_decoding、chunk_eval、sequence_conv、pool2d、batch_norm、beam_search_decode、beam_search

还未注释:sequence_softmax、softmax

Copy link
Collaborator

@skylarch skylarch left a comment

Choose a reason for hiding this comment

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

request changes as commented

@skylarch
Copy link
Collaborator

@typhoonzero
现在@reyoung 老师可能对注释内容有新的建议,API注释标准暂时待定,之前的comment可以先不做修改。

@skylarch skylarch removed the request for review from reyoung June 13, 2018 07:38
@skylarch
Copy link
Collaborator

@typhoonzero
comment已根据最新标准更新,可以开始做修改。

@typhoonzero
Copy link
Contributor Author

@skylarch Added screen shot of the document preview.

@skylarch
Copy link
Collaborator

@typhoonzero

chunk_eval:
缺标题;
缺examples;
“see below for details"指的是哪一部分呢?这些可能是有问题的${chunk_scheme_comment},${num_chunk_types_comment},${excluded_chunk_types_comment}

iou_similarity
标题格式除介词外首字母大写,无句号,加粗

ctc_greedy_decoder
截图不全

ListenAndServ
标题格式除介词外首字母大写,无句号,加粗
缺return

autoincreased_step_counter
缺例子

conv2d_transpose
标题格式除介词外首字母大写,无句号,加粗
截图不全

roi_pool
标题格式除介词外首字母大写,无句号,加粗
例子或截图不全

crf_decoding
例子

scale
例子

cos_sim
标题格式除介词外首字母大写,无句号,加粗
例子

@reyoung
Copy link
Collaborator

reyoung commented Jun 14, 2018

default

default

default

default

default

reyoung
reyoung previously approved these changes Jun 15, 2018
Copy link
Collaborator

@reyoung reyoung left a comment

Choose a reason for hiding this comment

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

Excellent

skylarch
skylarch previously approved these changes Jun 15, 2018
@reyoung reyoung dismissed stale reviews from skylarch and themself via 7a56705 June 17, 2018 04:54
Copy link
Collaborator

@reyoung reyoung left a comment

Choose a reason for hiding this comment

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

Cool

@reyoung reyoung merged commit ce60bbf into PaddlePaddle:develop Jun 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants