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

Option to run only gpu tests in conftest #206

Merged
merged 8 commits into from
Feb 7, 2025

Conversation

BrunoLiegiBastonLiegi
Copy link
Contributor

This adds an option in conftest to run on gpu only:

pytest --gpu_only tests/

This is useful for selfhosted tests as reported in #205.
The selfhosted workflow in qiboteam/workflows has most likely to be updated.

Copy link

codecov bot commented Feb 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (b0bde8b) to head (9c4d8cb).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #206   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           12        12           
  Lines         1119      1121    +2     
=========================================
+ Hits          1119      1121    +2     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andrea-pasquale
Copy link
Contributor

The selfhosted workflow in qiboteam/workflows has most likely to be updated.

Shouldn't it be sufficient to modify the pytest invocation here directly in qibojit?

@BrunoLiegiBastonLiegi
Copy link
Contributor Author

ah yeah you're right it should be, let me try.

@BrunoLiegiBastonLiegi BrunoLiegiBastonLiegi added the run-on-sim Launch tests on gpu label Feb 6, 2025
@BrunoLiegiBastonLiegi BrunoLiegiBastonLiegi added run-on-sim Launch tests on gpu and removed run-on-sim Launch tests on gpu labels Feb 6, 2025
@BrunoLiegiBastonLiegi BrunoLiegiBastonLiegi added run-on-sim Launch tests on gpu and removed run-on-sim Launch tests on gpu labels Feb 7, 2025
Copy link

github-actions bot commented Feb 7, 2025

Run on QPU sim completed! :atom:

You can download the coverage report as an artifact, from the workflow summary page:
https://github.com/qiboteam/qibojit/actions/runs/13199081212

Copy link
Contributor

@andrea-pasquale andrea-pasquale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -15,7 +25,10 @@


@pytest.fixture
def backend(backend_name):
def backend(backend_name, request):
if request.config.getoption("--gpu_only"): # pragma: no cover
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, this # pragma: no cover is now ubiquitous...

Maybe we should take into account to extract tests from the package even in Qibojit...

BrunoLiegiBastonLiegi and others added 2 commits February 7, 2025 13:13
Co-authored-by: Alessandro Candido <candido.ale@gmail.com>
@BrunoLiegiBastonLiegi BrunoLiegiBastonLiegi added run-on-sim Launch tests on gpu and removed run-on-sim Launch tests on gpu labels Feb 7, 2025
@BrunoLiegiBastonLiegi BrunoLiegiBastonLiegi added run-on-sim Launch tests on gpu and removed run-on-sim Launch tests on gpu labels Feb 7, 2025
Copy link

github-actions bot commented Feb 7, 2025

Run on QPU sim completed! :atom:

You can download the coverage report as an artifact, from the workflow summary page:
https://github.com/qiboteam/qibojit/actions/runs/13199792949

@BrunoLiegiBastonLiegi BrunoLiegiBastonLiegi merged commit c2b8bda into main Feb 7, 2025
29 checks passed
@stavros11 stavros11 deleted the gpu_only_selfhosted branch February 8, 2025 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-on-sim Launch tests on gpu
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants