Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
0x45f opened this issue Apr 26, 2024 · 4 comments
Closed

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

0x45f opened this issue Apr 26, 2024 · 4 comments
Assignees
Labels
Bug Something isn't working Build

Comments

@0x45f
Copy link
Collaborator

0x45f commented Apr 26, 2024

  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库一次性安装上~

@Zheng-Bicheng
Copy link
Collaborator

感谢大佬帮忙整理

@Zheng-Bicheng
Copy link
Collaborator

Zheng-Bicheng commented Apr 26, 2024

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

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

@Zheng-Bicheng Zheng-Bicheng added the Bug Something isn't working label Apr 26, 2024
@Zheng-Bicheng Zheng-Bicheng changed the title 关于本地编译安装和执行单测的问题记录 [Bug] 关于本地编译安装和执行单测的问题记录 Apr 26, 2024
@jzhang533
Copy link
Collaborator

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

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

@Zheng-Bicheng Zheng-Bicheng self-assigned this May 23, 2024
@Zheng-Bicheng
Copy link
Collaborator

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Build
Projects
None yet
Development

No branches or pull requests

3 participants