Unverified Commit 7bc88c05 authored by Sylvain Gugger's avatar Sylvain Gugger Committed by GitHub
Browse files

Fix forward reference imports in DeBERTa configs (#17800)

parent 27e90738
......@@ -14,14 +14,17 @@
# limitations under the License.
""" DeBERTa model configuration"""
from collections import OrderedDict
from typing import Any, Mapping, Optional, Union
from typing import TYPE_CHECKING, Any, Mapping, Optional, Union
from ... import FeatureExtractionMixin, PreTrainedTokenizerBase, TensorType
from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging
if TYPE_CHECKING:
from ... import FeatureExtractionMixin, PreTrainedTokenizerBase, TensorType
logger = logging.get_logger(__name__)
DEBERTA_PRETRAINED_CONFIG_ARCHIVE_MAP = {
......@@ -169,7 +172,7 @@ class DebertaOnnxConfig(OnnxConfig):
seq_length: int = -1,
num_choices: int = -1,
is_pair: bool = False,
framework: Optional[TensorType] = None,
framework: Optional["TensorType"] = None,
num_channels: int = 3,
image_width: int = 40,
image_height: int = 40,
......
......@@ -14,14 +14,17 @@
# limitations under the License.
""" DeBERTa-v2 model configuration"""
from collections import OrderedDict
from typing import Any, Mapping, Optional, Union
from typing import TYPE_CHECKING, Any, Mapping, Optional, Union
from ... import FeatureExtractionMixin, PreTrainedTokenizerBase, TensorType
from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging
if TYPE_CHECKING:
from ... import FeatureExtractionMixin, PreTrainedTokenizerBase, TensorType
logger = logging.get_logger(__name__)
DEBERTA_V2_PRETRAINED_CONFIG_ARCHIVE_MAP = {
......@@ -170,7 +173,7 @@ class DebertaV2OnnxConfig(OnnxConfig):
seq_length: int = -1,
num_choices: int = -1,
is_pair: bool = False,
framework: Optional[TensorType] = None,
framework: Optional["TensorType"] = None,
num_channels: int = 3,
image_width: int = 40,
image_height: int = 40,
......
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