Closed Stikus closed 4 months ago
Thank you for this report. This is a problem specifically with the prediction algorithms that use tensorflow. Since pVACtools has no direct dependency on tensorflow, we have decided to not pin a specific version for this package. It is up to the prediction algorithms themselves to pin the tensorflow versions they are compatible with or update their code to work with the latest tensorflow version. As such, we recommend that you put in a ticket with MHCflurry and any other prediction algorithm that uses tensorflow. As you noted, users can downgrade/pin tensorflow<=2.15.1 or older in their environment as a workaround until each prediction algorithm updates their code.
@susannasiebert Thanks for fast answer, but I have a question:
For now pVACtools
pins mhcflurry==2.0.6
, but latest release is 2.1.0 - https://github.com/openvax/mhcflurry/releases/tag/v2.1.0, and it has some fixes about tensorflow.
Moreover - for now 2.1.0 doesn't have problematic line:
https://github.com/openvax/mhcflurry/blob/v2.1.0/mhcflurry/common.py#L80
Here is old version, used in pVACtools: https://github.com/openvax/mhcflurry/blob/v2.0.6b/mhcflurry/common.py#L131
if num_threads:
config.inter_op_parallelism_threads = num_threads
config.intra_op_parallelism_threads = num_threads
session = tensorflow.compat.v1.Session(config=config)
tensorflow.compat.v1.disable_v2_behavior()
tensorflow.compat.v1.keras.backend.set_session(session)
Maybe you should update mhcflurry first?
You bring up a good point. Unfortunately, MHCflurry 2.1.0 is incompatible with Python 3.7 because the pinned tensorflow 2.12.0 isn't available for that Python version. For internal reason, we have to continue supporting Python 3.7. I will talk with the team how to move forward.
Yeah I was disappointed to lose python 3.7 support due to the new tensorflow versions. I just released mhcflurry 2.1.1 which pins the TF version to < 2.16, but that won't fix your issue with the python versions unfortunately. A possible workaround for the short term could be to stick to the version of mhcflurry you are already using but add your own tensorflow dependency pinned to something that works. I think that would be a tf version in the range 2.2.0 - 2.9.1 for mhcflurry 2.0.6 based on what was pinned then and what tf had been released on that date but haven't tested this.
Thank you @timodonnell, that is what we are leaning toward. Would it be at all possible to release a mhcflurry 2.0.7 just to pin the TF version to < 2.16? I believe that should work with python 3.7 since it will just pick the latest TF version that fits that requirement and is compatible with python 3.7?
That's a clever idea. Unfortunately I redid our pypi package release stuff since that release though and I don't think I'll have time to figure out how to do a non latest release using the old scripts, at least right now. Would it work to just add tensorflow as a dependency to pvactools until you are able to move to a later python version? That would also let you pick a version that all the various tools can work with rather than relying on the dependency manager to sort it out.
No problem at all. I know how that goes but appreciate you entertaining the idea. I agree that us pinning the TF version is the way to go.
Installation Type
Standalone
pVACtools Version / Docker Image
4.1.1
Python Version
3.10
Operating System
Ubuntu 22.04
Describe the bug
Due to limited pinning of
tensorflow
version after recent update to2.16.1
some legacy code stopped working - maybe it is related to changes, described here https://github.com/tensorflow/tensorflow/releases/tag/v2.16.1.If we pin
tensorflow
version to2.15.1
all started working again.How to reproduce this bug
Input files
No response
Log output
Output files
No response