Closed xvalcarce closed 5 months ago
Thank you, nice find! Would you like to open a PR and add your name to the contributors for the next release?
Hey @ziofil , thanks for the opportunity, I opened a PR with the quick-fix as you suggested!
Hi @xvalcarce! Thanks for putting this all together, super detailed and made things easy. We didn't want to force a lower TensorFlow version upon our users, so I just merged a PR to add support for TensorFlow 2.16 - you can check out the details in the PR above, but the tl;dr is MrMustard now uses the non-legacy version of the Adam optimizer when you have TF 2.16+ installed. Lmk if you have any questions/concerns about things
TensorFlow
>=2.16.0
has been released a month ago. Installing MrMustard withpip install mrmustard
will install TensorFlow2.16.1
by default. This is problematic as new releases of TensorFlow dropped support for Keras 2.0 -- see the release note. Therefore, the following callhttps://github.com/XanaduAI/MrMustard/blob/d31b70f5d68d36d471858c7cffe2382b5d200f55/mrmustard/math/backend_tensorflow.py#L403
will trigger an error. For a MWE, the error can easily be triggered with the optimization given in the README
https://github.com/XanaduAI/MrMustard/blob/d31b70f5d68d36d471858c7cffe2382b5d200f55/README.md?plain=1#L252-L285
As a temporary fix, I suggest to replace
^2.15.0
with~2.15.0
in the following https://github.com/XanaduAI/MrMustard/blob/d31b70f5d68d36d471858c7cffe2382b5d200f55/pyproject.toml#L52-L59