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(): ...@@ -45,7 +45,6 @@ if is_torch_available():
AutoModelForMaskedImageModeling, AutoModelForMaskedImageModeling,
AutoModelForMaskedLM, AutoModelForMaskedLM,
AutoModelForMultipleChoice, AutoModelForMultipleChoice,
AutoModelForNextSentencePrediction,
AutoModelForQuestionAnswering, AutoModelForQuestionAnswering,
AutoModelForSeq2SeqLM, AutoModelForSeq2SeqLM,
AutoModelForSequenceClassification, AutoModelForSequenceClassification,
...@@ -57,7 +56,6 @@ if is_tf_available(): ...@@ -57,7 +56,6 @@ if is_tf_available():
TFAutoModelForCausalLM, TFAutoModelForCausalLM,
TFAutoModelForMaskedLM, TFAutoModelForMaskedLM,
TFAutoModelForMultipleChoice, TFAutoModelForMultipleChoice,
TFAutoModelForNextSentencePrediction,
TFAutoModelForQuestionAnswering, TFAutoModelForQuestionAnswering,
TFAutoModelForSeq2SeqLM, TFAutoModelForSeq2SeqLM,
TFAutoModelForSequenceClassification, TFAutoModelForSequenceClassification,
...@@ -112,7 +110,6 @@ class FeaturesManager: ...@@ -112,7 +110,6 @@ class FeaturesManager:
"question-answering": AutoModelForQuestionAnswering, "question-answering": AutoModelForQuestionAnswering,
"image-classification": AutoModelForImageClassification, "image-classification": AutoModelForImageClassification,
"masked-im": AutoModelForMaskedImageModeling, "masked-im": AutoModelForMaskedImageModeling,
"next-sentence-prediction": AutoModelForNextSentencePrediction,
} }
if is_tf_available(): if is_tf_available():
_TASKS_TO_TF_AUTOMODELS = { _TASKS_TO_TF_AUTOMODELS = {
...@@ -124,7 +121,6 @@ class FeaturesManager: ...@@ -124,7 +121,6 @@ class FeaturesManager:
"token-classification": TFAutoModelForTokenClassification, "token-classification": TFAutoModelForTokenClassification,
"multiple-choice": TFAutoModelForMultipleChoice, "multiple-choice": TFAutoModelForMultipleChoice,
"question-answering": TFAutoModelForQuestionAnswering, "question-answering": TFAutoModelForQuestionAnswering,
"next-sentence-prediction": TFAutoModelForNextSentencePrediction,
} }
# Set of model topologies we support associated to the features supported by each topology and the factory # Set of model topologies we support associated to the features supported by each topology and the factory
...@@ -159,7 +155,6 @@ class FeaturesManager: ...@@ -159,7 +155,6 @@ class FeaturesManager:
"multiple-choice", "multiple-choice",
"token-classification", "token-classification",
"question-answering", "question-answering",
"next-sentence-prediction",
onnx_config_cls=BertOnnxConfig, onnx_config_cls=BertOnnxConfig,
), ),
"big-bird": supported_features_mapping( "big-bird": supported_features_mapping(
...@@ -326,7 +321,6 @@ class FeaturesManager: ...@@ -326,7 +321,6 @@ class FeaturesManager:
"mobilebert": supported_features_mapping( "mobilebert": supported_features_mapping(
"default", "default",
"masked-lm", "masked-lm",
"next-sentence-prediction",
"sequence-classification", "sequence-classification",
"multiple-choice", "multiple-choice",
"token-classification", "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