Skip to content

Conversation

@mattdangerw
Copy link
Member

@mattdangerw mattdangerw commented Sep 18, 2024

Fix for #1795 (comment)

We switched the class name for XXClassifier models to XXTextClasssifier. However, a saved classifier before 0.16 will still be looking for the class under the old name.

This updates our export helper to also registere the old name, so we can restore to the new class when loading the model.

I also try to improve our error messages when we do encounter an unrecognized class.

We switched the class name for `XXClassifier` models to
`XXTextClasssifier`. However, a saved classifier before 0.16 will still
be looking for the class under the old name.

This updates our export helper to also registered the old name, so we can
restore to the new class when loading the model.

I also try to improve our error messages when we do encounter an
unrecognized class.
Copy link
Member

@SamanehSaadat SamanehSaadat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Matt!

@mattdangerw mattdangerw merged commit 29fe129 into keras-team:master Sep 18, 2024
mattdangerw added a commit that referenced this pull request Sep 18, 2024
We switched the class name for `XXClassifier` models to
`XXTextClasssifier`. However, a saved classifier before 0.16 will still
be looking for the class under the old name.

This updates our export helper to also registered the old name, so we can
restore to the new class when loading the model.

I also try to improve our error messages when we do encounter an
unrecognized class.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants