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

test_cuda doesn't run all of our tests that require GPU #2023

Open
lauramurgatroyd opened this issue Jan 2, 2025 · 1 comment
Open

test_cuda doesn't run all of our tests that require GPU #2023

lauramurgatroyd opened this issue Jan 2, 2025 · 1 comment
Labels
bug Something isn't working gh-actions

Comments

@lauramurgatroyd
Copy link
Member

Description

The test_cuda github action should be running all of our tests that require GPU, but it isn't.

I came across this because on this action run we saw that the test_plot_filter (test_reconstructors.Test_GenericFilteredBackProjection.test_plot_filter) test failed on the docker action run, but the test-cuda action passed. The test-cuda action wasn't running this test.

The test-cuda action runs:

TESTS_FORCE_GPU=1 python -m unittest discover -v -k tigre -k TIGRE -k astra -k ASTRA -k gpu -k GPU ./Wrappers/Python/test

This means it only runs tests that have one or more of the following in their name (or in the name of the class the test belongs to):

tigre, TIGRE, astra, ASTRA, gpu, GPU

https://docs.python.org/3/library/unittest.html#cmdoption-unittest-k

This means that multiple test classes that require tigre are missed out including Test_GenericFilteredBackProjection

Some possible solutions:

  • Change it so that test-cuda runs all tests instead of just ones with specific keywords in
  • Ensure every test that requires GPU has GPU in the test name or class name and add this requirement to the developer guide
  • Add more key words to the test-cuda call to cover more test names

Environment

import cil, sys
print(cil.version.version, cil.version.commit_hash, sys.version, sys.platform)
@lauramurgatroyd lauramurgatroyd added the bug Something isn't working label Jan 2, 2025
@lauramurgatroyd
Copy link
Member Author

The keywords also pick up tests in a module with the keyword in the name - so renaming test filenames could be an easier route

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

No branches or pull requests

1 participant