-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feature: Hugging Face Transformers 4.12 for Pt1.9/TF2.5 #2752
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
Changes from 3 commits
8e29874
13138ea
cb2d374
856a949
a5c6012
1007498
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -158,7 +158,7 @@ def test_huggingface_inference( | |
huggingface_pytorch_latest_inference_py_version, | ||
): | ||
env = { | ||
"HF_MODEL_ID": "sshleifer/tiny-distilbert-base-uncased-finetuned-sst-2-english", | ||
"HF_MODEL_ID": "philschmid/tiny-distilbert-classification", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @philschmid Can we please give this a generic name to this model? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure what you mean by that. That is not a model which will be created it is stored on the hf.co/models hub and used to run tests. I changed it because to a model which we can control. https://huggingface.co/philschmid/tiny-distilbert-classification. |
||
"HF_TASK": "text-classification", | ||
} | ||
endpoint_name = unique_name_from_base("test-hf-inference") | ||
|
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.
Can you detail why we are removing the to_tensor call, especially since the shape's
tokenizer.model_max_length
parameter is something that we gave explicitly in the past? Is this driven by the change in TF version?Please make this backwards compatible ie. have an original test case with the previous changes, and add a new test case for this requirement where the to_tensor call is not required so that we test both scenarios.
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.
It has been removed in
Datasets
since we changed the internal structure. it used to return RaggedTensor even when the tensors were normal dense tensors.And the
tokenizer.mode_max_length
is already represented inwhich creates already a shape of
max_length
.I added a condition to test to check the
transformers
version and added the old code