{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "764e1702", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/home/ubuntu/miniconda3/envs/finetune/lib/python3.11/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", " from .autonotebook import tqdm as notebook_tqdm\n" ] } ], "source": [ "from datasets import load_from_disk" ] }, { "cell_type": "code", "execution_count": 2, "id": "78f72b2c", "metadata": {}, "outputs": [], "source": [ "dataset_original = load_from_disk(\"/home/ubuntu/Clean-HF-Dataset-7/train\")\n", "# dataset_clean = load_from_disk(\"/home/ubuntu/Clean-HF-Dataset-3/test\")" ] }, { "cell_type": "code", "execution_count": 3, "id": "76385d6a", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Dataset({\n", " features: ['input_features', 'labels'],\n", " num_rows: 152931\n", "})" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dataset_original" ] }, { "cell_type": "code", "execution_count": 2, "id": "44af4b9c", "metadata": {}, "outputs": [], "source": [ "dataset_clean = load_from_disk(\"/home/ubuntu/Clean-HF-Dataset-4/test\")" ] }, { "cell_type": "code", "execution_count": 3, "id": "093b5831", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Dataset({\n", " features: ['input_features', 'labels'],\n", " num_rows: 38242\n", "})" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dataset_clean" ] }, { "cell_type": "code", "execution_count": 5, "id": "0f206403", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[50258,\n", " 50364,\n", " 14407,\n", " 3555,\n", " 14851,\n", " 3224,\n", " 11296,\n", " 12399,\n", " 3714,\n", " 7435,\n", " 2407,\n", " 11622,\n", " 11296,\n", " 4032,\n", " 10874,\n", " 7649,\n", " 8592,\n", " 32151,\n", " 7649,\n", " 11296,\n", " 4135,\n", " 19753,\n", " 1863,\n", " 32771,\n", " 4135,\n", " 2288,\n", " 12174,\n", " 16758,\n", " 1211,\n", " 10874,\n", " 26890,\n", " 7649,\n", " 7565,\n", " 3224,\n", " 25429,\n", " 3615,\n", " 1863,\n", " 4135,\n", " 13412,\n", " 15042,\n", " 8717,\n", " 2304,\n", " 4135,\n", " 33427,\n", " 7649,\n", " 4135,\n", " 3215,\n", " 8717,\n", " 19913,\n", " 2288,\n", " 16490,\n", " 23328,\n", " 12602,\n", " 995,\n", " 6055,\n", " 17082,\n", " 4135,\n", " 4135,\n", " 2288,\n", " 11778,\n", " 3224,\n", " 4135,\n", " 3215,\n", " 50257]" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dataset_clean[0][\"labels\"]" ] }, { "cell_type": "code", "execution_count": 3, "id": "ff8d9d11", "metadata": {}, "outputs": [], "source": [ "dataset_clean = load_from_disk(\"/home/ubuntu/Clean-HF-Dataset-3/train\")\n", "dataset_original = load_from_disk(\"/home/ubuntu/Complete-HF-Dataset-3/train\")" ] }, { "cell_type": "code", "execution_count": 4, "id": "6d8ae3a3", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Dataset({\n", " features: ['input_features', 'labels'],\n", " num_rows: 135981\n", "})" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dataset_clean" ] }, { "cell_type": "code", "execution_count": 5, "id": "1d11989c", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Dataset({\n", " features: ['input_features', 'labels'],\n", " num_rows: 136000\n", "})" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dataset_original" ] }, { "cell_type": "code", "execution_count": 5, "id": "637951bf", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[50258,\n", " 50364,\n", " 995,\n", " 2407,\n", " 11331,\n", " 44823,\n", " 5172,\n", " 16490,\n", " 23328,\n", " 12602,\n", " 995,\n", " 4724,\n", " 2288,\n", " 30767,\n", " 2304,\n", " 32151,\n", " 16472,\n", " 3215,\n", " 47283,\n", " 2655,\n", " 4032,\n", " 12602,\n", " 2407,\n", " 4135,\n", " 8608,\n", " 32151,\n", " 3224,\n", " 33599,\n", " 8717,\n", " 8592,\n", " 14851,\n", " 13,\n", " 50257]" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dataset_clean[0][\"labels\"]" ] }, { "cell_type": "code", "execution_count": 6, "id": "18326fa2", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[50258,\n", " 50364,\n", " 995,\n", " 2407,\n", " 11331,\n", " 44823,\n", " 5172,\n", " 16490,\n", " 23328,\n", " 12602,\n", " 995,\n", " 4724,\n", " 2288,\n", " 30767,\n", " 2304,\n", " 32151,\n", " 16472,\n", " 3215,\n", " 47283,\n", " 2655,\n", " 4032,\n", " 12602,\n", " 2407,\n", " 4135,\n", " 8608,\n", " 32151,\n", " 3224,\n", " 33599,\n", " 8717,\n", " 8592,\n", " 14851,\n", " 13,\n", " 50257]" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dataset_original[120000][\"labels\"]" ] } ], "metadata": { "kernelspec": { "display_name": "finetune", "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.11.14" } }, "nbformat": 4, "nbformat_minor": 5 }