File size: 6,186 Bytes
4521650 bb59f53 4521650 bb59f53 4521650 bb59f53 4521650 bb59f53 4521650 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# π€ Experiments over hf dataset"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import datasets\n",
"from datasets import load_dataset"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Using custom data configuration default\n",
"Reusing dataset ctkfacts_nli (/Users/bertik/.cache/huggingface/datasets/ctkfacts_nli/default/0.0.0/5dcd805dfbd9694ead18f5cf4da8d902a1a1ca53685a5ebabd33f3d314dd597d)\n",
"100%|ββββββββββ| 3/3 [00:00<00:00, 409.28it/s]\n"
]
}
],
"source": [
"d=load_dataset(\"../ctkfacts_nli.py\")"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"DatasetDict({\n",
" train: Dataset({\n",
" features: ['id', 'label', 'evidence', 'claim'],\n",
" num_rows: 2903\n",
" })\n",
" validation: Dataset({\n",
" features: ['id', 'label', 'evidence', 'claim'],\n",
" num_rows: 377\n",
" })\n",
" test: Dataset({\n",
" features: ['id', 'label', 'evidence', 'claim'],\n",
" num_rows: 431\n",
" })\n",
"})"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"d"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" _| _| _| _| _|_|_| _|_|_| _|_|_| _| _| _|_|_| _|_|_|_| _|_| _|_|_| _|_|_|_|\n",
" _| _| _| _| _| _| _| _|_| _| _| _| _| _| _| _|\n",
" _|_|_|_| _| _| _| _|_| _| _|_| _| _| _| _| _| _|_| _|_|_| _|_|_|_| _| _|_|_|\n",
" _| _| _| _| _| _| _| _| _| _| _|_| _| _| _| _| _| _| _|\n",
" _| _| _|_| _|_|_| _|_|_| _|_|_| _| _| _|_|_| _| _| _| _|_|_| _|_|_|_|\n",
"\n",
" \n",
"Username: ^C\n",
"Traceback (most recent call last):\n",
" File \"/opt/homebrew/bin/huggingface-cli\", line 8, in <module>\n",
" sys.exit(main())\n",
" File \"/opt/homebrew/lib/python3.9/site-packages/huggingface_hub/commands/huggingface_cli.py\", line 41, in main\n",
" service.run()\n",
" File \"/opt/homebrew/lib/python3.9/site-packages/huggingface_hub/commands/user.py\", line 169, in run\n",
" username = input(\"Username: \")\n",
"KeyboardInterrupt\n"
]
}
],
"source": [
"!huggingface-cli login"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Downloading: 100%|ββββββββββ| 2.55k/2.55k [00:00<00:00, 1.33MB/s]\n",
"Using custom data configuration default\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Downloading and preparing dataset ctkfacts_nli/default to /Users/bertik/.cache/huggingface/datasets/heruberuto___ctkfacts_nli/default/0.0.0/5dcd805dfbd9694ead18f5cf4da8d902a1a1ca53685a5ebabd33f3d314dd597d...\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Downloading: 100%|ββββββββββ| 2.14M/2.14M [00:00<00:00, 2.86MB/s]\n",
"Downloading: 100%|ββββββββββ| 247k/247k [00:00<00:00, 386kB/s]\n",
"Downloading: 100%|ββββββββββ| 287k/287k [00:00<00:00, 450kB/s]\n",
"100%|ββββββββββ| 3/3 [00:04<00:00, 1.66s/it]\n",
"100%|ββββββββββ| 3/3 [00:00<00:00, 976.56it/s]\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Dataset ctkfacts_nli downloaded and prepared to /Users/bertik/.cache/huggingface/datasets/heruberuto___ctkfacts_nli/default/0.0.0/5dcd805dfbd9694ead18f5cf4da8d902a1a1ca53685a5ebabd33f3d314dd597d. Subsequent calls will reuse this data.\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|ββββββββββ| 3/3 [00:00<00:00, 811.96it/s]\n"
]
},
{
"data": {
"text/plain": [
"DatasetDict({\n",
" train: Dataset({\n",
" features: ['id', 'label', 'evidence', 'claim'],\n",
" num_rows: 2903\n",
" })\n",
" validation: Dataset({\n",
" features: ['id', 'label', 'evidence', 'claim'],\n",
" num_rows: 377\n",
" })\n",
" test: Dataset({\n",
" features: ['id', 'label', 'evidence', 'claim'],\n",
" num_rows: 431\n",
" })\n",
"})"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"load_dataset(\"heruberuto/ctkfacts_nli\", use_auth_token=True)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"interpreter": {
"hash": "b0fa6594d8f4cbf19f97940f81e996739fb7646882a419484c72d19e05852a7e"
},
"kernelspec": {
"display_name": "Python 3.9.7 64-bit",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
},
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
}
|