Skip to content

Commit 27903de

Browse files
Very small change to one of the function parameters (#32548)
Very small change to one of the parameters np.random.randint second parameter is not included in the possible options. Therefore, we want the upper range to be 2, so that we have some 1 labels in our classification as well.
1 parent 6101d93 commit 27903de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: docs/source/en/model_memory_anatomy.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ In total, we get 512 sequences each with length 512 and store them in a [`~datas
4242
>>> seq_len, dataset_size = 512, 512
4343
>>> dummy_data = {
4444
... "input_ids": np.random.randint(100, 30000, (dataset_size, seq_len)),
45-
... "labels": np.random.randint(0, 1, (dataset_size)),
45+
... "labels": np.random.randint(0, 2, (dataset_size)),
4646
... }
4747
>>> ds = Dataset.from_dict(dummy_data)
4848
>>> ds.set_format("pt")

0 commit comments

Comments
 (0)