Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
VisualDL
提交
12cdc905
V
VisualDL
项目概览
PaddlePaddle
/
VisualDL
1 年多 前同步成功
通知
88
Star
4655
Fork
642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
5
Wiki
分析
仓库
DevOps
项目成员
Pages
V
VisualDL
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
5
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
12cdc905
编写于
1月 04, 2018
作者:
Y
Yan Chunwei
提交者:
GitHub
1月 04, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feature/add big file check (#55)
上级
065b615a
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
25 addition
and
9 deletion
+25
-9
.pre-commit-config.yaml
.pre-commit-config.yaml
+6
-0
server/visualdl/mock.sh
server/visualdl/mock.sh
+1
-1
server/visualdl/run.sh
server/visualdl/run.sh
+0
-8
tests.sh
tests.sh
+18
-0
未找到文件。
.pre-commit-config.yaml
浏览文件 @
12cdc905
...
...
@@ -23,3 +23,9 @@
entry
:
bash ./.clang_format.hook -i
language
:
system
files
:
\.(c|cc|cxx|cpp|cu|h|hpp|hxx|proto)$
-
repo
:
git://github.com/guykisel/pre-commit-reject-large-files
sha
:
da21f6dac1aa20aa53598b145c5c0013cdd40d65
hooks
:
-
id
:
reject-large-files
args
:
[
--max-filesize=1000000
]
server/visualdl/mock.sh
浏览文件 @
12cdc905
...
...
@@ -3,4 +3,4 @@ set -ex
export
PYTHONPATH
=
"/home/superjom/project/VisualDL/build/visualdl/logic:/home/superjom/project/VisualDL/visualdl/python"
python lib_test.py
python lib_test.py
-v
server/visualdl/run.sh
已删除
100644 → 0
浏览文件 @
065b615a
#!/bin/bash
set
-ex
export
PYTHONPATH
=
"
$(
pwd
)
/..:/home/superjom/project/VisualDL/build/visualdl/logic:/home/superjom/project/VisualDL/visualdl/python"
export
FLASK_APP
=
visual_dl.py
export
FLASK_DEBUG
=
1
python visual_dl.py
--logdir
./tmp/mock
--host
172.23.233.68
--port
8043
tests.sh
浏览文件 @
12cdc905
...
...
@@ -5,6 +5,7 @@ mode=$1
readonly
cur
=
$(
pwd
)
readonly
core_path
=
$cur
/build/visualdl/logic
readonly
python_path
=
$cur
/visualdl/python
readonly
max_file_size
=
1000000
# 1MB
export
PYTHONPATH
=
"
${
core_path
}
:
${
python_path
}
"
...
...
@@ -46,11 +47,28 @@ server_test() {
python lib_test.py
}
# check the size of files in the repo.
# reject PR that has some big data included.
bigfile_reject
()
{
cd
$cur
# it failed to exclude .git, remove it first.
rm
-rf
.git
local
largest_file
=
$(
find
.
-path
.git
-prune
-o
-printf
'%s %p\n'
|
sort
-nr
|
head
-n1
)
local
size
=
$(
echo
$largest_file
|
awk
'{print $1}'
)
if
[
"
$size
"
-ge
"
$max_file_size
"
]
;
then
echo
$largest_file
echo
"file size exceed
$max_file_size
"
echo
"Should not add large data or binary file."
exit
-1
fi
}
echo
"mode"
$mode
if
[
$mode
=
"backend"
]
;
then
backend_test
elif
[
$mode
=
"all"
]
;
then
bigfile_reject
frontend_test
backend_test
server_test
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录