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
bb8d4052
Unverified
Commit
bb8d4052
authored
May 04, 2022
by
Sylvain Gugger
Committed by
GitHub
May 04, 2022
Browse files
Deprecate model templates (#17062)
* Deprecate model templates * Address review comments
parent
9c5ae87f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
10 deletions
+9
-10
.github/workflows/model-templates.yml
.github/workflows/model-templates.yml
+3
-10
src/transformers/commands/add_new_model.py
src/transformers/commands/add_new_model.py
+6
-0
No files found.
.github/workflows/model-templates.yml
View file @
bb8d4052
name
:
Model templates runner
on
:
push
:
branches
:
-
main
pull_request
:
paths
:
-
"
src/**"
-
"
tests/**"
-
"
.github/**"
-
"
templates/**"
types
:
[
assigned
,
opened
,
synchronize
,
reopened
]
repository_dispatch
:
schedule
:
-
cron
:
"
0
2
*
*
*"
jobs
:
run_tests_templates
:
...
...
src/transformers/commands/add_new_model.py
View file @
bb8d4052
...
...
@@ -15,6 +15,7 @@
import
json
import
os
import
shutil
import
warnings
from
argparse
import
ArgumentParser
,
Namespace
from
pathlib
import
Path
from
typing
import
List
...
...
@@ -54,6 +55,11 @@ class AddNewModelCommand(BaseTransformersCLICommand):
self
.
_path
=
path
def
run
(
self
):
warnings
.
warn
(
"The command `transformers-cli add-new-model` is deprecated and will be removed in v5 of Transformers. "
"It is not actively maintained anymore, so might give a result that won't pass all tests and quality "
"checks, you should use `transformers-cli add-new-model-like` instead."
)
if
not
_has_cookiecutter
:
raise
ImportError
(
"Model creation dependencies are required to use the `add_new_model` command. Install them by running "
...
...
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