-
Notifications
You must be signed in to change notification settings - Fork 2k
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
chore: update transformers
test dependency
#8752
Conversation
Pull Request Test Coverage Report for Build 12873461371Details
💛 - Coveralls |
@@ -42,6 +42,7 @@ def mock_pipeline_tokenizer(): | |||
# Mocking the tokenizer | |||
mock_tokenizer = Mock(spec=PreTrainedTokenizer) | |||
mock_tokenizer.encode.return_value = ["Berlin", "is", "cool"] | |||
mock_tokenizer.pad_token_id = 100 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PreTrainedTokenizer
in new versions of transformers
does not have a default pad_token_id
, so I'm setting it in the Mock.
(In any case, we are confident that our component works properly also thanks to an integration test.)
stop_words_criteria = StopWordsCriteria(tokenizer=Mock(spec=PreTrainedTokenizerFast), stop_words=["mock data"]) | ||
|
||
mock_tokenizer = Mock(spec=PreTrainedTokenizerFast) | ||
mock_tokenizer.pad_token = "<pad>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
similar case as above.
@@ -459,3 +463,15 @@ def test_hf_pipeline_runs_with_our_criteria(self): | |||
results = generator.run(prompt="something that triggers something") | |||
assert results["replies"] != [] | |||
assert generator.stopping_criteria_list is not None | |||
|
|||
@pytest.mark.integration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also added an integration test with a small model: it was missing and it helps to make sure everything works...
Related Issues
transformers
in the CIProposed Changes:
transformers
test dependency to 4.47.1How did you test it?
CI
Checklist
fix:
,feat:
,build:
,chore:
,ci:
,docs:
,style:
,refactor:
,perf:
,test:
and added!
in case the PR includes breaking changes.