-
Notifications
You must be signed in to change notification settings - Fork 212
TF warnings in demos #1505
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
TF warnings in demos #1505
Conversation
Do we change this? Line 25 in 2b81e12
|
Ya if we're removing tensorflow entirely, this can be removed. Note that this is a constraints file, so keeping this won't actually install tensorflow, but it will be a bit confusing to keep a constraint that isn't needed. |
Not sure what that is tbh. I don't think we use this file anymore. @rashidnhm do you know what this is for?
Probably doesn't hurt to keep this, in case we reference TensorFlow anywhere in this repo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good! Although, can you update the date last modified for each of the metadatas ... I'm sorry.
Looks like V2 builds are failing @Alan-eMartin , any ideas? I think they might not be up to date with the V1 demos |
This demo is targeting
|
The other failure is because the lock file has not been updated. |
Yup, that demo was updated on V1 but not V2 |
would the logical update be transfering the contents of those files in v1 to v2? I see the following demos with this change. If so, I think that the best course of action would be to do this. ![]() |
Also, could you confirm that this was renamed to prevent the execution? If so we can update them be tutorial again (in v2 only) and change |
Sorry, which demo do you think was renamed? |
Linking to this ticket to track the change in marking demos non-executable: [sc-97632] |
**Context:** We are deprecating `tensorflow` maintenance support and promoting user migration to `jax` and `torch` interfaces. **Description of the Change:** - Add deprecation warning to `QNode` execution. This will capture majority of user workflows and ensure deprecation visibility. - Add deprecation warning to https://docs.pennylane.ai/en/stable/introduction/interfaces/tf.html - Add deprecation warning in changelog (which will be promoted to release notes). - Cleaned up necessary tests to un-block work (this involved deleting TF specific `all_interfaces` tests). - Add no cover to TF logic branches Here's an example, ```python import pennylane as qml import tensorflow as tf dev = qml.device("default.qubit", wires=1) params = tf.Variable(0.1) @qml.qnode(dev) def circuit(x): qml.RX(x, wires=0) return qml.expval(qml.PauliZ(0)) circuit(params) ``` ``` PennyLaneDeprecationWarning: Support for the TensorFlow interface is deprecated and will be removed in v0.44. Future versions of PennyLane are not guaranteed to work with TensorFlow. Please migrate your workflows to JAX or torch to benefit from enhanced support and features. circuit(params) <tf.Tensor: shape=(), dtype=float64, numpy=0.9950041833264242> ``` **Benefits:** No longer have to deal with maintaining TF. **Possible Drawbacks:** This could have impact on our eco-system: Catalyst: N/A Lightning: PennyLaneAI/pennylane-lightning#1225 QML: Some [demos](https://github.com/search?q=repo%3APennyLaneAI%2Fqml%20import%20tensorflow&type=code) need changes. Being taken care of by product here PennyLaneAI/qml/pull/1505. Plug-ins: N/A [sc-92521] --------- Co-authored-by: Pietropaolo Frisoni <[email protected]> Co-authored-by: Mudit Pandey <[email protected]> Co-authored-by: Isaac De Vlugt <[email protected]> Co-authored-by: Isaac De Vlugt <[email protected]>
@isaacdevlugt — you may close this now. The changes from this branch have been merged along with the python fixes, etc. |
Closing as these changes were addressed in https://github.com/PennyLaneAI/qml/pull/1516/files |
Title: TF warnings in demos
Summary: add warnings to demos that use TF since we are removing support soon
Relevant references:
Possible Drawbacks: none
Related Shortcut Stories:
[sc-92521]