Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
PaddleRec
提交
8140ee8f
P
PaddleRec
项目概览
BaiXuePrincess
/
PaddleRec
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleRec
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleRec
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
8140ee8f
编写于
5月 20, 2020
作者:
T
tangwei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add codestyle travis
上级
2ade9b1b
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
38 addition
and
9 deletion
+38
-9
.pre-commit-config.yaml
.pre-commit-config.yaml
+36
-0
run.py
run.py
+2
-3
tools/build_script.sh
tools/build_script.sh
+0
-6
未找到文件。
.pre-commit-config.yaml
0 → 100644
浏览文件 @
8140ee8f
repos
:
-
repo
:
https://github.com/Lucas-C/pre-commit-hooks.git
sha
:
v1.0.1
hooks
:
-
id
:
remove-crlf
files
:
(?!.*third_party)^.*$ | (?!.*book)^.*$
-
repo
:
https://github.com/PaddlePaddle/mirrors-yapf.git
sha
:
0d79c0c469bab64f7229c9aca2b1186ef47f0e37
hooks
:
-
id
:
yapf
files
:
(.*\.(py|bzl)|BUILD|.*\.BUILD|WORKSPACE)$
-
repo
:
https://github.com/pre-commit/pre-commit-hooks
sha
:
5bf6c09bfa1297d3692cadd621ef95f1284e33c0
hooks
:
-
id
:
check-added-large-files
-
id
:
check-merge-conflict
-
id
:
check-symlinks
-
id
:
detect-private-key
files
:
(?!.*third_party)^.*$ | (?!.*book)^.*$
-
id
:
end-of-file-fixer
-
repo
:
local
hooks
:
-
id
:
pylint-doc-string
name
:
pylint
description
:
Check python docstring style using docstring_checker.
entry
:
bash ./tools/codestyle/pylint_pre_commit.hook
language
:
system
files
:
\.(py)$
-
repo
:
local
hooks
:
-
id
:
copyright_checker
name
:
copyright_checker
entry
:
python ./tools/codestyle/copyright.hook
language
:
system
files
:
\.(c|cc|cxx|cpp|cu|h|hpp|hxx|proto|py)$
exclude
:
(?!.*third_party)^.*$ | (?!.*book)^.*$
run.py
浏览文件 @
8140ee8f
...
...
@@ -52,6 +52,7 @@ def get_inters_from_yaml(file, filter):
flattens
=
envs
.
flatten_environs
(
_envs
)
inters
=
{}
for
k
,
v
in
flattens
.
items
():
if
k
.
startswith
(
filter
):
inters
[
k
]
=
v
...
...
@@ -62,16 +63,14 @@ def get_engine(args):
transpiler
=
get_transpiler
()
run_extras
=
get_inters_from_yaml
(
args
.
model
,
"train."
)
engine
=
run_extras
.
get
(
"train.engine"
,
"single"
)
engine
=
run_extras
.
get
(
"train.engine"
,
"single"
)
engine
=
engine
.
upper
()
if
engine
not
in
engine_choices
:
raise
ValueError
(
"train.engin can not be chosen in {}"
.
format
(
engine_choices
))
print
(
"engines:
\n
{}"
.
format
(
engines
))
run_engine
=
engines
[
transpiler
].
get
(
engine
,
None
)
return
run_engine
...
...
tools/build_script.sh
浏览文件 @
8140ee8f
...
...
@@ -37,14 +37,8 @@ function check_style() {
eval
"
$(
GIMME_GO_VERSION
=
1.8.3 gimme
)
"
fi
pip
install
cpplint
# set up go environment for running gometalinter
mkdir
-p
$GOPATH
/src/github.com/SeiriosPlus/PaddleRec
ln
-sf
${
ROOT
}
$GOPATH
/src/github.com/SeiriosPlus/PaddleRec
export
PATH
=
/usr/bin:
$PATH
pre-commit
install
clang-format
--version
if
!
pre-commit run
-a
;
then
git diff
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录