Generate: visit non-llm prepare_inputs_for_generation (#34199)

* tmp

* all visited

* test all

* Update src/transformers/models/moshi/modeling_moshi.py

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>

* delete another one :D

---------

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
This commit is contained in:
Joao Gante
2024-10-17 16:53:48 +01:00
committed by GitHub
parent 1d2c29f0b3
commit f51ac9e059
64 changed files with 140 additions and 1134 deletions

View File

@@ -672,9 +672,13 @@ def is_copy_consistent(filename: str, overwrite: bool = False, buffer: dict = No
indent, object_name, replace_pattern = search.groups()
# Find the file lines, the object's code, and its blocks
target_lines, theoretical_code, theoretical_code_splits = find_code_and_splits(
object_name, base_path, buffer=buffer
)
try:
target_lines, theoretical_code, theoretical_code_splits = find_code_and_splits(
object_name, base_path, buffer=buffer
)
except Exception as exc:
exc.args = (f"Error while trying to find source code for {filename}.\n\n" + str(exc),)
raise
# code replaced by the patterns
theoretical_code_blocks = OrderedDict()