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

format python code in demo, doc, doc_cn and paddle directories #445

Merged
merged 1 commit into from
Nov 12, 2016

Conversation

QiJune
Copy link
Member

@QiJune QiJune commented Nov 12, 2016

use pep8 code style to format python code in demo, doc, doc_cn and paddle directories
except for paddle/scripts/cpplint.py
#254

@coveralls
Copy link

Coverage Status

Coverage remained the same at 62.905% when pulling 319742c on QiJune:format_py_code_1st into ef5e483 on baidu:develop.

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.

先merge进去,再提另一个PR修改。


settings.logger.info('Image size: %s', settings.img_size)
settings.logger.info('Meta path: %s', settings.meta_path)
settings.input_types = [
dense_vector(settings.img_raw_size), # image feature
integer_value(settings.num_classes)] # labels
integer_value(settings.num_classes)
Copy link
Collaborator

Choose a reason for hiding this comment

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

注释在上一行。

@@ -13,9 +13,9 @@
# limitations under the License.

o = open("./" + "train.list", "w")
o.write("./data/raw_data/train" +"\n")
o.write("./data/raw_data/train" + "\n")
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个写法很奇怪,为什么不直接写成一个字符串呢?

@@ -69,7 +68,8 @@ def hook(settings, image_size, crop_size, color, file_list,

settings.input_types = [
dense_vector(settings.img_input_size), # image feature
integer_value(1)] # labels
integer_value(1)
Copy link
Collaborator

Choose a reason for hiding this comment

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

注释应该在这一行

integer_value_sequence(len(word_dict)) if options.seq
else sparse_binary_vector(len(word_dict)),
integer_value(2)]
integer_value_sequence(len(word_dict)) if options.seq else
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个写法略微有点奇怪。

@@ -274,14 +280,14 @@ def save_data_multi_lines(self, data, prefix = "",
self.create_dict(data_list)

length = len(label_list)
perm_list = np.array([ i for i in xrange(length) ])
Copy link
Collaborator

Choose a reason for hiding this comment

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

这种写法有点奇怪

@reyoung reyoung merged commit b87427b into PaddlePaddle:develop Nov 12, 2016
@QiJune QiJune deleted the format_py_code_1st branch January 11, 2017 02:33
zhhsplendid pushed a commit to zhhsplendid/Paddle that referenced this pull request Sep 25, 2019
zhhsplendid pushed a commit to zhhsplendid/Paddle that referenced this pull request Sep 25, 2019
* add_api_cn (PaddlePaddle#437)

* add gpu benchmark page (PaddlePaddle#436)

* add gpu benchmark

* fix comments

* add chinese link in gen_doc.py (PaddlePaddle#439)

* modified gen_doc.py

* Update gen_doc.py

* update gen_doc.py

* Update mobile doc (PaddlePaddle#440)

* update_en_structure

* update_Paddle_commitid

* delete_DS

* update_mobile_doc

* Update book commit (PaddlePaddle#438)

* update_en_structure

* update_Paddle_commitid

* delete_DS

* update_book_commit_id

* update_api_rst

* Adjust structure of advanced usage (PaddlePaddle#442)

* adjust_structure_of_advanced_usage

* Update paddle_gpu_benchmark.md

* adjust_toctree_hidden

* fix_api_guide

* Update index.rst

* fix deadlinkes (PaddlePaddle#443)

* add_toctree (PaddlePaddle#445)

* adjust_beginners_structure (PaddlePaddle#446)

* adjust_beginners_structure

* Update index.rst

* update install_doc for python3 (PaddlePaddle#418)

* update install_doc for python3

* update python3.5+ info,test=develop

* fix review, test=develop

* fix_pic (PaddlePaddle#447)
zhhsplendid pushed a commit to zhhsplendid/Paddle that referenced this pull request Sep 25, 2019
* add_api_cn (PaddlePaddle#437)

* add gpu benchmark page (PaddlePaddle#436)

* add gpu benchmark

* fix comments

* add chinese link in gen_doc.py (PaddlePaddle#439)

* modified gen_doc.py

* Update gen_doc.py

* update gen_doc.py

* Update mobile doc (PaddlePaddle#440)

* update_en_structure

* update_Paddle_commitid

* delete_DS

* update_mobile_doc

* Update book commit (PaddlePaddle#438)

* update_en_structure

* update_Paddle_commitid

* delete_DS

* update_book_commit_id

* update_api_rst

* Adjust structure of advanced usage (PaddlePaddle#442)

* adjust_structure_of_advanced_usage

* Update paddle_gpu_benchmark.md

* adjust_toctree_hidden

* fix_api_guide

* Update index.rst

* fix deadlinkes (PaddlePaddle#443)

* add_toctree (PaddlePaddle#445)

* adjust_beginners_structure (PaddlePaddle#446)

* adjust_beginners_structure

* Update index.rst

* update install_doc for python3 (PaddlePaddle#418)

* update install_doc for python3

* update python3.5+ info,test=develop

* fix review, test=develop

* fix_pic (PaddlePaddle#447)

* delete en2zn link

* update lod_tensor

* 1207

 1.english api reference links removed
2. formatted

* update transpiler

* update profilse_cn
zhhsplendid pushed a commit to zhhsplendid/Paddle that referenced this pull request Sep 25, 2019
* add_api_cn (PaddlePaddle#437)

* add gpu benchmark page (PaddlePaddle#436)

* add gpu benchmark

* fix comments

* add chinese link in gen_doc.py (PaddlePaddle#439)

* modified gen_doc.py

* Update gen_doc.py

* update gen_doc.py

* Update mobile doc (PaddlePaddle#440)

* update_en_structure

* update_Paddle_commitid

* delete_DS

* update_mobile_doc

* Update book commit (PaddlePaddle#438)

* update_en_structure

* update_Paddle_commitid

* delete_DS

* update_book_commit_id

* update_api_rst

* Adjust structure of advanced usage (PaddlePaddle#442)

* adjust_structure_of_advanced_usage

* Update paddle_gpu_benchmark.md

* adjust_toctree_hidden

* fix_api_guide

* Update index.rst

* fix deadlinkes (PaddlePaddle#443)

* add_toctree (PaddlePaddle#445)

* adjust_beginners_structure (PaddlePaddle#446)

* adjust_beginners_structure

* Update index.rst

* update install_doc for python3 (PaddlePaddle#418)

* update install_doc for python3

* update python3.5+ info,test=develop

* fix review, test=develop

* fix_pic (PaddlePaddle#447)

* delete en2zn link

* update lod_tensor

* 1207

 1.english api reference links removed
2. formatted

* update transpiler

* update profilse_cn

* Update docker-image instroduce, test=develop (PaddlePaddle#459)

* fix_bug (PaddlePaddle#460)

* [cp2dev]Add avx info 1.1 (PaddlePaddle#279) (PaddlePaddle#451)

* Add avx info 1.1 (PaddlePaddle#279)

* refine avx info representation

* refine avx info representation

* refine avx info representation

* updatetoavx

* fix_AVX

* update_en_api (PaddlePaddle#461)

* update api guides for cn (PaddlePaddle#462)

* Update commit_id of Paddle (PaddlePaddle#463)

* update_en_api

* update_again

* Fix bug (PaddlePaddle#465)

* update_en_api

* update_again

* bug_fix

* fix_2nd
zhhsplendid pushed a commit to zhhsplendid/Paddle that referenced this pull request Sep 25, 2019
* add_api_cn (PaddlePaddle#437)

* add gpu benchmark page (PaddlePaddle#436)

* add gpu benchmark

* fix comments

* add chinese link in gen_doc.py (PaddlePaddle#439)

* modified gen_doc.py

* Update gen_doc.py

* update gen_doc.py

* Update mobile doc (PaddlePaddle#440)

* update_en_structure

* update_Paddle_commitid

* delete_DS

* update_mobile_doc

* Update book commit (PaddlePaddle#438)

* update_en_structure

* update_Paddle_commitid

* delete_DS

* update_book_commit_id

* update_api_rst

* Adjust structure of advanced usage (PaddlePaddle#442)

* adjust_structure_of_advanced_usage

* Update paddle_gpu_benchmark.md

* adjust_toctree_hidden

* fix_api_guide

* Update index.rst

* fix deadlinkes (PaddlePaddle#443)

* add_toctree (PaddlePaddle#445)

* adjust_beginners_structure (PaddlePaddle#446)

* adjust_beginners_structure

* Update index.rst

* update install_doc for python3 (PaddlePaddle#418)

* update install_doc for python3

* update python3.5+ info,test=develop

* fix review, test=develop

* fix_pic (PaddlePaddle#447)

* delete en2zn link

* update lod_tensor

* 1207

 1.english api reference links removed
2. formatted

* update transpiler

* update profilse_cn

* Update docker-image instroduce, test=develop (PaddlePaddle#459)

* fix_bug (PaddlePaddle#460)

* [cp2dev]Add avx info 1.1 (PaddlePaddle#279) (PaddlePaddle#451)

* Add avx info 1.1 (PaddlePaddle#279)

* refine avx info representation

* refine avx info representation

* refine avx info representation

* updatetoavx

* fix_AVX

* update_en_api (PaddlePaddle#461)

* update api guides for cn (PaddlePaddle#462)

* Update commit_id of Paddle (PaddlePaddle#463)

* update_en_api

* update_again

* Fix bug (PaddlePaddle#465)

* update_en_api

* update_again

* bug_fix

* fix_2nd

* add_release_note
wangxicoding pushed a commit to wangxicoding/Paddle that referenced this pull request Dec 9, 2021
* "add mlm params to dygraph ernie1.0"

* finish p-tuning v1.0

* mend

* delete unused coment

* add label_normalized

* P-tuning: support Chid task of FewCLUE

* 1. decouple evaluate and train

* 1.add FewCLUE datasets(9/9)
2.implement p-tuning strategy by transform_function
3.unify train_script beteween `chid` task and other 8 tasks of FewCLUE

* add README.md

* update FewCLUE data

* add predict.py for FewCLUE
gglin001 added a commit to graphcore/Paddle-fork that referenced this pull request Mar 17, 2022
* update custom op demo

* update custom_pattern demo

* move disbaled UTs
AnnaTrainingG pushed a commit to AnnaTrainingG/Paddle that referenced this pull request Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants