Simplify soft dependencies and update the dummy-creation process (#36827)
* Reverse dependency map shouldn't be created when test_all is set * [test_all] Remove dummies * Modular fixes * Update utils/check_repo.py Co-authored-by: Pablo Montalvo <39954772+molbap@users.noreply.github.com> * [test_all] Better docs * [test_all] Update src/transformers/commands/chat.py Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com> * [test_all] Remove deprecated AdaptiveEmbeddings from the tests * [test_all] Doc builder * [test_all] is_dummy * [test_all] Import utils * [test_all] Doc building should not require all deps --------- Co-authored-by: Pablo Montalvo <39954772+molbap@users.noreply.github.com> Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>
This commit is contained in:
@@ -14,10 +14,10 @@
|
||||
|
||||
# fmt: off
|
||||
|
||||
from transformers.utils.import_utils import export
|
||||
from transformers.utils.import_utils import requires
|
||||
|
||||
|
||||
@export(backends=("random_item_that_should_not_exist",))
|
||||
@requires(backends=("random_item_that_should_not_exist",))
|
||||
class A0:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
@@ -14,32 +14,32 @@
|
||||
|
||||
# fmt: off
|
||||
|
||||
from transformers.utils.import_utils import export
|
||||
from transformers.utils.import_utils import requires
|
||||
|
||||
|
||||
@export()
|
||||
@requires()
|
||||
class A0:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
|
||||
@export()
|
||||
@requires()
|
||||
def a0():
|
||||
pass
|
||||
|
||||
|
||||
@export(backends=("torch", "tf"))
|
||||
@requires(backends=("torch", "tf"))
|
||||
class A1:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
|
||||
@export(backends=("torch", "tf"))
|
||||
@requires(backends=("torch", "tf"))
|
||||
def a1():
|
||||
pass
|
||||
|
||||
|
||||
@export(
|
||||
@requires(
|
||||
backends=("torch", "tf")
|
||||
)
|
||||
class A2:
|
||||
@@ -47,14 +47,14 @@ class A2:
|
||||
pass
|
||||
|
||||
|
||||
@export(
|
||||
@requires(
|
||||
backends=("torch", "tf")
|
||||
)
|
||||
def a2():
|
||||
pass
|
||||
|
||||
|
||||
@export(
|
||||
@requires(
|
||||
backends=(
|
||||
"torch",
|
||||
"tf"
|
||||
@@ -65,7 +65,7 @@ class A3:
|
||||
pass
|
||||
|
||||
|
||||
@export(
|
||||
@requires(
|
||||
backends=(
|
||||
"torch",
|
||||
"tf"
|
||||
@@ -74,7 +74,7 @@ class A3:
|
||||
def a3():
|
||||
pass
|
||||
|
||||
@export(backends=())
|
||||
@requires(backends=())
|
||||
class A4:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
@@ -14,49 +14,49 @@
|
||||
|
||||
# fmt: off
|
||||
|
||||
from transformers.utils.import_utils import export
|
||||
from transformers.utils.import_utils import requires
|
||||
|
||||
|
||||
@export()
|
||||
@requires()
|
||||
# That's a statement
|
||||
class B0:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
|
||||
@export()
|
||||
@requires()
|
||||
# That's a statement
|
||||
def b0():
|
||||
pass
|
||||
|
||||
|
||||
@export(backends=("torch", "tf"))
|
||||
@requires(backends=("torch", "tf"))
|
||||
# That's a statement
|
||||
class B1:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
|
||||
@export(backends=("torch", "tf"))
|
||||
@requires(backends=("torch", "tf"))
|
||||
# That's a statement
|
||||
def b1():
|
||||
pass
|
||||
|
||||
|
||||
@export(backends=("torch", "tf"))
|
||||
@requires(backends=("torch", "tf"))
|
||||
# That's a statement
|
||||
class B2:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
|
||||
@export(backends=("torch", "tf"))
|
||||
@requires(backends=("torch", "tf"))
|
||||
# That's a statement
|
||||
def b2():
|
||||
pass
|
||||
|
||||
|
||||
@export(
|
||||
@requires(
|
||||
backends=(
|
||||
"torch",
|
||||
"tf"
|
||||
@@ -68,7 +68,7 @@ class B3:
|
||||
pass
|
||||
|
||||
|
||||
@export(
|
||||
@requires(
|
||||
backends=(
|
||||
"torch",
|
||||
"tf"
|
||||
|
||||
@@ -14,47 +14,47 @@
|
||||
|
||||
# fmt: off
|
||||
|
||||
from transformers.utils.import_utils import export
|
||||
from transformers.utils.import_utils import requires
|
||||
|
||||
|
||||
@export(backends=("torch", "torch"))
|
||||
@requires(backends=("torch", "torch"))
|
||||
class C0:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
|
||||
@export(backends=("torch", "torch"))
|
||||
@requires(backends=("torch", "torch"))
|
||||
def c0():
|
||||
pass
|
||||
|
||||
|
||||
@export(backends=("torch", "torch"))
|
||||
@requires(backends=("torch", "torch"))
|
||||
# That's a statement
|
||||
class C1:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
|
||||
@export(backends=("torch", "torch"))
|
||||
@requires(backends=("torch", "torch"))
|
||||
# That's a statement
|
||||
def c1():
|
||||
pass
|
||||
|
||||
|
||||
@export(backends=("torch", "torch"))
|
||||
@requires(backends=("torch", "torch"))
|
||||
# That's a statement
|
||||
class C2:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
|
||||
@export(backends=("torch", "torch"))
|
||||
@requires(backends=("torch", "torch"))
|
||||
# That's a statement
|
||||
def c2():
|
||||
pass
|
||||
|
||||
|
||||
@export(
|
||||
@requires(
|
||||
backends=(
|
||||
"torch",
|
||||
"torch"
|
||||
@@ -66,7 +66,7 @@ class C3:
|
||||
pass
|
||||
|
||||
|
||||
@export(
|
||||
@requires(
|
||||
backends=(
|
||||
"torch",
|
||||
"torch"
|
||||
|
||||
Reference in New Issue
Block a user