Skip to content

Commit cefbacb

Browse files
Fix style with make precommit (#4265)
1 parent fae245a commit cefbacb

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

tests/conftest.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ def cleanup_gpu():
2323
"""
2424
Automatically cleanup GPU memory after each test.
2525
26-
This fixture helps prevent CUDA out of memory errors when running tests in parallel
27-
with pytest-xdist by ensuring models and tensors are properly garbage collected
28-
and GPU memory caches are cleared between tests.
26+
This fixture helps prevent CUDA out of memory errors when running tests in parallel with pytest-xdist by ensuring
27+
models and tensors are properly garbage collected and GPU memory caches are cleared between tests.
2928
"""
3029
yield
3130
# Cleanup after test

trl/extras/dataset_formatting.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ def conversations_formatting_function(
4444
tokenizer apply chat template to the dataset along with the schema of the list of functions in the tools list.
4545
4646
.. deprecated:: 0.24.0
47-
`conversations_formatting_function` is deprecated and will be removed in version 0.27.
48-
Please use `tokenizer.apply_chat_template()` directly instead.
47+
`conversations_formatting_function` is deprecated and will be removed in version 0.27. Please use
48+
`tokenizer.apply_chat_template()` directly instead.
4949
"""
5050
warnings.warn(
5151
"`conversations_formatting_function` is deprecated and will be removed in TRL 0.27. "
@@ -74,8 +74,8 @@ def instructions_formatting_function(tokenizer: AutoTokenizer):
7474
tokenizer apply chat template to the dataset
7575
7676
.. deprecated:: 0.24.0
77-
`instructions_formatting_function` is deprecated and will be removed in version 0.27.
78-
Please use `tokenizer.apply_chat_template()` directly instead.
77+
`instructions_formatting_function` is deprecated and will be removed in version 0.27. Please use
78+
`tokenizer.apply_chat_template()` directly instead.
7979
"""
8080
warnings.warn(
8181
"`instructions_formatting_function` is deprecated and will be removed in TRL 0.27. "
@@ -122,8 +122,8 @@ def get_formatting_func_from_dataset(
122122
Callable: Formatting function if the dataset format is supported else None
123123
124124
.. deprecated:: 0.24.0
125-
`get_formatting_func_from_dataset` is deprecated and will be removed in version 0.27.
126-
Please use `tokenizer.apply_chat_template()` directly instead.
125+
`get_formatting_func_from_dataset` is deprecated and will be removed in version 0.27. Please use
126+
`tokenizer.apply_chat_template()` directly instead.
127127
"""
128128
warnings.warn(
129129
"`get_formatting_func_from_dataset` is deprecated and will be removed in TRL 0.27. "

0 commit comments

Comments
 (0)