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
Remove test data from PyPI package #5925
Comments
+1 on this. Otherwise ONNX PyPI package will grow significantly when there are more backend tests from more ops. See related discussion in this issue. For now, some users might still need static backend tests from the package and in that case onnx can have 2 packages -- one with test data and one without test data, but personally I feel ONNX eventually should stop providing them from PyPI and just let users produce them on the fly. |
We should. |
One advantage with distributing the test data of course, is that runtimes do not need the Python tool chain to run tests (protobuf python, numpy etc.) |
When you say "distributing" do you mean shipping them in the PyPI package or having them in the repository? I have a hard time seeing a use case where a downstream project would rather fish the test files out of the PyPI package than using a git submodule. |
Ah you are right. We can check those in without distributing them with the Python package. |
1 similar comment
Ah you are right. We can check those in without distributing them with the Python package. |
I think the best way forward is if we were to move the |
Fixes onnx#5925 in a minimally invasive way. onnx/backend/test/data contains large test files which should not be included in the PyPI package. This PR simply excludes them when building the package. This reduces the size of the `onnx` package (uncompressed) from 51MB to 12MB.
Fixes onnx#5925 in a minimally invasive way. onnx/backend/test/data contains large test files which should not be included in the PyPI package. This PR simply excludes them when building the package. This reduces the size of the `onnx` package (uncompressed) from 51MB to 12MB. Signed-off-by: Christian Bourjau <christian.bourjau@quantco.com>
I took a closer look at this issue. Unfortunately, the lines between tests that should not be packaged, test utilities, and the reference implementation are blurry. Moving the "tests" out of |
Fixes onnx#5925 in a minimally invasive way. onnx/backend/test/data contains large test files which should not be included in the PyPI package. This PR simply excludes them when building the package. This reduces the size of the `onnx` package (uncompressed) from 51MB to 12MB. Signed-off-by: Christian Bourjau <christian.bourjau@quantco.com>
Describe the bug
The ONNX package on PyPI contains all test files found at https://github.com/onnx/onnx/tree/main/onnx/backend/test/data . These constitute ~40MB unpacked or more than 70% of the total package size.
System information
I checked the 1.15.0 MacOS wheel, but judging by the compressed file size all platforms are affected: https://pypi.org/project/onnx/#files
Expected behavior
These test files should not be installed in a production environment.
Other notes
Are there any plans to move those binary files out of git / generate them on the fly?
The text was updated successfully, but these errors were encountered: