Skip to content

Commit

Permalink
Very small change to one of the function parameters (#32548)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alisalamatian1 committed Aug 27, 2024
1 parent 6101d93 commit 27903de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/source/en/model_memory_anatomy.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ In total, we get 512 sequences each with length 512 and store them in a [`~datas
>>> seq_len, dataset_size = 512, 512
>>> dummy_data = {
... "input_ids": np.random.randint(100, 30000, (dataset_size, seq_len)),
... "labels": np.random.randint(0, 1, (dataset_size)),
... "labels": np.random.randint(0, 2, (dataset_size)),
... }
>>> ds = Dataset.from_dict(dummy_data)
>>> ds.set_format("pt")
Expand Down

0 comments on commit 27903de

Please sign in to comment.