Initial explore notebook
Browse files- .gitignore +1 -0
- README.md +5 -0
- explore.ipynb +316 -0
.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
temp/
|
README.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
---
|
| 4 |
+
|
| 5 |
+
# Contextual Semantic Labels (Large) Benchmark Dataset
|
| 6 |
+
|
| 7 |
+
Please see https://github.com/docugami/DFM-benchmarks for more details, eval code, and current scores for different models.
|
| 8 |
+
|
explore.ipynb
ADDED
|
@@ -0,0 +1,316 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cells": [
|
| 3 |
+
{
|
| 4 |
+
"attachments": {},
|
| 5 |
+
"cell_type": "markdown",
|
| 6 |
+
"metadata": {},
|
| 7 |
+
"source": [
|
| 8 |
+
"# Explore Dataset: docugami/dfm-csl-large-benchmark\n",
|
| 9 |
+
"\n",
|
| 10 |
+
"See [README](./README.md) for more information"
|
| 11 |
+
]
|
| 12 |
+
},
|
| 13 |
+
{
|
| 14 |
+
"cell_type": "code",
|
| 15 |
+
"execution_count": 8,
|
| 16 |
+
"metadata": {},
|
| 17 |
+
"outputs": [],
|
| 18 |
+
"source": [
|
| 19 |
+
"DATASET_NAME=\"Docugami/dfm-csl-large-benchmark\""
|
| 20 |
+
]
|
| 21 |
+
},
|
| 22 |
+
{
|
| 23 |
+
"cell_type": "code",
|
| 24 |
+
"execution_count": 7,
|
| 25 |
+
"metadata": {},
|
| 26 |
+
"outputs": [
|
| 27 |
+
{
|
| 28 |
+
"name": "stdout",
|
| 29 |
+
"output_type": "stream",
|
| 30 |
+
"text": [
|
| 31 |
+
"Requirement already satisfied: datasets in /usr/local/lib/python3.9/dist-packages (2.12.0)\n",
|
| 32 |
+
"Requirement already satisfied: huggingface_hub in /usr/local/lib/python3.9/dist-packages (0.14.1)\n",
|
| 33 |
+
"Requirement already satisfied: ipywidgets in /usr/local/lib/python3.9/dist-packages (8.0.6)\n",
|
| 34 |
+
"Requirement already satisfied: pyarrow>=8.0.0 in /usr/local/lib/python3.9/dist-packages (from datasets) (12.0.0)\n",
|
| 35 |
+
"Requirement already satisfied: xxhash in /usr/local/lib/python3.9/dist-packages (from datasets) (3.2.0)\n",
|
| 36 |
+
"Requirement already satisfied: packaging in /root/.local/lib/python3.9/site-packages (from datasets) (23.1)\n",
|
| 37 |
+
"Requirement already satisfied: dill<0.3.7,>=0.3.0 in /usr/local/lib/python3.9/dist-packages (from datasets) (0.3.6)\n",
|
| 38 |
+
"Requirement already satisfied: tqdm>=4.62.1 in /usr/local/lib/python3.9/dist-packages (from datasets) (4.65.0)\n",
|
| 39 |
+
"Requirement already satisfied: aiohttp in /usr/local/lib/python3.9/dist-packages (from datasets) (3.8.4)\n",
|
| 40 |
+
"Requirement already satisfied: fsspec[http]>=2021.11.1 in /usr/local/lib/python3.9/dist-packages (from datasets) (2023.5.0)\n",
|
| 41 |
+
"Requirement already satisfied: responses<0.19 in /usr/local/lib/python3.9/dist-packages (from datasets) (0.18.0)\n",
|
| 42 |
+
"Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.9/dist-packages (from datasets) (6.0)\n",
|
| 43 |
+
"Requirement already satisfied: requests>=2.19.0 in /usr/local/lib/python3.9/dist-packages (from datasets) (2.31.0)\n",
|
| 44 |
+
"Requirement already satisfied: multiprocess in /usr/local/lib/python3.9/dist-packages (from datasets) (0.70.14)\n",
|
| 45 |
+
"Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.9/dist-packages (from datasets) (1.24.3)\n",
|
| 46 |
+
"Requirement already satisfied: pandas in /usr/local/lib/python3.9/dist-packages (from datasets) (2.0.1)\n",
|
| 47 |
+
"Requirement already satisfied: filelock in /usr/local/lib/python3.9/dist-packages (from huggingface_hub) (3.12.0)\n",
|
| 48 |
+
"Requirement already satisfied: typing-extensions>=3.7.4.3 in /root/.local/lib/python3.9/site-packages (from huggingface_hub) (4.6.2)\n",
|
| 49 |
+
"Requirement already satisfied: ipykernel>=4.5.1 in /root/.local/lib/python3.9/site-packages (from ipywidgets) (6.23.1)\n",
|
| 50 |
+
"Requirement already satisfied: widgetsnbextension~=4.0.7 in /usr/local/lib/python3.9/dist-packages (from ipywidgets) (4.0.7)\n",
|
| 51 |
+
"Requirement already satisfied: traitlets>=4.3.1 in /root/.local/lib/python3.9/site-packages (from ipywidgets) (5.9.0)\n",
|
| 52 |
+
"Requirement already satisfied: jupyterlab-widgets~=3.0.7 in /usr/local/lib/python3.9/dist-packages (from ipywidgets) (3.0.7)\n",
|
| 53 |
+
"Requirement already satisfied: ipython>=6.1.0 in /root/.local/lib/python3.9/site-packages (from ipywidgets) (8.13.2)\n",
|
| 54 |
+
"Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.9/dist-packages (from aiohttp->datasets) (1.3.3)\n",
|
| 55 |
+
"Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.9/dist-packages (from aiohttp->datasets) (23.1.0)\n",
|
| 56 |
+
"Requirement already satisfied: charset-normalizer<4.0,>=2.0 in /usr/local/lib/python3.9/dist-packages (from aiohttp->datasets) (3.1.0)\n",
|
| 57 |
+
"Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.9/dist-packages (from aiohttp->datasets) (1.9.2)\n",
|
| 58 |
+
"Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.9/dist-packages (from aiohttp->datasets) (1.3.1)\n",
|
| 59 |
+
"Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.9/dist-packages (from aiohttp->datasets) (4.0.2)\n",
|
| 60 |
+
"Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.9/dist-packages (from aiohttp->datasets) (6.0.4)\n",
|
| 61 |
+
"Requirement already satisfied: psutil in /root/.local/lib/python3.9/site-packages (from ipykernel>=4.5.1->ipywidgets) (5.9.5)\n",
|
| 62 |
+
"Requirement already satisfied: jupyter-core!=5.0.*,>=4.12 in /root/.local/lib/python3.9/site-packages (from ipykernel>=4.5.1->ipywidgets) (5.3.0)\n",
|
| 63 |
+
"Requirement already satisfied: jupyter-client>=6.1.12 in /root/.local/lib/python3.9/site-packages (from ipykernel>=4.5.1->ipywidgets) (8.2.0)\n",
|
| 64 |
+
"Requirement already satisfied: matplotlib-inline>=0.1 in /root/.local/lib/python3.9/site-packages (from ipykernel>=4.5.1->ipywidgets) (0.1.6)\n",
|
| 65 |
+
"Requirement already satisfied: tornado>=6.1 in /root/.local/lib/python3.9/site-packages (from ipykernel>=4.5.1->ipywidgets) (6.3.2)\n",
|
| 66 |
+
"Requirement already satisfied: comm>=0.1.1 in /root/.local/lib/python3.9/site-packages (from ipykernel>=4.5.1->ipywidgets) (0.1.3)\n",
|
| 67 |
+
"Requirement already satisfied: nest-asyncio in /root/.local/lib/python3.9/site-packages (from ipykernel>=4.5.1->ipywidgets) (1.5.6)\n",
|
| 68 |
+
"Requirement already satisfied: debugpy>=1.6.5 in /root/.local/lib/python3.9/site-packages (from ipykernel>=4.5.1->ipywidgets) (1.6.7)\n",
|
| 69 |
+
"Requirement already satisfied: pyzmq>=20 in /root/.local/lib/python3.9/site-packages (from ipykernel>=4.5.1->ipywidgets) (25.1.0)\n",
|
| 70 |
+
"Requirement already satisfied: stack-data in /root/.local/lib/python3.9/site-packages (from ipython>=6.1.0->ipywidgets) (0.6.2)\n",
|
| 71 |
+
"Requirement already satisfied: backcall in /root/.local/lib/python3.9/site-packages (from ipython>=6.1.0->ipywidgets) (0.2.0)\n",
|
| 72 |
+
"Requirement already satisfied: prompt-toolkit!=3.0.37,<3.1.0,>=3.0.30 in /root/.local/lib/python3.9/site-packages (from ipython>=6.1.0->ipywidgets) (3.0.38)\n",
|
| 73 |
+
"Requirement already satisfied: pickleshare in /root/.local/lib/python3.9/site-packages (from ipython>=6.1.0->ipywidgets) (0.7.5)\n",
|
| 74 |
+
"Requirement already satisfied: pexpect>4.3 in /root/.local/lib/python3.9/site-packages (from ipython>=6.1.0->ipywidgets) (4.8.0)\n",
|
| 75 |
+
"Requirement already satisfied: jedi>=0.16 in /root/.local/lib/python3.9/site-packages (from ipython>=6.1.0->ipywidgets) (0.18.2)\n",
|
| 76 |
+
"Requirement already satisfied: pygments>=2.4.0 in /root/.local/lib/python3.9/site-packages (from ipython>=6.1.0->ipywidgets) (2.15.1)\n",
|
| 77 |
+
"Requirement already satisfied: decorator in /root/.local/lib/python3.9/site-packages (from ipython>=6.1.0->ipywidgets) (5.1.1)\n",
|
| 78 |
+
"Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.9/dist-packages (from requests>=2.19.0->datasets) (2.0.2)\n",
|
| 79 |
+
"Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.9/dist-packages (from requests>=2.19.0->datasets) (3.4)\n",
|
| 80 |
+
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.9/dist-packages (from requests>=2.19.0->datasets) (2023.5.7)\n",
|
| 81 |
+
"Requirement already satisfied: tzdata>=2022.1 in /usr/local/lib/python3.9/dist-packages (from pandas->datasets) (2023.3)\n",
|
| 82 |
+
"Requirement already satisfied: python-dateutil>=2.8.2 in /root/.local/lib/python3.9/site-packages (from pandas->datasets) (2.8.2)\n",
|
| 83 |
+
"Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.9/dist-packages (from pandas->datasets) (2023.3)\n",
|
| 84 |
+
"Requirement already satisfied: parso<0.9.0,>=0.8.0 in /root/.local/lib/python3.9/site-packages (from jedi>=0.16->ipython>=6.1.0->ipywidgets) (0.8.3)\n",
|
| 85 |
+
"Requirement already satisfied: importlib-metadata>=4.8.3 in /root/.local/lib/python3.9/site-packages (from jupyter-client>=6.1.12->ipykernel>=4.5.1->ipywidgets) (6.6.0)\n",
|
| 86 |
+
"Requirement already satisfied: platformdirs>=2.5 in /root/.local/lib/python3.9/site-packages (from jupyter-core!=5.0.*,>=4.12->ipykernel>=4.5.1->ipywidgets) (3.5.1)\n",
|
| 87 |
+
"Requirement already satisfied: ptyprocess>=0.5 in /root/.local/lib/python3.9/site-packages (from pexpect>4.3->ipython>=6.1.0->ipywidgets) (0.7.0)\n",
|
| 88 |
+
"Requirement already satisfied: wcwidth in /root/.local/lib/python3.9/site-packages (from prompt-toolkit!=3.0.37,<3.1.0,>=3.0.30->ipython>=6.1.0->ipywidgets) (0.2.6)\n",
|
| 89 |
+
"Requirement already satisfied: six>=1.5 in /root/.local/lib/python3.9/site-packages (from python-dateutil>=2.8.2->pandas->datasets) (1.16.0)\n",
|
| 90 |
+
"Requirement already satisfied: pure-eval in /root/.local/lib/python3.9/site-packages (from stack-data->ipython>=6.1.0->ipywidgets) (0.2.2)\n",
|
| 91 |
+
"Requirement already satisfied: executing>=1.2.0 in /root/.local/lib/python3.9/site-packages (from stack-data->ipython>=6.1.0->ipywidgets) (1.2.0)\n",
|
| 92 |
+
"Requirement already satisfied: asttokens>=2.1.0 in /root/.local/lib/python3.9/site-packages (from stack-data->ipython>=6.1.0->ipywidgets) (2.2.1)\n",
|
| 93 |
+
"Requirement already satisfied: zipp>=0.5 in /root/.local/lib/python3.9/site-packages (from importlib-metadata>=4.8.3->jupyter-client>=6.1.12->ipykernel>=4.5.1->ipywidgets) (3.15.0)\n",
|
| 94 |
+
"\u001b[33mWARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv\u001b[0m\u001b[33m\n",
|
| 95 |
+
"\u001b[0m"
|
| 96 |
+
]
|
| 97 |
+
},
|
| 98 |
+
{
|
| 99 |
+
"data": {
|
| 100 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 101 |
+
"model_id": "c5591c50842d4a6f99800ce774776236",
|
| 102 |
+
"version_major": 2,
|
| 103 |
+
"version_minor": 0
|
| 104 |
+
},
|
| 105 |
+
"text/plain": [
|
| 106 |
+
"VBox(children=(HTML(value='<center> <img\\nsrc=https://huggingface.co/front/assets/huggingface_logo-noborder.sv…"
|
| 107 |
+
]
|
| 108 |
+
},
|
| 109 |
+
"metadata": {},
|
| 110 |
+
"output_type": "display_data"
|
| 111 |
+
}
|
| 112 |
+
],
|
| 113 |
+
"source": [
|
| 114 |
+
"# install dependencies and get a token\n",
|
| 115 |
+
"!pip install datasets huggingface_hub ipywidgets\n",
|
| 116 |
+
"\n",
|
| 117 |
+
"from huggingface_hub import notebook_login\n",
|
| 118 |
+
"notebook_login()\n"
|
| 119 |
+
]
|
| 120 |
+
},
|
| 121 |
+
{
|
| 122 |
+
"attachments": {},
|
| 123 |
+
"cell_type": "markdown",
|
| 124 |
+
"metadata": {},
|
| 125 |
+
"source": [
|
| 126 |
+
"# Update Dataset from Github\n",
|
| 127 |
+
"Note: this requires write access to the dataset."
|
| 128 |
+
]
|
| 129 |
+
},
|
| 130 |
+
{
|
| 131 |
+
"cell_type": "code",
|
| 132 |
+
"execution_count": 9,
|
| 133 |
+
"metadata": {},
|
| 134 |
+
"outputs": [
|
| 135 |
+
{
|
| 136 |
+
"name": "stdout",
|
| 137 |
+
"output_type": "stream",
|
| 138 |
+
"text": [
|
| 139 |
+
"--2023-05-29 19:03:22-- https://raw.githubusercontent.com/docugami/DFM-benchmarks/main/data/annotations/CSL-Large.csv\n",
|
| 140 |
+
"Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.111.133, 185.199.110.133, 185.199.108.133, ...\n",
|
| 141 |
+
"Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.111.133|:443... connected.\n",
|
| 142 |
+
"HTTP request sent, awaiting response... 200 OK\n",
|
| 143 |
+
"Length: 1130946 (1.1M) [text/plain]\n",
|
| 144 |
+
"Saving to: ‘./temp/CSL-Large.csv.1’\n",
|
| 145 |
+
"\n",
|
| 146 |
+
"CSL-Large.csv.1 100%[===================>] 1.08M 5.72MB/s in 0.2s \n",
|
| 147 |
+
"\n",
|
| 148 |
+
"2023-05-29 19:03:23 (5.72 MB/s) - ‘./temp/CSL-Large.csv.1’ saved [1130946/1130946]\n",
|
| 149 |
+
"\n"
|
| 150 |
+
]
|
| 151 |
+
}
|
| 152 |
+
],
|
| 153 |
+
"source": [
|
| 154 |
+
"# download latest CSV from github\n",
|
| 155 |
+
"!wget -P ./temp https://raw.githubusercontent.com/docugami/DFM-benchmarks/main/data/annotations/CSL-Large.csv"
|
| 156 |
+
]
|
| 157 |
+
},
|
| 158 |
+
{
|
| 159 |
+
"cell_type": "code",
|
| 160 |
+
"execution_count": 10,
|
| 161 |
+
"metadata": {},
|
| 162 |
+
"outputs": [
|
| 163 |
+
{
|
| 164 |
+
"name": "stdout",
|
| 165 |
+
"output_type": "stream",
|
| 166 |
+
"text": [
|
| 167 |
+
"Downloading and preparing dataset csv/default to /root/.cache/huggingface/datasets/csv/default-386db05c8f0598e0/0.0.0...\n"
|
| 168 |
+
]
|
| 169 |
+
},
|
| 170 |
+
{
|
| 171 |
+
"data": {
|
| 172 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 173 |
+
"model_id": "63298c1dcbd642468f3cc580bcc80297",
|
| 174 |
+
"version_major": 2,
|
| 175 |
+
"version_minor": 0
|
| 176 |
+
},
|
| 177 |
+
"text/plain": [
|
| 178 |
+
"Downloading data files: 0%| | 0/1 [00:00<?, ?it/s]"
|
| 179 |
+
]
|
| 180 |
+
},
|
| 181 |
+
"metadata": {},
|
| 182 |
+
"output_type": "display_data"
|
| 183 |
+
},
|
| 184 |
+
{
|
| 185 |
+
"data": {
|
| 186 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 187 |
+
"model_id": "4d2d9eec67e64fcba634c69f2453beaf",
|
| 188 |
+
"version_major": 2,
|
| 189 |
+
"version_minor": 0
|
| 190 |
+
},
|
| 191 |
+
"text/plain": [
|
| 192 |
+
"Extracting data files: 0%| | 0/1 [00:00<?, ?it/s]"
|
| 193 |
+
]
|
| 194 |
+
},
|
| 195 |
+
"metadata": {},
|
| 196 |
+
"output_type": "display_data"
|
| 197 |
+
},
|
| 198 |
+
{
|
| 199 |
+
"data": {
|
| 200 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 201 |
+
"model_id": "69c7b2b3090a488bad506b66496105c4",
|
| 202 |
+
"version_major": 2,
|
| 203 |
+
"version_minor": 0
|
| 204 |
+
},
|
| 205 |
+
"text/plain": [
|
| 206 |
+
"Generating train split: 0 examples [00:00, ? examples/s]"
|
| 207 |
+
]
|
| 208 |
+
},
|
| 209 |
+
"metadata": {},
|
| 210 |
+
"output_type": "display_data"
|
| 211 |
+
},
|
| 212 |
+
{
|
| 213 |
+
"name": "stdout",
|
| 214 |
+
"output_type": "stream",
|
| 215 |
+
"text": [
|
| 216 |
+
"Dataset csv downloaded and prepared to /root/.cache/huggingface/datasets/csv/default-386db05c8f0598e0/0.0.0. Subsequent calls will reuse this data.\n"
|
| 217 |
+
]
|
| 218 |
+
},
|
| 219 |
+
{
|
| 220 |
+
"data": {
|
| 221 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 222 |
+
"model_id": "0c719935d3824027b1caa3260bcbbf1e",
|
| 223 |
+
"version_major": 2,
|
| 224 |
+
"version_minor": 0
|
| 225 |
+
},
|
| 226 |
+
"text/plain": [
|
| 227 |
+
"Pushing dataset shards to the dataset hub: 0%| | 0/1 [00:00<?, ?it/s]"
|
| 228 |
+
]
|
| 229 |
+
},
|
| 230 |
+
"metadata": {},
|
| 231 |
+
"output_type": "display_data"
|
| 232 |
+
},
|
| 233 |
+
{
|
| 234 |
+
"data": {
|
| 235 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 236 |
+
"model_id": "fb17ac28c0044959bf19f24a8c33e2a0",
|
| 237 |
+
"version_major": 2,
|
| 238 |
+
"version_minor": 0
|
| 239 |
+
},
|
| 240 |
+
"text/plain": [
|
| 241 |
+
"Creating parquet from Arrow format: 0%| | 0/2 [00:00<?, ?ba/s]"
|
| 242 |
+
]
|
| 243 |
+
},
|
| 244 |
+
"metadata": {},
|
| 245 |
+
"output_type": "display_data"
|
| 246 |
+
},
|
| 247 |
+
{
|
| 248 |
+
"data": {
|
| 249 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 250 |
+
"model_id": "a0cc1556120a41dfaa6fa36c07cb67c2",
|
| 251 |
+
"version_major": 2,
|
| 252 |
+
"version_minor": 0
|
| 253 |
+
},
|
| 254 |
+
"text/plain": [
|
| 255 |
+
"Upload 1 LFS files: 0%| | 0/1 [00:00<?, ?it/s]"
|
| 256 |
+
]
|
| 257 |
+
},
|
| 258 |
+
"metadata": {},
|
| 259 |
+
"output_type": "display_data"
|
| 260 |
+
},
|
| 261 |
+
{
|
| 262 |
+
"data": {
|
| 263 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 264 |
+
"model_id": "d24bc578be9347eba62f452e489cb568",
|
| 265 |
+
"version_major": 2,
|
| 266 |
+
"version_minor": 0
|
| 267 |
+
},
|
| 268 |
+
"text/plain": [
|
| 269 |
+
"Downloading metadata: 0%| | 0.00/21.0 [00:00<?, ?B/s]"
|
| 270 |
+
]
|
| 271 |
+
},
|
| 272 |
+
"metadata": {},
|
| 273 |
+
"output_type": "display_data"
|
| 274 |
+
}
|
| 275 |
+
],
|
| 276 |
+
"source": [
|
| 277 |
+
"from datasets import Dataset\n",
|
| 278 |
+
"\n",
|
| 279 |
+
"# Load the data from the csv\n",
|
| 280 |
+
"dataset = Dataset.from_csv('./temp/CSL-Large.csv')\n",
|
| 281 |
+
"\n",
|
| 282 |
+
"# Push the dataset to the Hugging Face Hub\n",
|
| 283 |
+
"dataset.push_to_hub(DATASET_NAME, split=\"eval\")"
|
| 284 |
+
]
|
| 285 |
+
},
|
| 286 |
+
{
|
| 287 |
+
"cell_type": "code",
|
| 288 |
+
"execution_count": null,
|
| 289 |
+
"metadata": {},
|
| 290 |
+
"outputs": [],
|
| 291 |
+
"source": []
|
| 292 |
+
}
|
| 293 |
+
],
|
| 294 |
+
"metadata": {
|
| 295 |
+
"kernelspec": {
|
| 296 |
+
"display_name": "Python 3",
|
| 297 |
+
"language": "python",
|
| 298 |
+
"name": "python3"
|
| 299 |
+
},
|
| 300 |
+
"language_info": {
|
| 301 |
+
"codemirror_mode": {
|
| 302 |
+
"name": "ipython",
|
| 303 |
+
"version": 3
|
| 304 |
+
},
|
| 305 |
+
"file_extension": ".py",
|
| 306 |
+
"mimetype": "text/x-python",
|
| 307 |
+
"name": "python",
|
| 308 |
+
"nbconvert_exporter": "python",
|
| 309 |
+
"pygments_lexer": "ipython3",
|
| 310 |
+
"version": "3.9.16"
|
| 311 |
+
},
|
| 312 |
+
"orig_nbformat": 4
|
| 313 |
+
},
|
| 314 |
+
"nbformat": 4,
|
| 315 |
+
"nbformat_minor": 2
|
| 316 |
+
}
|