MrMustard
MrMustard copied to clipboard
fix: TensorFlow dependency set to ~2.15
Context:
See issue https://github.com/XanaduAI/MrMustard/issues/381
Description of the Change:
Restrict TensorFlow dependency to >=2.15 and <2.16.
Hi @xvalcarce ,
Thanks for opening this issue up! :)
Personally, I am not convinced that TF should be restricted to version < x, because in the future we will certainly want to install y > x.
The solution to your issue may be using poetry rather than pip install. In your environment, do
pip install poetry
cd MrMustard
poetry install ...
optionally replace ... with options, like we do in our .github/workflows.
TF is locked to 2.15, so poetry should install 2.15
Hey @SamFerracin :)
I agree, this is not a long term viable solution, but a simple quick-fix! Instead the codebase should be updated to match TF 2.16, and set this new version as a minimum requirement. This mainly involves using Adam from Keras 3 (as mentioned in the issue) as well as removing the need for tensorflow-macos as explained here. I can propose these changes in a future commit, if you are interested!
About the installation method, if an installation with cloning the repo and using poetry works fine thanks to the lock, I do believe that installing MrMustard with pip install mrmustard should provide a working module.
Fixed in #406. Thanks again @xvalcarce :)