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
d5db6c37
Unverified
Commit
d5db6c37
authored
Dec 23, 2020
by
Patrick von Platen
Committed by
GitHub
Dec 23, 2020
Browse files
[Seq2Seq Templates] Fix check_repo.py templates file (#9277)
* add enc dec pt model to check repo * fix indent
parent
4bafc43b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/to_replace_{{cookiecutter.lowercase_modelname}}.py
...name}}/to_replace_{{cookiecutter.lowercase_modelname}}.py
+20
-0
utils/check_repo.py
utils/check_repo.py
+2
-0
No files found.
templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/to_replace_{{cookiecutter.lowercase_modelname}}.py
View file @
d5db6c37
...
...
@@ -299,3 +299,23 @@ from ..{{cookiecutter.lowercase_modelname}}.modeling_tf_{{cookiecutter.lowercase
({{
cookiecutter
.
camelcase_modelname
}}
Config
,
TF
{{
cookiecutter
.
camelcase_modelname
}}
ForConditionalGeneration
),
{
%
endif
-%
}
# End.
# To replace in: "utils/check_repo.py" if generating PyTorch
# Below: "models to ignore for model xxx mapping"
# Replace with:
{
%
if
cookiecutter
.
is_encoder_decoder_model
==
"False"
-%
}
{
%
else
-%
}
"{{cookiecutter.camelcase_modelname}}Encoder"
,
"{{cookiecutter.camelcase_modelname}}Decoder"
,
{
%
endif
-%
}
# End.
# Below: "models to ignore for not tested"
# Replace with:
{
%
if
cookiecutter
.
is_encoder_decoder_model
==
"False"
-%
}
{
%
else
-%
}
"{{cookiecutter.camelcase_modelname}}Encoder"
,
# Building part of bigger (tested) model.
"{{cookiecutter.camelcase_modelname}}Decoder"
,
# Building part of bigger (tested) model.
{
%
endif
-%
}
# End.
utils/check_repo.py
View file @
d5db6c37
...
...
@@ -29,6 +29,7 @@ PATH_TO_DOC = "docs/source"
# Update this list for models that are not tested with a comment explaining the reason it should not be.
# Being in this list is an exception and should **not** be the rule.
IGNORE_NON_TESTED
=
[
# models to ignore for not tested
"BartDecoder"
,
# Building part of bigger (tested) model.
"BartEncoder"
,
# Building part of bigger (tested) model.
"BertLMHeadModel"
,
# Needs to be setup as decoder.
...
...
@@ -62,6 +63,7 @@ TEST_FILES_WITH_NO_COMMON_TESTS = [
# Update this list for models that are not in any of the auto MODEL_XXX_MAPPING. Being in this list is an exception and
# should **not** be the rule.
IGNORE_NON_AUTO_CONFIGURED
=
[
# models to ignore for model xxx mapping
"BartDecoder"
,
"BartEncoder"
,
"DPRContextEncoder"
,
...
...
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