Skip to content

Commit d58a744

Browse files
[Doc] Refine pydantic error (#1091)
* refine pydantic error * update inference content in user guide
1 parent 90aa9b0 commit d58a744

File tree

3 files changed

+21
-9
lines changed

3 files changed

+21
-9
lines changed

docs/zh/user_guide.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,24 +417,29 @@ PaddleScience 提供了多种推理配置组合,可通过命令行进行组合
417417
=== "pip 安装"
418418
419419
``` sh
420-
pip install paddlepaddle-gpu==2.3.0rc1 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/
420+
# cuda 11.8
421+
pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu118/
422+
# cuda 12.3
423+
pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu123/
421424
```
422425
423426
=== "源码编译"
424427
425-
``` sh
428+
``` sh hl_lines="11 12"
426429
git clone https://github.com/PaddlePaddle/Paddle.git -b develop && cd Paddle/
427430
mkdir build && cd build
431+
428432
cmake .. -DPY_VERSION=3.9 \
429433
-DPYTHON_EXECUTABLE=$(which python3) \
430434
-DWITH_GPU=ON \
431-
-WITH_DISTRIBUTE=ON \
435+
-DWITH_DISTRIBUTE=ON \
432436
-DWITH_TESTING=OFF \
433437
-DCMAKE_BUILD_TYPE=Release \
434438
-DPYTHON_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") \
435439
-DPYTHON_LIBRARY=$(python3 -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))")/libpython3.so \
436440
-DWITH_TENSORRT=ON \
437441
-DTENSORRT_ROOT=$TRT_PATH
442+
438443
pip install python/dist/paddlepaddle_gpu-0.0.0-cp*
439444
```
440445

ppsci/utils/config.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,16 @@ def use_wandb_check(cls, v, info: ValidationInfo):
442442
except ImportError as e:
443443
from ppsci.utils import logger
444444

445-
logger.warning(
446-
f"{e}. paddlesci requires pydantic>=2.5.0; otherwise, "
447-
"built-in examples may not run properly."
445+
logger.error(e)
446+
logger.error(
447+
"paddlesci requires pydantic>=2.5.0; otherwise, built-in examples may not run properly."
448448
)
449-
except Exception:
450-
raise
449+
except Exception as e:
450+
raise e
451+
452+
else:
453+
from ppsci.utils import logger
454+
455+
logger.error(
456+
"paddlesci requires pydantic>=2.5.0; otherwise, built-in examples may not run properly."
457+
)

0 commit comments

Comments
 (0)