From 06a719830cd39619f771f0ab1007bd86cbad63b6 Mon Sep 17 00:00:00 2001 From: wangguanzhong Date: Wed, 7 Sep 2022 12:12:31 +0800 Subject: [PATCH] update en doc and version check (#6876) --- README.md | 2 +- docs/tutorials/INSTALL.md | 2 +- docs/tutorials/INSTALL_cn.md | 2 +- ppdet/utils/check.py | 13 ++++++++++++- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4015683cf..13c4f964b 120000 --- a/README.md +++ b/README.md @@ -1 +1 @@ -README_cn.md \ No newline at end of file +README_en.md \ No newline at end of file diff --git a/docs/tutorials/INSTALL.md b/docs/tutorials/INSTALL.md index fc2225c77..d5e8f84b9 100644 --- a/docs/tutorials/INSTALL.md +++ b/docs/tutorials/INSTALL.md @@ -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 | diff --git a/docs/tutorials/INSTALL_cn.md b/docs/tutorials/INSTALL_cn.md index 0e13aeb05..970b53933 100644 --- a/docs/tutorials/INSTALL_cn.md +++ b/docs/tutorials/INSTALL_cn.md @@ -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 | 默认使用动态图模式 | diff --git a/ppdet/utils/check.py b/ppdet/utils/check.py index c7e13683f..f51a517a1 100644 --- a/ppdet/utils/check.py +++ b/ppdet/utils/check.py @@ -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)) -- GitLab