From 1585c783e6a6ee06a4d7d27e0c35a69c86b4c9da Mon Sep 17 00:00:00 2001 From: Ali Salamatian <81648012+alisalamatian1@users.noreply.github.com> Date: Tue, 27 Aug 2024 09:29:05 -0700 Subject: [PATCH] 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. --- docs/source/en/model_memory_anatomy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/en/model_memory_anatomy.md b/docs/source/en/model_memory_anatomy.md index 1fc7b495932a..c1d9d4c54bc7 100644 --- a/docs/source/en/model_memory_anatomy.md +++ b/docs/source/en/model_memory_anatomy.md @@ -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")