Some task models (not all) were initialized from "inputs", i.e. the flattened list of input vectors, rather than "input", which is the full input structure. This caused a mismatched between the data structure generated by the preprocessor and the one expected by the model. Since Keras PR 20170, this throws a warning when the model is applied to data coming from the preprocessor.
I suspect that this can also lead to an inversion between token_ids and padding_mask when the input structure is flattened.
This PR fixes the issues for the affected models and adds a test for task models ensuring that the structure returned by the preprocessor always matched the structure expected by the model.
Some task models (not all) were initialized from "inputs", i.e. the flattened list of input vectors, rather than "input", which is the full input structure. This caused a mismatched between the data structure generated by the preprocessor and the one expected by the model. Since Keras PR 20170, this throws a warning when the model is applied to data coming from the preprocessor.
I suspect that this can also lead to an inversion between token_ids and padding_mask when the input structure is flattened.
This PR fixes the issues for the affected models and adds a test for task models ensuring that the structure returned by the preprocessor always matched the structure expected by the model.