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

make sure we don't warn on empty tokens #1554

Merged
merged 4 commits into from
Jun 20, 2024
Merged

make sure we don't warn on empty tokens #1554

merged 4 commits into from
Jun 20, 2024

Conversation

ArthurZucker
Copy link
Collaborator

When activating warnings, there was an issue with added tokens that are not part of the vocab. I am pretty sure that the main point about added tokens is that they don't have to be in the vocab, so fixing this.

@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.

Copy link
Member

@McPatate McPatate left a comment

Choose a reason for hiding this comment

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

lgtm, I'll trust you that this is the correct behaviour, not too versed on this topic 😅

Comment on lines +236 to +245
#[cfg(feature = "http")]
#[test]
fn test_from_pretrained() {
fmt()
.with_max_level(tracing::Level::DEBUG)
.with_target(false)
.init();
let _ = Tokenizer::from_pretrained("Qwen/Qwen2-7B-Instruct", None);
warn!("This should be the first warning");
}
Copy link
Member

Choose a reason for hiding this comment

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

What is the purpose of this test?

@ArthurZucker
Copy link
Collaborator Author

Will fix clippy on main and merge!

@ArthurZucker ArthurZucker merged commit 9441f7e into main Jun 20, 2024
11 of 13 checks passed
@ArthurZucker ArthurZucker deleted the dont-check-empty branch June 20, 2024 12:33
ArthurZucker added a commit that referenced this pull request Jul 12, 2024
* make sure we don't warn on empty tokens

* Testing the log is actually hard 😓

* mpty
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.

3 participants