"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "721ee783ca1b62bcbe85c96bfa5af5ef4a414de5"
Unverified Commit bb8d4052 authored by Sylvain Gugger's avatar Sylvain Gugger Committed by GitHub
Browse files

Deprecate model templates (#17062)

* Deprecate model templates

* Address review comments
parent 9c5ae87f
name: Model templates runner name: Model templates runner
on: on:
push: repository_dispatch:
branches: schedule:
- main - cron: "0 2 * * *"
pull_request:
paths:
- "src/**"
- "tests/**"
- ".github/**"
- "templates/**"
types: [assigned, opened, synchronize, reopened]
jobs: jobs:
run_tests_templates: run_tests_templates:
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
import json import json
import os import os
import shutil import shutil
import warnings
from argparse import ArgumentParser, Namespace from argparse import ArgumentParser, Namespace
from pathlib import Path from pathlib import Path
from typing import List from typing import List
...@@ -54,6 +55,11 @@ class AddNewModelCommand(BaseTransformersCLICommand): ...@@ -54,6 +55,11 @@ class AddNewModelCommand(BaseTransformersCLICommand):
self._path = path self._path = path
def run(self): 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: if not _has_cookiecutter:
raise ImportError( raise ImportError(
"Model creation dependencies are required to use the `add_new_model` command. Install them by running " "Model creation dependencies are required to use the `add_new_model` command. Install them by running "
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment