transformers
e55e08b6 - Add processor test: __call__ must not mutate the input text list

Commit
159 days ago
Add processor test: __call__ must not mutate the input text list `get_text_with_replacements` expands placeholder tokens in place, so processors must run it on a copy (the default `__call__` does via `prepare_inputs_layout`). Add a ProcessorTesterMixin test that snapshots the input `text` list and asserts it is unchanged after a call, guarding against custom `__call__`s that forward the user's list directly. Skipped for ColQwen2/ColModernVBert (text XOR images).
Author
Parents
Loading