Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend support to transformers v4.31 #395

Merged

Conversation

adrianeboyd
Copy link
Contributor

@adrianeboyd adrianeboyd commented Jul 24, 2023

Description

Restrict backwards compatibility test to transformers<4.31.

Types of change

?

Checklist

  • I confirm that I have the right to submit this contribution under the project's MIT license.
  • I ran the tests, and all new and existing tests passed.
  • My changes don't require a change to the documentation, or if they do, I've added all required information.

Fall back with warning to `load_state_dict(strict=False)` for backwards
compatibility.
@adrianeboyd adrianeboyd marked this pull request as draft July 24, 2023 09:03
@adrianeboyd adrianeboyd force-pushed the chore/extend-transformers-4.31 branch from bb0285c to 0fee7a5 Compare July 24, 2023 09:25
@adrianeboyd
Copy link
Contributor Author

adrianeboyd commented Jul 24, 2023

In most relevant cases there is already a general warning saying it might not work, so I think it could be okay to leave it at that.

I think we could put this change in v1.3.0 so it wouldn't affect any existing saved trf models with spacy_transformers>=1.2.0,<1.3.0.

@adrianeboyd adrianeboyd marked this pull request as ready for review July 24, 2023 09:57
@adrianeboyd
Copy link
Contributor Author

I think we can add a more informative warning and then still make this change as v1.3.0 so there aren't any surprises with existing packaged models.

@adrianeboyd
Copy link
Contributor Author

I'll just go ahead and do this as v1.3.0 in case people need newer versions of transformers.

@adrianeboyd adrianeboyd merged commit e87c4e3 into explosion:master Jul 31, 2023
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.

1 participant