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

Added ability to inspect a 'Sequence' decoder and the AddedVocabulary. #1443

Merged
merged 2 commits into from
Mar 29, 2024

Conversation

eaplatanios
Copy link
Contributor

This PR is in similar spirit to #1341 and adds a couple more functions that allow one to construct a modified version of an existing Tokenizer. I've followed the existing style and conventions for newly introduced functions.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@eaplatanios
Copy link
Contributor Author

@ArthurZucker @Narsil gentle ping on this one and on #1444.

@eaplatanios
Copy link
Contributor Author

@ArthurZucker @Narsil gentle ping about this PR. This PR should not be controversial and is in similar spirit to #1341 (and has the same motivation).

@ArthurZucker
Copy link
Collaborator

really sorry about all the delays, lot happening on transformers, I'll free some time

Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

Actually doesn't look bad and would help me in transformers if we add the layer to update the added vocab. This is not super stateless, so leave it up to @Narsil

@ArthurZucker
Copy link
Collaborator

Also can you add tests for set and get? 🤗

Copy link
Collaborator

@Narsil Narsil left a comment

Choose a reason for hiding this comment

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

LGTM.

It's ok because it doesn´t seem like we open up any function that have potentially bad internal state (Deserialize is not implemented for AddedVocabulary directly, itś always parsed from the entire Tokenizer).

@Narsil Narsil merged commit 6153126 into huggingface:main Mar 29, 2024
12 checks passed
@eaplatanios
Copy link
Contributor Author

Sorry this fell through the cracks a bit over the past couple of weeks and I just saw the last couple of comments. Thanks for approving and merging this!

@ArthurZucker
Copy link
Collaborator

Thanks for your contribution 🤗

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.

4 participants