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

Implement eq in SentencePieceModel based on __getstate__ #764

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

copybara-service[bot]
Copy link

@copybara-service copybara-service bot commented Oct 9, 2024

Implement eq in SentencePieceModel based on getstate

This allows comparing two vocabularies without loading the model. Currently, eq is implemented by comparing the md5 checksum of the loaded models, which requires the model to be loaded. It also ignores other parameters of the vocabulary such as extra_ids, reverse_extra_ids, etc.

This allows comparing two vocabularies without loading the model. Currently, eq is implemented by comparing the md5 checksum of the loaded models, which requires the model to be loaded. It also ignores other parameters of the vocabulary such as `extra_ids`, `reverse_extra_ids`, etc.

PiperOrigin-RevId: 686076354
@copybara-service copybara-service bot merged commit 14cbb0c into main Oct 15, 2024
1 check passed
@copybara-service copybara-service bot deleted the test_684142783 branch October 15, 2024 13:09
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