-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Add unittest job to CircleCI #2328
Conversation
fc8b338
to
374d0c6
Compare
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.
Generally LGTM, please remember to remove the windows legacy build jobs and its job spec.
374d0c6
to
dad5f10
Compare
Codecov Report
@@ Coverage Diff @@
## master #2328 +/- ##
==========================================
+ Coverage 68.49% 70.73% +2.24%
==========================================
Files 93 93
Lines 7655 7706 +51
Branches 1177 1177
==========================================
+ Hits 5243 5451 +208
+ Misses 2075 1903 -172
- Partials 337 352 +15
Continue to review full report at Codecov.
|
thank you, they have been removed. |
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.
Thanks for the PR!
I think that we might now be missing our single CUDA CI that was effectively running CUDA tests, which was torchvision_linux_py3.8_cu102_cuda
. So we would need to add back a CUDA CI test before we can merge this, otherwise we won't be able to check for CUDA correctness (now it only compiles torchvision, but doesn't run any tests).
@seemethere could you also have a look?
conda activate ./env | ||
|
||
python -m torch.utils.collect_env | ||
pytest --cov=torchaudio --junitxml=test-results/junit.xml -v --durations 20 test |
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.
nit: torchaudio
# This script is for setting up environment in which unit test is ran. | ||
# To speed up the CI time, the resulting environment is cached. | ||
# | ||
# Do not install PyTorch and torchaudio here, otherwise they also get cached. |
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.
nit: torchaudio
# This script is for setting up environment in which unit test is ran. | ||
# To speed up the CI time, the resulting environment is cached. | ||
# | ||
# Do not install PyTorch and torchaudio here, otherwise they also get cached. |
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.
nit: torchaudio
unittest_linux_cpu: | ||
<<: *binary_common | ||
docker: | ||
- image: "pytorch/manylinux-cuda102" |
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.
Is there a reason why cuda image is used to run cpu tests?
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.
When I added the original version of this to torchaudio
, I could not find CPU version. If you know what's an appropriate image for CPU, let me know, I will also update on torchaudio
side.
image: ubuntu-1604-cuda-10.1:201909-23 | ||
resource_class: gpu.small | ||
environment: | ||
image_name: "pytorch/manylinux-cuda101" |
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.
Is there a reason why you prefer CUDA 10.1 vs CUDA 10.2
executor: | ||
name: windows-gpu | ||
environment: | ||
CUDA_VERSION: "10.1" |
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.
Same as above: why CUDA 10.1 rather than CUDA 10.2?
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.
We use CUDA 10.1 before this change just because it is already installed in the image. If you want, we may do it in a follow-up PR.
<<: *binary_common | ||
machine: | ||
image: ubuntu-1604-cuda-10.1:201909-23 | ||
resource_class: gpu.small |
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.
Aren't this job and the unittest_linux_cpu
basically the same job?
Should we just consolidate them and then add an extra parameter to designate resource_class
?
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.
@seemethere When I worked on this, I could not find a Docker runner with GPU. My understanding is that for GPU, CircleCI gives Virtual Machine, so we need to run the same script with docker run
argument. While non-GPU environment CIrcleCI gives is Docker container.
Let me know if you know a way to request GPU Docker environment (not VM).
path: test-results | ||
|
||
unittest_windows_gpu: | ||
<<: *binary_common |
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.
Same comment here about consolidating build jobs
61ef663
to
87eff97
Compare
Do you mean to run unit tests with CUDA? There is already one named |
I might be missing something, but the CI is not running any test named |
@fmassa They run only on master. Maybe we should make at least one of them run in PRs, right? |
87eff97
to
68583dd
Compare
Yes, they should run in PRs as well. I see that it has been updated now, thanks! |
Maybe we don't need all CUDA tests running on every PR (would be expensive?), but only a small subset -- before we only had one CI running CUDA tests on Linux and Windows, maybe we could keep the same here? cc @seemethere for thoughts |
if we only put unittest_gpu_py3.8 on pr and others on master? |
That sounds good to me, although I would also put |
68583dd
to
afa3105
Compare
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.
Changes look good to me, thanks a lot!
I think we can cleanup one more build which is not needed anymore, but otherwise this seems ok to me.
I'll let @seemethere merge this one, as he is maintaining CI and releases for torchvision.
.circleci/config.yml.in
Outdated
- binary_linux_conda_cuda: | ||
name: torchvision_linux_py3.8_cu102_cuda | ||
python_version: "3.8" | ||
cu_version: "cu102" |
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.
This build is I believe not needed anymore, and the corresponding binary_linux_conda_cuda
is not needed anymore I think.
afa3105
to
80c34fd
Compare
Remove unittest from conda build, and add them as independent unittest jobs.
So unittests will not triggered at every conda build and test in an independent test env.
test at #2332