Open gustheman opened 1 year ago
Thanks for reporting the issue. I confirm that Release 0.6.0 had the argument named as masked_positions
https://github.com/keras-team/keras-nlp/blob/r0.6/keras_nlp/layers/modeling/masked_lm_head.py#L180. This is changed in main branch to mask_positions
, so checking with @mattdangerw to see if we need to update the tutorial or should we do a new release of Keras-NLP to fix it.
After discussing with Matt, I realized that we need to update the arg in tutorial to masked_positions
. Will update with a PR.
Actually just noticed this was actually us working around a bug in keras-core. Just applied a fix. https://github.com/keras-team/keras-core/pull/632
So I think we can restore the original name here. https://github.com/keras-team/keras-nlp/pull/1185
Let's fix this in 0.6.1, and release that soon!
I'm was playing with KerasNLP and found an issue on the main tutorial
https://keras.io/guides/keras_nlp/getting_started/
In the expert part, on the pretraining model cell, I'm getting an error in the line:
outputs = mlm_head(sequence, mask_positions=inputs["mask_positions"])
Error:
/usr/local/lib/python3.10/dist-packages/keras/src/engine/functional.py:639: UserWarning: Input dict contained keys ['mask_positions'] which did not match any model input. They will be ignored by the model. inputs = self._flatten_to_reference_inputs(inputs)
TypeError Traceback (most recent call last)