Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
7bc88c05
"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "d8e3bdbb4cce939e8f95e0f1fa33bdd7350f4b79"
Unverified
Commit
7bc88c05
authored
Jun 21, 2022
by
Sylvain Gugger
Committed by
GitHub
Jun 21, 2022
Browse files
Fix forward reference imports in DeBERTa configs (#17800)
parent
27e90738
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
src/transformers/models/deberta/configuration_deberta.py
src/transformers/models/deberta/configuration_deberta.py
+6
-3
src/transformers/models/deberta_v2/configuration_deberta_v2.py
...ransformers/models/deberta_v2/configuration_deberta_v2.py
+6
-3
No files found.
src/transformers/models/deberta/configuration_deberta.py
View file @
7bc88c05
...
@@ -14,14 +14,17 @@
...
@@ -14,14 +14,17 @@
# limitations under the License.
# limitations under the License.
""" DeBERTa model configuration"""
""" DeBERTa model configuration"""
from
collections
import
OrderedDict
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
...configuration_utils
import
PretrainedConfig
from
...onnx
import
OnnxConfig
from
...onnx
import
OnnxConfig
from
...utils
import
logging
from
...utils
import
logging
if
TYPE_CHECKING
:
from
...
import
FeatureExtractionMixin
,
PreTrainedTokenizerBase
,
TensorType
logger
=
logging
.
get_logger
(
__name__
)
logger
=
logging
.
get_logger
(
__name__
)
DEBERTA_PRETRAINED_CONFIG_ARCHIVE_MAP
=
{
DEBERTA_PRETRAINED_CONFIG_ARCHIVE_MAP
=
{
...
@@ -169,7 +172,7 @@ class DebertaOnnxConfig(OnnxConfig):
...
@@ -169,7 +172,7 @@ class DebertaOnnxConfig(OnnxConfig):
seq_length
:
int
=
-
1
,
seq_length
:
int
=
-
1
,
num_choices
:
int
=
-
1
,
num_choices
:
int
=
-
1
,
is_pair
:
bool
=
False
,
is_pair
:
bool
=
False
,
framework
:
Optional
[
TensorType
]
=
None
,
framework
:
Optional
[
"
TensorType
"
]
=
None
,
num_channels
:
int
=
3
,
num_channels
:
int
=
3
,
image_width
:
int
=
40
,
image_width
:
int
=
40
,
image_height
:
int
=
40
,
image_height
:
int
=
40
,
...
...
src/transformers/models/deberta_v2/configuration_deberta_v2.py
View file @
7bc88c05
...
@@ -14,14 +14,17 @@
...
@@ -14,14 +14,17 @@
# limitations under the License.
# limitations under the License.
""" DeBERTa-v2 model configuration"""
""" DeBERTa-v2 model configuration"""
from
collections
import
OrderedDict
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
...configuration_utils
import
PretrainedConfig
from
...onnx
import
OnnxConfig
from
...onnx
import
OnnxConfig
from
...utils
import
logging
from
...utils
import
logging
if
TYPE_CHECKING
:
from
...
import
FeatureExtractionMixin
,
PreTrainedTokenizerBase
,
TensorType
logger
=
logging
.
get_logger
(
__name__
)
logger
=
logging
.
get_logger
(
__name__
)
DEBERTA_V2_PRETRAINED_CONFIG_ARCHIVE_MAP
=
{
DEBERTA_V2_PRETRAINED_CONFIG_ARCHIVE_MAP
=
{
...
@@ -170,7 +173,7 @@ class DebertaV2OnnxConfig(OnnxConfig):
...
@@ -170,7 +173,7 @@ class DebertaV2OnnxConfig(OnnxConfig):
seq_length
:
int
=
-
1
,
seq_length
:
int
=
-
1
,
num_choices
:
int
=
-
1
,
num_choices
:
int
=
-
1
,
is_pair
:
bool
=
False
,
is_pair
:
bool
=
False
,
framework
:
Optional
[
TensorType
]
=
None
,
framework
:
Optional
[
"
TensorType
"
]
=
None
,
num_channels
:
int
=
3
,
num_channels
:
int
=
3
,
image_width
:
int
=
40
,
image_width
:
int
=
40
,
image_height
:
int
=
40
,
image_height
:
int
=
40
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment