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:
@@ -20,7 +20,7 @@ import re
|
||||
from contextlib import contextmanager
|
||||
from typing import Optional
|
||||
|
||||
from transformers.utils.import_utils import export
|
||||
from transformers.utils.import_utils import requires
|
||||
|
||||
from .utils import is_torch_available
|
||||
|
||||
@@ -225,7 +225,7 @@ def _attach_debugger_logic(model, class_name, debug_path: str):
|
||||
break # exit the loop after finding one (unsure, but should be just one call.)
|
||||
|
||||
|
||||
@export(backends=("torch",))
|
||||
@requires(backends=("torch",))
|
||||
def model_addition_debugger(cls):
|
||||
"""
|
||||
# Model addition debugger - a model adder tracer
|
||||
@@ -282,7 +282,7 @@ def model_addition_debugger(cls):
|
||||
return cls
|
||||
|
||||
|
||||
@export(backends=("torch",))
|
||||
@requires(backends=("torch",))
|
||||
@contextmanager
|
||||
def model_addition_debugger_context(model, debug_path: Optional[str] = None):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user