Add pytest marker for GPU tests
See original GitHub issueIt came up in the monthly community meeting that we should add a gpu
pytest marker to certain test modules / individual tests which run on GPUs. This will allow us to select only GPU-related tests when running the test suite on machines with GPUs in CI (xref https://github.com/dask/distributed/pull/5011)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (7 by maintainers)
Top Results From Across the Web
Testing — transformers 3.4.0 documentation - Hugging Face
pytest -sugar is a plugin that improves the look-n-feel, adds a progressbar, and show tests that fail and the assert instantly.
Read more >How to mark test functions with attributes - Pytest
By using the pytest.mark helper you can easily set metadata on your test functions. You can find the full list of builtin markers...
Read more >Enable multiprocessing when testing with GPU and support ...
To do that we'll use pytest markers: @pytest.mark..... By default, if no marker is found, the test will run on CPU: with device(" ......
Read more >pytest-manual-marker - PyPI
Pytest marker for marking manual tests. Adds options for collecting manual, automated (default) or both. Adds a different test outcome for manaual tests....
Read more >run dependant tests with pytest - Stack Overflow
If you filter by markers, this is not possible, AFAIK. Can you elaborate on why you can't add the marker to test_a ?...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Great! If I were doing this I would probably do something like:
gpu
marker herehttps://github.com/dask/distributed/blob/8b79bd95d0c5a681f6d0543eb20d645dc1182ec1/setup.cfg#L49-L52
this will inform
pytest
about the new markertest_nanny.py
) with a module-levelpytest.mark.gpu
markertest_nanny.py
and decorate individual tests that run on GPUs with@pytest.mark.gpu
We added test_nanny because of a UCX issue. Here is the PR for the work https://github.com/dask/distributed/pull/3747 – I think if it’s not too much overhead testing the entire file would be good