Unverified Commit a5d18396 authored by lewtun's avatar lewtun Committed by GitHub
Browse files

Remove next sentence prediction from supported ONNX tasks (#17276)

parent 05a90579
......@@ -45,7 +45,6 @@ if is_torch_available():
AutoModelForMaskedImageModeling,
AutoModelForMaskedLM,
AutoModelForMultipleChoice,
AutoModelForNextSentencePrediction,
AutoModelForQuestionAnswering,
AutoModelForSeq2SeqLM,
AutoModelForSequenceClassification,
......@@ -57,7 +56,6 @@ if is_tf_available():
TFAutoModelForCausalLM,
TFAutoModelForMaskedLM,
TFAutoModelForMultipleChoice,
TFAutoModelForNextSentencePrediction,
TFAutoModelForQuestionAnswering,
TFAutoModelForSeq2SeqLM,
TFAutoModelForSequenceClassification,
......@@ -112,7 +110,6 @@ class FeaturesManager:
"question-answering": AutoModelForQuestionAnswering,
"image-classification": AutoModelForImageClassification,
"masked-im": AutoModelForMaskedImageModeling,
"next-sentence-prediction": AutoModelForNextSentencePrediction,
}
if is_tf_available():
_TASKS_TO_TF_AUTOMODELS = {
......@@ -124,7 +121,6 @@ class FeaturesManager:
"token-classification": TFAutoModelForTokenClassification,
"multiple-choice": TFAutoModelForMultipleChoice,
"question-answering": TFAutoModelForQuestionAnswering,
"next-sentence-prediction": TFAutoModelForNextSentencePrediction,
}
# Set of model topologies we support associated to the features supported by each topology and the factory
......@@ -159,7 +155,6 @@ class FeaturesManager:
"multiple-choice",
"token-classification",
"question-answering",
"next-sentence-prediction",
onnx_config_cls=BertOnnxConfig,
),
"big-bird": supported_features_mapping(
......@@ -326,7 +321,6 @@ class FeaturesManager:
"mobilebert": supported_features_mapping(
"default",
"masked-lm",
"next-sentence-prediction",
"sequence-classification",
"multiple-choice",
"token-classification",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment