Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ def cleanup_gpu():
"""
Automatically cleanup GPU memory after each test.

This fixture helps prevent CUDA out of memory errors when running tests in parallel
with pytest-xdist by ensuring models and tensors are properly garbage collected
and GPU memory caches are cleared between tests.
This fixture helps prevent CUDA out of memory errors when running tests in parallel with pytest-xdist by ensuring
models and tensors are properly garbage collected and GPU memory caches are cleared between tests.
"""
yield
# Cleanup after test
Expand Down
12 changes: 6 additions & 6 deletions trl/extras/dataset_formatting.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ def conversations_formatting_function(
tokenizer apply chat template to the dataset along with the schema of the list of functions in the tools list.

.. deprecated:: 0.24.0
`conversations_formatting_function` is deprecated and will be removed in version 0.27.
Please use `tokenizer.apply_chat_template()` directly instead.
`conversations_formatting_function` is deprecated and will be removed in version 0.27. Please use
`tokenizer.apply_chat_template()` directly instead.
"""
warnings.warn(
"`conversations_formatting_function` is deprecated and will be removed in TRL 0.27. "
Expand Down Expand Up @@ -74,8 +74,8 @@ def instructions_formatting_function(tokenizer: AutoTokenizer):
tokenizer apply chat template to the dataset

.. deprecated:: 0.24.0
`instructions_formatting_function` is deprecated and will be removed in version 0.27.
Please use `tokenizer.apply_chat_template()` directly instead.
`instructions_formatting_function` is deprecated and will be removed in version 0.27. Please use
`tokenizer.apply_chat_template()` directly instead.
"""
warnings.warn(
"`instructions_formatting_function` is deprecated and will be removed in TRL 0.27. "
Expand Down Expand Up @@ -122,8 +122,8 @@ def get_formatting_func_from_dataset(
Callable: Formatting function if the dataset format is supported else None

.. deprecated:: 0.24.0
`get_formatting_func_from_dataset` is deprecated and will be removed in version 0.27.
Please use `tokenizer.apply_chat_template()` directly instead.
`get_formatting_func_from_dataset` is deprecated and will be removed in version 0.27. Please use
`tokenizer.apply_chat_template()` directly instead.
"""
warnings.warn(
"`get_formatting_func_from_dataset` is deprecated and will be removed in TRL 0.27. "
Expand Down
Loading