Skip to content

Tensorflow 2.16.1 compatibility #38

Description

@Stikus

Hello, as you can see in pVACtools issue griffithlab/pVACtools#1084 - https://github.com/openvax/mhcflurry and mhcnuggets doesn't work with latest 2.16.1 version of tensorflow.

Exception: An error occurred while calling MHCnuggets:
/usr/local/lib/python3.10/dist-packages/keras/src/layers/core/masking.py:47: UserWarning: Do not pass an `input_shape`/`input_dim` argument to a layer. When using Sequential models, prefer using an `Input(shape)` object as the first layer in the model instead.
  super().__init__(**kwargs)
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/pvactools/lib/call_mhcnuggets.py", line 84, in <module>
    main()
  File "/usr/local/lib/python3.10/dist-packages/pvactools/lib/call_mhcnuggets.py", line 61, in main
    predict(args.class_type, tmp_file.name, mhcnuggets_allele(args.allele, args.class_type), output=tmp_output_file.name, rank_output=True)
  File "/usr/local/lib/python3.10/dist-packages/mhcnuggets/src/predict.py", line 93, in predict
    model.compile(loss='mse', optimizer=Adam(lr=0.001))
  File "/usr/local/lib/python3.10/dist-packages/keras/src/optimizers/adam.py", line 60, in __init__
    super().__init__(
  File "/usr/local/lib/python3.10/dist-packages/keras/src/backend/tensorflow/optimizer.py", line 19, in __init__
    super().__init__(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/keras/src/optimizers/base_optimizer.py", line 38, in __init__
    raise ValueError(f"Argument(s) not recognized: {kwargs}")
ValueError: Argument(s) not recognized: {'lr': 0.001}

Looks like some legacy code stopped working:
https://github.com/KarchinLab/mhcnuggets/blob/master/mhcnuggets/src/predict.py#L90-L93

Maybe tensorflow version should be pinned until code is fixed?

Similar openvax/mhcflurry#234 issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions