Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
799cea64
Unverified
Commit
799cea64
authored
Dec 09, 2022
by
Sylvain Gugger
Committed by
GitHub
Dec 09, 2022
Browse files
Fix rendering issue in quicktour (#20708)
* Fix rendering issue in quicktour * Separate in two blocks
parent
74330083
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
docs/source/en/quicktour.mdx
docs/source/en/quicktour.mdx
+4
-1
No files found.
docs/source/en/quicktour.mdx
View file @
799cea64
...
...
@@ -440,13 +440,16 @@ Depending on your task, you'll typically pass the following parameters to [`Trai
>>> dataset = load_dataset("rotten_tomatoes") # doctest: +IGNORE_RESULT
```
5. Create a function to tokenize the dataset
, and apply it over the entire dataset with [`~datasets.Dataset.map`]
:
5. Create a function to tokenize the dataset:
```py
>>> def tokenize_dataset(dataset):
... return tokenizer(dataset["text"])
```
Then apply it over the entire dataset with [`~datasets.Dataset.map`]:
```py
>>> dataset = dataset.map(tokenize_dataset, batched=True)
```
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment