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

Update device tests to work with Lightning devices #5518

Merged
merged 6 commits into from
Apr 15, 2024
Merged

Conversation

mudit2812
Copy link
Contributor

The new tests added to the device test suite weren't totally compatible with lightning devices. I've updated the failing tests to work now. The tensorflow tests failed because our execution pipeline with tensorflow doesn't correctly respect the dtypes, which is a larger issue for us to resolve, so it will be handled in a different PR. For now I've skipped the failing tests.

Copy link
Contributor

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

@mudit2812 mudit2812 requested review from maliasadi and albi3ro April 15, 2024 20:42
Copy link
Member

@maliasadi maliasadi left a comment

Choose a reason for hiding this comment

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

Thanks @mudit2812! 🙌

@mudit2812
Copy link
Contributor Author

[sc-61419]

@mudit2812 mudit2812 removed the request for review from albi3ro April 15, 2024 21:08
Copy link

codecov bot commented Apr 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.66%. Comparing base (f540e69) to head (d6d2b81).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5518      +/-   ##
==========================================
- Coverage   99.67%   99.66%   -0.01%     
==========================================
  Files         404      404              
  Lines       37852    37561     -291     
==========================================
- Hits        37728    37436     -292     
- Misses        124      125       +1     

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

Copy link
Member

@mlxd mlxd left a comment

Choose a reason for hiding this comment

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

Thanks @mudit2812

Quick question:

pennylane/devices/tests/test_gradients_tf.py Show resolved Hide resolved
Copy link
Contributor

@albi3ro albi3ro left a comment

Choose a reason for hiding this comment

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

I'm approving this now because it's blocking lightning, but we should update validate_diff_method to actually check dev.supports_derivatives instead of adding a lightning patch. Otherwise we will keep trying to test backprop against devices that don't support it.

@mudit2812 mudit2812 requested a review from mlxd April 15, 2024 21:25
@mudit2812
Copy link
Contributor Author

@albi3ro I've made the suggested changes.

@mudit2812 mudit2812 requested a review from albi3ro April 15, 2024 21:25
@mudit2812 mudit2812 enabled auto-merge (squash) April 15, 2024 21:33
Copy link
Contributor

@albi3ro albi3ro left a comment

Choose a reason for hiding this comment

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

Thanks for making that change 👍

@mudit2812 mudit2812 merged commit 0747c0a into master Apr 15, 2024
38 checks passed
@mudit2812 mudit2812 deleted the dev-tests-fix branch April 15, 2024 21:59
@isaacdevlugt
Copy link
Contributor

@mudit2812 was this intended to fix #5519?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants