From 8b003f7d01556b0424550c784149f7d775989e3e Mon Sep 17 00:00:00 2001 From: sanchit-gandhi Date: Fri, 16 Jun 2023 14:45:38 +0100 Subject: [PATCH] add tf to docs / init --- src/transformers/__init__.py | 2 ++ src/transformers/utils/dummy_tf_objects.py | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/src/transformers/__init__.py b/src/transformers/__init__.py index 3f6802c376d218..ee31727bf1f9ad 100644 --- a/src/transformers/__init__.py +++ b/src/transformers/__init__.py @@ -2999,6 +2999,7 @@ "TFAutoModelForSequenceClassification", "TFAutoModelForSpeechSeq2Seq", "TFAutoModelForTableQuestionAnswering", + "TFAutoModelForTextEncoding", "TFAutoModelForTokenClassification", "TFAutoModelForVision2Seq", "TFAutoModelForZeroShotImageClassification", @@ -6385,6 +6386,7 @@ TFAutoModelForSequenceClassification, TFAutoModelForSpeechSeq2Seq, TFAutoModelForTableQuestionAnswering, + TFAutoModelForTextEncoding, TFAutoModelForTokenClassification, TFAutoModelForVision2Seq, TFAutoModelForZeroShotImageClassification, diff --git a/src/transformers/utils/dummy_tf_objects.py b/src/transformers/utils/dummy_tf_objects.py index 4a189174eeebfa..2780b6891dac74 100644 --- a/src/transformers/utils/dummy_tf_objects.py +++ b/src/transformers/utils/dummy_tf_objects.py @@ -371,6 +371,13 @@ def __init__(self, *args, **kwargs): requires_backends(self, ["tf"]) +class TFAutoModelForTextEncoding(metaclass=DummyObject): + _backends = ["tf"] + + def __init__(self, *args, **kwargs): + requires_backends(self, ["tf"]) + + class TFAutoModelForTokenClassification(metaclass=DummyObject): _backends = ["tf"]