-
Notifications
You must be signed in to change notification settings - Fork 7.1k
move JPEG reference test into separate CI job #5184
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
Changes from all commits
caa709f
ca00e30
b2b2f18
e6722c0
254297c
305405f
db1abe2
01ccc7c
2f77505
283b632
c138677
1256d38
7aef060
a45a9b2
cba1d64
e426437
32b02ed
0bc9730
a3abad3
ebcb7f6
abfc4b5
9529226
8c6b34d
35581c8
31dbef0
f5a925f
c070c6b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -359,6 +359,39 @@ jobs: | |||||||||||||||||||||||||||||||||||||||||||||
- run_tests_selective: | ||||||||||||||||||||||||||||||||||||||||||||||
file_or_dir: test/test_prototype_*.py | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
# The JPEG reference tests will only pass if torchvision is built against the same JPEG library as Pillow. Starting | ||||||||||||||||||||||||||||||||||||||||||||||
# from Pillow==9, the Pillow wheels are built against libjpeg-turbo on all platforms whereas torchvision is built | ||||||||||||||||||||||||||||||||||||||||||||||
# against libjpeg. By installing Pillow from conda-forge, it uses whatever jpeg library is already present instead of | ||||||||||||||||||||||||||||||||||||||||||||||
# packaging one. | ||||||||||||||||||||||||||||||||||||||||||||||
unittest_jpeg_ref: | ||||||||||||||||||||||||||||||||||||||||||||||
pmeier marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||
docker: | ||||||||||||||||||||||||||||||||||||||||||||||
- image: condaforge/mambaforge | ||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any chance we could stick to conda instead of mamba, so as to stick to the current tools that we use in the rest of the job? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We probably can (there is most likely a docker image that gives us There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't we rely on the same image as the other There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Besides our CPU workflows on Linux, none of the other workflows even use Lines 719 to 722 in d675c0c
Lines 758 to 761 in d675c0c
Lines 808 to 811 in d675c0c
Lines 846 to 849 in d675c0c
Lines 893 to 896 in d675c0c
Apart from that, they all download the
There is a container for that, but again, I see no point. It makes no difference if you install the environment with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm happy to switch all of our jobs to mamba in another PR, but could we please stick to the same workflow that the other jobs are using? There is value in avoiding discrepancies with the rest of our CI jobs. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What other workflow? Manually installing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry I'm a bit confused: what prevents us from staying as close as possible to |
||||||||||||||||||||||||||||||||||||||||||||||
resource_class: xlarge | ||||||||||||||||||||||||||||||||||||||||||||||
steps: | ||||||||||||||||||||||||||||||||||||||||||||||
- run: | ||||||||||||||||||||||||||||||||||||||||||||||
name: Prepare mamba | ||||||||||||||||||||||||||||||||||||||||||||||
command: | | ||||||||||||||||||||||||||||||||||||||||||||||
mv ~/.bashrc ~/._bashrc | ||||||||||||||||||||||||||||||||||||||||||||||
conda init bash | ||||||||||||||||||||||||||||||||||||||||||||||
cat ~/.bashrc >> $BASH_ENV | ||||||||||||||||||||||||||||||||||||||||||||||
mv ~/._bashrc ~/.bashrc | ||||||||||||||||||||||||||||||||||||||||||||||
- checkout | ||||||||||||||||||||||||||||||||||||||||||||||
- run: | ||||||||||||||||||||||||||||||||||||||||||||||
name: Create environment | ||||||||||||||||||||||||||||||||||||||||||||||
command: | | ||||||||||||||||||||||||||||||||||||||||||||||
mamba env create -n jpeg-ref -f .circleci/unittest/jpeg-ref-env.yml | ||||||||||||||||||||||||||||||||||||||||||||||
echo 'conda activate jpeg-ref' >> $BASH_ENV | ||||||||||||||||||||||||||||||||||||||||||||||
- run: | ||||||||||||||||||||||||||||||||||||||||||||||
name: Install torchvision | ||||||||||||||||||||||||||||||||||||||||||||||
command: pip install -v --no-build-isolation --editable . | ||||||||||||||||||||||||||||||||||||||||||||||
- run: | ||||||||||||||||||||||||||||||||||||||||||||||
name: Enable JPEG ref tests | ||||||||||||||||||||||||||||||||||||||||||||||
command: echo 'export PYTORCH_TEST_JPEG_REF=1' >> $BASH_ENV | ||||||||||||||||||||||||||||||||||||||||||||||
- run_tests_selective: | ||||||||||||||||||||||||||||||||||||||||||||||
file_or_dir: > | ||||||||||||||||||||||||||||||||||||||||||||||
test/test_image.py::test_encode_jpeg | ||||||||||||||||||||||||||||||||||||||||||||||
test/test_image.py::test_write_jpeg | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
binary_linux_wheel: | ||||||||||||||||||||||||||||||||||||||||||||||
<<: *binary_common | ||||||||||||||||||||||||||||||||||||||||||||||
docker: | ||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -1093,6 +1126,7 @@ workflows: | |||||||||||||||||||||||||||||||||||||||||||||
- unittest_torchhub | ||||||||||||||||||||||||||||||||||||||||||||||
- unittest_onnx | ||||||||||||||||||||||||||||||||||||||||||||||
- unittest_prototype | ||||||||||||||||||||||||||||||||||||||||||||||
- unittest_jpeg_ref | ||||||||||||||||||||||||||||||||||||||||||||||
{{ unittest_workflows() }} | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
cmake: | ||||||||||||||||||||||||||||||||||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
channels: | ||
- pytorch-nightly | ||
- conda-forge | ||
|
||
dependencies: | ||
- python == 3.7.* | ||
- setuptools | ||
- compilers | ||
- ninja | ||
- cmake | ||
|
||
- cpuonly | ||
- pytorch | ||
|
||
- numpy | ||
- requests | ||
- libpng | ||
- jpeg | ||
- pillow >=5.3.0, !=8.3.* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand what this means. Should we just say "By installing Pillow from conda-forge, we make sure that pillow is built against libjpeg" ?