-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
CI: run doctests only on GPU machine #2098
Comments
I would rather have doctest that would work on both CPU and GPU as it allows anyone to run all test suite locally and move GPU test in docstring to code samples (or find a way to run then under conditions of GPU) |
I understand, but it will block us of writing doctests for many things. For example here: #1905 I would like a doctest as an example how it works, but it is impossible if the CI fails when no gpus are found. |
I have not found a way. It seem impossible with pytest to skip conditionally like in the other tests. |
I understand, but unfortunately, I do not see any other solution for now as doctests supports only |
😢 that's a bummer. I wonder how PyTorch does it? |
Actually they may not run it and ignore some files in pytest without GPU... |
Currently the doctests run on CPU and GPU but we can't include any GPU related doctests, otherwise they would fail on CPU-only machines.
I propose to turn off CI doctests for CPU-only machines and only let them run on machines with GPU (i.e. drone).
This would allow us to write doctests also for GPU related stuff.
@Borda
The text was updated successfully, but these errors were encountered: