Skip to content

Commit

Permalink
format code with pre-commit (PaddlePaddle#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquesqiao authored Nov 24, 2017
1 parent 3349605 commit 341a322
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 30 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ npm run build
### Step 3: run
```
python bin/visual_dl.py --port=8888
```
```
3 changes: 2 additions & 1 deletion bin/visual_dl.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ def gen_result(status, msg):

@app.route('/static/<path:filename>')
def serve_static(filename):
return send_from_directory(os.path.join(server_path, static_file_path), filename)
return send_from_directory(
os.path.join(server_path, static_file_path), filename)


@app.route("/")
Expand Down
1 change: 0 additions & 1 deletion docs/backend_architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,3 @@ IM 与 Server 的关系是
### Protobuf API
- 决定了底层的数据格式,protobuf 提供了序列化的公共界面
- SDK通过Protobuf API操作底层数据

2 changes: 1 addition & 1 deletion docs/data_structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ histogram 需要得到tensor的分布,因此会把完整的tensor 的数值存
]
```

## graph
## graph
graph 会复杂一些,可能无法借用上述类型

```javascript
Expand Down
2 changes: 1 addition & 1 deletion docs/visualization.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

# 前端增量

# 前端采样
# 前端采样
18 changes: 8 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
from setuptools import setup

setup(name="visualdl",
version="0.0.1",
packages=['visualdl'],
include_package_data=True,
install_requires=[
'flask>=0.12.1'
],
url='http://www.baidu.com/',
license='Apache 2.0',
)
setup(
name="visualdl",
version="0.0.1",
packages=['visualdl'],
include_package_data=True,
install_requires=['flask>=0.12.1'],
url='http://www.baidu.com/',
license='Apache 2.0', )
4 changes: 1 addition & 3 deletions visualdl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import log

__all__ = [
'log'
]
__all__ = ['log']
4 changes: 2 additions & 2 deletions visualdl/backend/logic/im.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ class InformationMaintainer final {
Storage storage_;
};

} // namespace visualdl
} // namespace visualdl

#endif // VISUALDL_BACKEND_LOGIC_IM_H
#endif // VISUALDL_BACKEND_LOGIC_IM_H
2 changes: 1 addition & 1 deletion visualdl/backend/logic/im_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ TEST_F(ImTester, AddRecord) {
ASSERT_EQ(im.storage().Find("tag0")->records_size(), 20UL);
}

} // namespace visualdl
} // namespace visualdl
6 changes: 3 additions & 3 deletions visualdl/backend/storage/storage.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef VISUALDL_STORAGE_H
#define VISUALDL_STORAGE_H

#include <string>
#include <time.h>
#include <string>

#include "visualdl/backend/storage/storage.pb.h"

Expand Down Expand Up @@ -66,6 +66,6 @@ class Storage final {
storage::Storage proto_;
};

} // namespace visualdl
} // namespace visualdl

#endif // VISUALDL_STORAGE_H
#endif // VISUALDL_STORAGE_H
6 changes: 1 addition & 5 deletions visualdl/backend/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,7 @@ def test_scalar(self):
scalar = self.tablet.as_float_scalar()
py_captions = ["train", "test"]
step_ids = [10, 20, 30]
py_records = [
[0.1, 0.2],
[0.2, 0.3],
[0.3, 0.4]
]
py_records = [[0.1, 0.2], [0.2, 0.3], [0.3, 0.4]]

scalar.set_captions(py_captions)
for i in range(len(py_records)):
Expand Down
1 change: 0 additions & 1 deletion visualdl/frontend/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ new App({
titleName: 'VisualDL'
}
}).attach(document.getElementById('root'));

0 comments on commit 341a322

Please sign in to comment.