{ "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(\"csfever.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 \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 }