Paddle2ONNX icon indicating copy to clipboard operation
Paddle2ONNX copied to clipboard

[Bug] 关于本地编译安装和执行单测的问题记录

Open 0x45f opened this issue 9 months ago • 2 comments

  1. 本地如何编译安装Paddle2ONNX 整体上按照docs/zh/compile_local.md文档中的介绍进行安装即可,但是需要在编译安装前执行pip install setuptools wheel auditwheel auditwheel-symbols build,否则执行文档中最后的python -m build会报错。 编译完成之后需要手动安装dist目录下的paddle2onnx whl包
  2. 如何执行tests目录下的单测 执行单测前需要安装以下python库,安装后执行pytest test_abs.py即可
    • onnx onnxruntime tqdm filelock
    • six hypothesis
    • pytest
    • paddlepaddle>=2.6.0

另外:是否考虑添加一个requirements.txt文件,这样可以比较方便的将所需的python库一次性安装上~

0x45f avatar Apr 26 '24 08:04 0x45f

感谢大佬帮忙整理

Zheng-Bicheng avatar Apr 26 '24 09:04 Zheng-Bicheng

是否考虑添加一个requirements.txt文件,这样可以比较方便的将所需的python库一次性安装上

现在我们改成用pyproject来构建项目了,不再使用requirements.txt的形式来安装依赖,而且本身Paddle2ONNX没有硬性依赖其他库

Zheng-Bicheng avatar Apr 26 '24 09:04 Zheng-Bicheng

其实看这个文件更直接: https://github.com/PaddlePaddle/Paddle2ONNX/blob/develop/.github/workflows/build_and_test.yml

我还想着找时间,把需要自己本地编译 protobuf 这个很没必要的步骤给干掉。

jzhang533 avatar May 23 '24 11:05 jzhang533

我还想着找时间,把需要自己本地编译 protobuf 这个很没必要的步骤给干掉。

确实,似乎只用到了bin,感觉编译也挺浪费时间

Zheng-Bicheng avatar May 23 '24 12:05 Zheng-Bicheng