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

Enable transformers v4.47 support #2119

Merged
merged 6 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"datasets>=1.2.1",
"evaluate",
"protobuf>=3.20.1",
"transformers>=4.36,<4.47.0",
"transformers>=4.36,<4.48.0",
],
"onnxruntime-gpu": [
"onnx",
Expand All @@ -60,19 +60,19 @@
"evaluate",
"protobuf>=3.20.1",
"accelerate", # ORTTrainer requires it.
"transformers>=4.36,<4.47.0",
"transformers>=4.36,<4.48.0",
],
"exporters": [
"onnx",
"onnxruntime",
"timm",
"transformers>=4.36,<4.47.0",
"transformers>=4.36,<4.48.0",
],
"exporters-gpu": [
"onnx",
"onnxruntime-gpu",
"timm",
"transformers>=4.36,<4.47.0",
"transformers>=4.36,<4.48.0",
],
"exporters-tf": [
"tensorflow>=2.4,<=2.12.1",
Expand Down
4 changes: 2 additions & 2 deletions tests/onnx/test_onnx_export_custom_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

if is_torch_available():
import torch
from transformers.models.deberta import modeling_deberta
from transformers.models.sew_d import modeling_sew_d
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

StableDropout was removed from modeling_deberta in huggingface/transformers#22105


from optimum.utils import check_if_torch_greater

Expand All @@ -36,7 +36,7 @@ def test_training(self):
"""Tests export of StableDropout in training mode."""
devnull = open(os.devnull, "wb")
# drop_prob must be > 0 for the test to be meaningful
sd = modeling_deberta.StableDropout(0.1)
sd = modeling_sew_d.StableDropout(0.1)
# Avoid warnings in training mode
do_constant_folding = False
# Dropout is a no-op in inference mode
Expand Down
Loading