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
986ac03e
Unverified
Commit
986ac03e
authored
Jun 23, 2021
by
Michael Benayoun
Committed by
GitHub
Jun 23, 2021
Browse files
changed modeling_fx_utils.py to utils/fx.py for clarity (#12326)
Co-authored-by:
Michael Benayoun
<
michael@huggingface.co
>
parent
941b4442
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
src/transformers/utils/fx.py
src/transformers/utils/fx.py
+2
-2
tests/test_modeling_common.py
tests/test_modeling_common.py
+1
-1
No files found.
src/transformers/
modeling_fx_
utils.py
→
src/transformers/utils
/fx
.py
View file @
986ac03e
...
@@ -11,7 +11,7 @@ from torch.fx.node import Argument
...
@@ -11,7 +11,7 @@ from torch.fx.node import Argument
from
transformers.file_utils
import
TORCH_FX_REQUIRED_VERSION
,
importlib_metadata
,
is_torch_fx_available
from
transformers.file_utils
import
TORCH_FX_REQUIRED_VERSION
,
importlib_metadata
,
is_torch_fx_available
from
.
import
(
from
.
.
import
(
MODEL_FOR_CAUSAL_LM_MAPPING
,
MODEL_FOR_CAUSAL_LM_MAPPING
,
MODEL_FOR_IMAGE_CLASSIFICATION_MAPPING
,
MODEL_FOR_IMAGE_CLASSIFICATION_MAPPING
,
MODEL_FOR_MASKED_LM_MAPPING
,
MODEL_FOR_MASKED_LM_MAPPING
,
...
@@ -26,7 +26,7 @@ from . import (
...
@@ -26,7 +26,7 @@ from . import (
PreTrainedModel
,
PreTrainedModel
,
logging
,
logging
,
)
)
from
.models.auto
import
get_values
from
.
.models.auto
import
get_values
logger
=
logging
.
get_logger
(
__name__
)
logger
=
logging
.
get_logger
(
__name__
)
...
...
tests/test_modeling_common.py
View file @
986ac03e
...
@@ -67,7 +67,7 @@ if is_torch_available():
...
@@ -67,7 +67,7 @@ if is_torch_available():
)
)
if
is_torch_fx_available
():
if
is_torch_fx_available
():
from
transformers.
modeling_fx_
utils
import
symbolic_trace
from
transformers.utils
.fx
import
symbolic_trace
def
_config_zero_init
(
config
):
def
_config_zero_init
(
config
):
...
...
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