multi_inputs is not automatically detected
I am running the new multi_inputs pipeline, when running MS2Deepscore, you require to add multi_inputs=True.
The error you get when forgetting to set this to True is confusing: /ms2deepscore/MS2DeepScore.py", line 76, in _create_input_vector X = np.zeros((1, self.input_vector_dim)) TypeError: 'tuple' object cannot be interpreted as an integer
Two possible solutions:
- Add an assert statement in MS2Deepscore init, that checks if the input layer is not a tuple. And raises an error suggesting to use multi_inputs =True.
- Automatically detect if a model is multi_input. Maybe by storing that it is multi_input as part of the model. Or by detecting the shape of the base model and automatically setting it to multi_input, if the shape is a tuple.
@florian-huber @djoas Thanks for implementing this :) Let me know if the issue I try to address is unclear!
Sounds like good suggestions!
- Would be more comfortable to use, but is probably not backward compatible.
- Seems easy to implement.
Thanks for the suggestion! I updated the branch additional_input_parameters with a solution to automatically detect if there are multiple inputs and removed the keyword multi_inputs.