Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
bfbec177
Unverified
Commit
bfbec177
authored
Apr 27, 2022
by
Sylvain Gugger
Committed by
GitHub
Apr 27, 2022
Browse files
Fix add-new-model-like when model doesn't support all frameworks (#16966)
parent
cf8a7c24
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/commands/add_new_model_like.py
src/transformers/commands/add_new_model_like.py
+1
-1
No files found.
src/transformers/commands/add_new_model_like.py
View file @
bfbec177
...
@@ -517,7 +517,7 @@ def filter_framework_files(
...
@@ -517,7 +517,7 @@ def filter_framework_files(
else
:
else
:
framework_to_file
[
"pt"
]
=
f
framework_to_file
[
"pt"
]
=
f
return
[
framework_to_file
[
f
]
for
f
in
frameworks
]
+
others
return
[
framework_to_file
[
f
]
for
f
in
frameworks
if
f
in
framework_to_file
]
+
others
def
get_model_files
(
model_type
:
str
,
frameworks
:
Optional
[
List
[
str
]]
=
None
)
->
Dict
[
str
,
Union
[
Path
,
List
[
Path
]]]:
def
get_model_files
(
model_type
:
str
,
frameworks
:
Optional
[
List
[
str
]]
=
None
)
->
Dict
[
str
,
Union
[
Path
,
List
[
Path
]]]:
...
...
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