keras-nlp icon indicating copy to clipboard operation
keras-nlp copied to clipboard

Remove copy of pack_x_y_sample_weight

Open mattdangerw opened this issue 3 years ago • 3 comments

We are carrying a copy of pack_x_y_sample_weight in this repo that is an exact copy of the current keras nightly behavior, while we wait for https://github.com/keras-team/keras/pull/17233 to make it's way to a stable release.

Once keras 2.12 is widely available (e.g. the default version on colab), we should remove this dependency, and check for tensorflow 2.12 as a minimum version inside setup.py.

mattdangerw avatar Nov 23 '22 02:11 mattdangerw

Note that it will probably be about half a year till we can actually do this, as colab tends to trail the tensorflow stable releases significantly. This is a small utility, so it is not a major inconvenience to carry our own copy.

mattdangerw avatar Nov 23 '22 02:11 mattdangerw

We do not want to use the old version as it would pack a single dictionary of input features (with no lables) inside a tuple. Given that dictionaries of features is our most common input, that would mean our feature only output from preprocessing layers would get passed around like ({"token_ids": ...},), which would be both unnecessary and confusing.

mattdangerw avatar Nov 23 '22 02:11 mattdangerw

I believe we could safely do this now.

mattdangerw avatar Oct 18 '23 20:10 mattdangerw

This is fixed!

mattdangerw avatar Aug 14 '24 02:08 mattdangerw