Skip to content

Commit 88fa043

Browse files
authored
Fix docstring example (#5592)
🖍 fix docstring example
1 parent 09e820e commit 88fa043

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/datasets/arrow_dataset.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2398,10 +2398,10 @@ def set_format(
23982398
>>> ds = ds.map(lambda x: tokenizer(x['text'], truncation=True, padding=True), batched=True)
23992399
>>> ds.set_format(type='numpy', columns=['text', 'label'])
24002400
>>> ds.format
2401-
{'columns': ['input_ids', 'token_type_ids', 'attention_mask', 'label'],
2402-
'format_kwargs': {},
2403-
'output_all_columns': False,
2404-
'type': 'numpy'}
2401+
{'type': 'numpy',
2402+
'format_kwargs': {},
2403+
'columns': ['text', 'label'],
2404+
'output_all_columns': False}
24052405
```
24062406
"""
24072407
format_kwargs.update(format_kwargs.pop("format_kwargs", {})) # allow to use self.set_format(self.format)

0 commit comments

Comments
 (0)