未验证 提交 7c41cb35 编写于 作者: W wangguanzhong 提交者: GitHub

update en doc and version check (#6875)

上级 30be0d43
README_cn.md
\ No newline at end of file
README_en.md
\ No newline at end of file
......@@ -22,7 +22,7 @@ Dependency of PaddleDetection and PaddlePaddle:
| PaddleDetection version | PaddlePaddle version | tips |
| :----------------: | :---------------: | :-------: |
| develop | >= 2.2.2 | Dygraph mode is set as default |
| develop | develop | Dygraph mode is set as default |
| release/2.5 | >= 2.2.2 | Dygraph mode is set as default |
| release/2.4 | >= 2.2.2 | Dygraph mode is set as default |
| release/2.3 | >= 2.2.0rc | Dygraph mode is set as default |
......
......@@ -18,7 +18,7 @@ PaddleDetection 依赖 PaddlePaddle 版本关系:
| PaddleDetection版本 | PaddlePaddle版本 | 备注 |
| :------------------: | :---------------: | :-------: |
| develop | >= 2.2.2 | 默认使用动态图模式 |
| develop | develop | 默认使用动态图模式 |
| release/2.5 | >= 2.2.2 | 默认使用动态图模式 |
| release/2.4 | >= 2.2.2 | 默认使用动态图模式 |
| release/2.3 | >= 2.2.0rc | 默认使用动态图模式 |
......
......@@ -87,7 +87,7 @@ def check_gpu(use_gpu):
pass
def check_version(version='2.0'):
def check_version(version='2.2'):
"""
Log error and exit when the installed version of paddlepaddle is
not satisfied.
......@@ -100,8 +100,19 @@ def check_version(version='2.0'):
paddle_version.major, paddle_version.minor, paddle_version.patch,
paddle_version.rc
]
# Paddledet develop version is only used on Paddle develop
if version_installed == ['0', '0', '0', '0'] and version != 'develop':
raise Exception(
"PaddlePaddle version {} or higher is required, and develop version is only used for PaddleDetection develop version!".
format(version))
if version_installed == ['0', '0', '0', '0']:
return
if version == 'develop':
raise Exception("PaddlePaddle develop version is required!")
version_split = version.split('.')
length = min(len(version_installed), len(version_split))
......
......@@ -217,7 +217,7 @@ def main():
# check if set use_gpu=True in paddlepaddle cpu version
check_gpu(cfg.use_gpu)
# check if paddlepaddle version is satisfied
check_version()
check_version('develop')
# get dataset
dataset = cfg['TrainDataset']
......
......@@ -184,7 +184,7 @@ def main():
check_gpu(cfg.use_gpu)
check_npu(cfg.use_npu)
check_xpu(cfg.use_xpu)
check_version()
check_version('develop')
run(FLAGS, cfg)
......
......@@ -125,7 +125,7 @@ def main():
check_gpu(cfg.use_gpu)
check_npu(cfg.use_npu)
check_xpu(cfg.use_xpu)
check_version()
check_version('develop')
run(FLAGS, cfg)
......
......@@ -99,7 +99,7 @@ def main():
merge_config(FLAGS.opt)
check_config(cfg)
check_gpu(cfg.use_gpu)
check_version()
check_version('develop')
run(FLAGS, cfg)
......
......@@ -217,7 +217,7 @@ def main():
check_gpu(cfg.use_gpu)
check_npu(cfg.use_npu)
check_xpu(cfg.use_xpu)
check_version()
check_version('develop')
run(FLAGS, cfg)
......
......@@ -137,7 +137,7 @@ def main():
check_gpu(cfg.use_gpu)
check_npu(cfg.use_npu)
check_xpu(cfg.use_xpu)
check_version()
check_version('develop')
run(FLAGS, cfg)
......
......@@ -87,7 +87,7 @@ def main():
merge_config(FLAGS.opt)
check_config(cfg)
check_gpu(cfg.use_gpu)
check_version()
check_version('develop')
run(FLAGS, cfg)
......
......@@ -163,7 +163,7 @@ def main():
check.check_config(cfg)
check.check_gpu(cfg.use_gpu)
check.check_npu(cfg.use_npu)
check.check_version()
check.check_version('develop')
run(FLAGS, cfg)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册