{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:58:21.040680Z",
     "start_time": "2024-05-16T13:58:19.777010Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:36.163942Z",
     "iopub.status.busy": "2024-09-03T01:03:36.163801Z",
     "iopub.status.idle": "2024-09-03T01:03:37.744395Z",
     "shell.execute_reply": "2024-09-03T01:03:37.743847Z",
     "shell.execute_reply.started": "2024-09-03T01:03:36.163923Z"
    }
   },
   "outputs": [],
   "source": [
    "import ast\n",
    "import os\n",
    "import shutil\n",
    "import sys\n",
    "from collections import defaultdict\n",
    "\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "from preference_data_preparation_4min_30b import *\n",
    "from preference_helper import *\n",
    "from sklearn.model_selection import train_test_split\n",
    "from suno_utils.utils.s3 import download_s3_files\n",
    "from suno_utils.utils.text import read_json, read_jsonl, write_json, write_jsonl\n",
    "from tqdm import tqdm\n",
    "\n",
    "pd.set_option(\"display.max_rows\", 500)\n",
    "pd.set_option(\"display.max_columns\", 500)\n",
    "pd.set_option(\"display.width\", 1000)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:58:21.082172Z",
     "start_time": "2024-05-16T13:58:21.041926Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:37.745231Z",
     "iopub.status.busy": "2024-09-03T01:03:37.745040Z",
     "iopub.status.idle": "2024-09-03T01:03:37.770345Z",
     "shell.execute_reply": "2024-09-03T01:03:37.769896Z",
     "shell.execute_reply.started": "2024-09-03T01:03:37.745215Z"
    }
   },
   "outputs": [],
   "source": [
    "OUT_DATA_DIR = \"/app/suno/data/dpo/30b_t3_v7_cycle\"\n",
    "os.makedirs(OUT_DATA_DIR, exist_ok=True)\n",
    "shutil.copyfile(\n",
    "    \"/app/suno/data/dpo/7v_v20_full/tokenizer_60k.json\",\n",
    "    os.path.join(OUT_DATA_DIR, \"tokenizer_60k.json\"),\n",
    ")\n",
    "NPZ_DIR = \"/app/suno/data/dpo/30b_cycle_npz\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:58:53.962528Z",
     "start_time": "2024-05-16T13:58:21.105919Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:37.771071Z",
     "iopub.status.busy": "2024-09-03T01:03:37.770927Z",
     "iopub.status.idle": "2024-09-03T01:03:39.280267Z",
     "shell.execute_reply": "2024-09-03T01:03:39.279683Z",
     "shell.execute_reply.started": "2024-09-03T01:03:37.771056Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Preference data shape (80478, 68)\n"
     ]
    }
   ],
   "source": [
    "df = pd.read_pickle(\n",
    "    \"/home/tony/Data/Preference/30b_v2/interesting_clips_v4_t_3_20240902_full_with_cer.pkl\"\n",
    ")  # , engine='python')\n",
    "# df = pd.read_csv(\n",
    "#     \"/home/tony/Data/Preference/30b_v0/interesting_clips_v4_t_1_20240808.csv\"\n",
    "# )  # , engine='python')\n",
    "print(\"Preference data shape\", df.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:39.281091Z",
     "iopub.status.busy": "2024-09-03T01:03:39.280939Z",
     "iopub.status.idle": "2024-09-03T01:03:39.370933Z",
     "shell.execute_reply": "2024-09-03T01:03:39.370367Z",
     "shell.execute_reply.started": "2024-09-03T01:03:39.281075Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(80478, 68)\n",
      "(80478, 64)\n"
     ]
    }
   ],
   "source": [
    "print(df.shape)\n",
    "df = df.dropna(axis=1, how=\"all\")\n",
    "print(df.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:58:56.199480Z",
     "start_time": "2024-05-16T13:58:53.963687Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:39.371801Z",
     "iopub.status.busy": "2024-09-03T01:03:39.371641Z",
     "iopub.status.idle": "2024-09-03T01:03:39.530245Z",
     "shell.execute_reply": "2024-09-03T01:03:39.529667Z",
     "shell.execute_reply.started": "2024-09-03T01:03:39.371786Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "39466\n",
      "39466\n",
      "pre-downloaded df (80478, 64)\n",
      "downloaded df (39466, 64)\n"
     ]
    }
   ],
   "source": [
    "converted_paths = os.listdir(NPZ_DIR)\n",
    "print(len(converted_paths))\n",
    "\n",
    "converted_paths = set([f.replace(\"_gen_cycle.npz\", \"\") for f in converted_paths])\n",
    "print(len(converted_paths))\n",
    "\n",
    "print(\"pre-downloaded df\", df.shape)\n",
    "df[df[\"s3_id\"].isin(converted_paths)].shape\n",
    "df = df[df[\"s3_id\"].isin(converted_paths)].copy()\n",
    "print(\"downloaded df\", df.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:58:56.467253Z",
     "start_time": "2024-05-16T13:58:56.207647Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:39.532726Z",
     "iopub.status.busy": "2024-09-03T01:03:39.532389Z",
     "iopub.status.idle": "2024-09-03T01:03:39.556760Z",
     "shell.execute_reply": "2024-09-03T01:03:39.556314Z",
     "shell.execute_reply.started": "2024-09-03T01:03:39.532709Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "is_30b\n",
      "True    39466\n",
      "Name: count, dtype: int64\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "task\n",
       "          34076\n",
       "extend     5390\n",
       "Name: count, dtype: int64"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[\"is_30b\"] = df[\"model_name\"].str.contains(\"-t\")\n",
    "print(df[\"is_30b\"].value_counts())\n",
    "df[\"task\"].value_counts()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# LET's do the data prep"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:58:56.592883Z",
     "start_time": "2024-05-16T13:58:56.470781Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:39.557654Z",
     "iopub.status.busy": "2024-09-03T01:03:39.557515Z",
     "iopub.status.idle": "2024-09-03T01:03:39.598355Z",
     "shell.execute_reply": "2024-09-03T01:03:39.597893Z",
     "shell.execute_reply.started": "2024-09-03T01:03:39.557640Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "preference  model_name           \n",
      "False       chirp-v3p5-engine-t-3    19733\n",
      "True        chirp-v3p5-engine-t-3    19733\n",
      "Name: count, dtype: int64\n",
      "(39466, 65)\n",
      "(39466, 65)\n"
     ]
    }
   ],
   "source": [
    "## for 13b this is easy for now\n",
    "print(df.groupby([\"preference\"])[\"model_name\"].value_counts())\n",
    "print(df.shape)\n",
    "df = df[df[\"model_name\"].isin([\"chirp-v3p5-engine-t-3\"])]\n",
    "print(df.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:58:56.909539Z",
     "start_time": "2024-05-16T13:58:56.595736Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:39.599088Z",
     "iopub.status.busy": "2024-09-03T01:03:39.598946Z",
     "iopub.status.idle": "2024-09-03T01:03:39.713430Z",
     "shell.execute_reply": "2024-09-03T01:03:39.712895Z",
     "shell.execute_reply.started": "2024-09-03T01:03:39.599074Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(39466, 65)\n",
      "(39466, 65)\n",
      "preference  model_name           \n",
      "False       chirp-v3p5-engine-t-3    19733\n",
      "True        chirp-v3p5-engine-t-3    19733\n",
      "Name: count, dtype: int64\n"
     ]
    }
   ],
   "source": [
    "print(df.shape)\n",
    "df = df[\n",
    "    df[\"request_id\"].isin(\n",
    "        df[\"request_id\"].value_counts().index[df[\"request_id\"].value_counts() == 2]\n",
    "    )\n",
    "]\n",
    "print(df.shape)\n",
    "print(df.groupby([\"preference\"])[\"model_name\"].value_counts())\n",
    "assert df.shape[0] == df[\"request_id\"].nunique() * 2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:39.714228Z",
     "iopub.status.busy": "2024-09-03T01:03:39.714078Z",
     "iopub.status.idle": "2024-09-03T01:03:49.480209Z",
     "shell.execute_reply": "2024-09-03T01:03:49.479628Z",
     "shell.execute_reply.started": "2024-09-03T01:03:39.714213Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "unique_requests 19733\n"
     ]
    }
   ],
   "source": [
    "# Let's use the old selection for now -- for quality assurance\n",
    "# expand the metadata columns -- this takes forever...~ 6 mins\n",
    "test_slice = df[\"metadata\"].apply(lambda x: ast.literal_eval(str(x)))\n",
    "test_slice_series = test_slice.apply(pd.Series)\n",
    "df = pd.concat([df, test_slice_series], axis=1, join=\"inner\")\n",
    "print(\"unique_requests\", df[\"request_id\"].nunique())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:49.481032Z",
     "iopub.status.busy": "2024-09-03T01:03:49.480886Z",
     "iopub.status.idle": "2024-09-03T01:03:49.573240Z",
     "shell.execute_reply": "2024-09-03T01:03:49.572657Z",
     "shell.execute_reply.started": "2024-09-03T01:03:49.481017Z"
    }
   },
   "outputs": [],
   "source": [
    "df = df.loc[:, ~df.columns.duplicated()].copy()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:49.574187Z",
     "iopub.status.busy": "2024-09-03T01:03:49.574027Z",
     "iopub.status.idle": "2024-09-03T01:03:49.579660Z",
     "shell.execute_reply": "2024-09-03T01:03:49.579221Z",
     "shell.execute_reply.started": "2024-09-03T01:03:49.574170Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "task\n",
       "          34076\n",
       "extend     5390\n",
       "Name: count, dtype: int64"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[\"task\"].value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:49.580475Z",
     "iopub.status.busy": "2024-09-03T01:03:49.580340Z",
     "iopub.status.idle": "2024-09-03T01:03:49.691646Z",
     "shell.execute_reply": "2024-09-03T01:03:49.691175Z",
     "shell.execute_reply.started": "2024-09-03T01:03:49.580461Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "pos_diff_preference\n",
       "1.0    13718\n",
       "2.0     6015\n",
       "Name: count, dtype: int64"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = df.sort_values(by=[\"request_id\", \"preference\", \"diff_preference\"])\n",
    "df[\"pos_diff_preference\"] = df[\"diff_preference\"].diff()\n",
    "df[\"cer_diff_preference\"] = df[\"cer\"].diff()\n",
    "df[df[\"preference\"]][\"pos_diff_preference\"].value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:49.692433Z",
     "iopub.status.busy": "2024-09-03T01:03:49.692291Z",
     "iopub.status.idle": "2024-09-03T01:03:49.708126Z",
     "shell.execute_reply": "2024-09-03T01:03:49.707623Z",
     "shell.execute_reply.started": "2024-09-03T01:03:49.692419Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "positive param_experiment\n",
      "max_cfg_12_ntag_3    4451\n",
      "max_cfg_12           1130\n",
      "cfg_12               1056\n",
      "n_repeat_tags_3       945\n",
      "Name: count, dtype: int64\n"
     ]
    }
   ],
   "source": [
    "try:\n",
    "    print(\"positive\", df[df[\"preference\"]][\"param_experiment\"].value_counts())\n",
    "except:\n",
    "    pass"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:49.708962Z",
     "iopub.status.busy": "2024-09-03T01:03:49.708823Z",
     "iopub.status.idle": "2024-09-03T01:03:49.898587Z",
     "shell.execute_reply": "2024-09-03T01:03:49.898106Z",
     "shell.execute_reply.started": "2024-09-03T01:03:49.708949Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-0.3284\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAjAAAAGdCAYAAAAMm0nCAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAArE0lEQVR4nO3df3RU5Z3H8c/MJFEgJMQklHLA6iZNQAJJAE9MHBbXLWRXtNuIFlassGWBavnRXwqyoEQxRApdoFVBQBSNm3UJ1LaAu+rxB56AUk8CDSAQUYRNXZLwIxl+5dfdP2imDIRkJpkk88y8X+fkHHLvMzfPlycz+cxznzvXZlmWJQAAAIPYu7sDAAAAviLAAAAA4xBgAACAcQgwAADAOAQYAABgHAIMAAAwDgEGAAAYhwADAACMQ4ABAADGIcAAAADjhHV3BzpbdXWt/HmzBJtNio3t7ffjBirqDV6hVKsUWvWGUq0S9Qab5vraEvQBxrLUKQPcWccNVNQbvEKpVim06g2lWiXqDTWcQgIAAMY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tPq9z9XxZnzLbb5dt9IPZDxLa+uyvTHcRoam3TWdeGa4cOXC0hqzpzr8Cm2q3++l+0sf/9kP/i///s//e3f/q0KCwuVnp7u3r506VLt3r1b//Vf/9WNvQMAAN2tfbfcBQAA6EYBGWBiYmLkcDhUXV3tsb26ulpxcXHd1CsAABAoAjLAREREaMiQIdq5c6d7W1NTk3bu3OlxSgkAAISmgFzEK0n/8i//orlz5yolJUXDhg3TK6+8ovPnz+vee+/t7q4BAIBuFrAB5q677tLJkye1atUqVVZWavDgwVq3bh2nkAAAQGBehQQAANCagFwDAwAA0BoCDAAAMA4BBgAAGIcAAwAAjEOAacELL7ygiRMnKjU1VSNHjvTqMZZlaeXKlXI6nRo2bJimTJmiL7/80qPN6dOn9fOf/1zDhw/XyJEjNX/+fJ09e7YTKvCer306fvy4kpOTW/zavn27u11L+7du3doVJbWqPWPwgx/84KpannjiCY82FRUVmj59ulJTU5WZmalnn31WDQ0NnVmKV3yt9/Tp03r66aeVnZ2tYcOG6Y477tDixYtVW1vr0S4QxregoEB33nmnhg4dqvvvv1979+5ttf327dv1D//wDxo6dKjuueceffDBBx77vXkOdydf6n3jjTf0wAMP6NZbb9Wtt96qKVOmXNV+3rx5V43h1KlTO7sMr/lS7+bNm6+qZejQoR5tAnl8fam1pdej5ORkj5scB/rY+o2Fq6xcudLasGGDtWTJEmvEiBFePWbNmjXWiBEjrLfffts6cOCA9aMf/ci68847rQsXLrjbTJ061frud79rlZaWWrt377bGjBlj/exnP+usMrzia58aGhqsEydOeHz9+te/ttLS0iyXy+Vul5SUZBUVFXm0u/z/oru0ZwwefPBBa8GCBR611NbWuvc3NDRYd999tzVlyhRr//791vvvv29lZGRYy5cv7+xy2uRrvQcPHrRmzpxpvfvuu9bRo0et4uJia+zYsdasWbM82nX3+G7dutUaMmSItWnTJuvw4cPWggULrJEjR1pVVVUttv/000+twYMHW2vXrrXKy8utf//3f7eGDBliHTx40N3Gm+dwd/G13p/97GfWa6+9Zu3fv98qLy+35s2bZ40YMcL6+uuv3W3mzp1rTZ061WMMT58+3VUltcrXeouKiqzhw4d71FJZWenRJlDH19daT5065VHnoUOHrMGDB1tFRUXuNoE8tv5EgGlFUVGRVwGmqanJuv32261169a5t9XU1FgpKSnWH/7wB8uyLKu8vNxKSkqy9u7d627zwQcfWMnJyR4vKl3JX336p3/6J+vxxx/32JaUlGS9/fbbfuurP7S33gcffNBavHjxNfe///771qBBgzxeMF9//XVr+PDh1sWLF/3T+Xbw1/hu27bNGjJkiFVfX+/e1t3je99991m5ubnu7xsbGy2n02mtWbOmxfZz5syxpk+f7rHt/vvvtxYuXGhZlnfP4e7ka71XamhosNLT060tW7a4t82dO9d6+OGH/d1Vv/C13rZeqwN5fDs6ths2bLDS09Ots2fPurcF8tj6E6eQ/OD48eOqrKxUVlaWe1vv3r2VmpqqkpISSVJJSYmioqI8pjWzsrJkt9vbnPruLP7oU1lZmQ4cOKD77rvvqn25ubnKyMjQfffdp02bNvn9luu+6ki9v//975WRkaG7775by5cv1/nzf72dfWlpqZKSkjw+ZNHpdMrlcqm8vNz/hXjJX79zLpdLkZGRCgvz/NzL7hrfuro67du3z+P5ZrfblZWV5X6+Xam0tFSZmZke25xOp0pLSyV59xzuLu2p90rnz59XQ0ODoqOjPbZ/8sknyszMVHZ2tp588kmdOnXKr31vj/bWe+7cOf3d3/2dRo8erYcffliHDx927wvU8fXH2BYVFWncuHHq2bOnx/ZAHFt/C9hP4jVJZWWlJCk2NtZje2xsrKqqqiRJVVVVuuGGGzz2h4WFKTo62v34ruaPPm3atEkJCQkaPny4x/bZs2frtttuU48ePfTRRx8pNzdX586d00MPPeS3/vuqvfXefffd6t+/v/r27auDBw9q2bJl+uKLL/Sb3/zGfdwrPyG6+fvuGlvJP+N78uRJPf/885owYYLH9u4c31OnTqmxsbHF59uRI0dafExLY3T589Ob53B3aU+9V1q2bJn69u3r8Ydy1KhRGjNmjAYMGKBjx47pV7/6laZNm6b//M//lMPh8GsNvmhPvTfffLPy8vKUnJys2tpavfTSS5o4caK2bt2qfv36Bez4dnRs9+7dq0OHDumZZ57x2B6oY+tvIRNgli1bprVr17baZtu2bUpISOiiHnUeb2vtqAsXLugPf/iDHnnkkav2/fjHP3b/+5ZbbtH58+e1fv36TvkD19n1Xv7HOzk5WfHx8ZoyZYq++uor3Xjjje0+bnt11fi6XC7NmDFDCQkJmjlzpse+rhxfdMyLL76obdu2aePGjbruuuvc28eNG+f+d/NCz+985zvud+4mSU9P97jRb3p6uu666y4VFhbqJz/5Sfd1rJNt2rRJSUlJGjZsmMf2YBrb1oRMgPnhD3+onJycVtsMHDiwXceOj4+XJFVXV6tv377u7dXV1Ro0aJCkS+/IT5486fG4hoYGnTlzxv14f/G21o726a233tKFCxf0ve99r822qampev7551VXV6eIiIg22/uiq+ptlpqaKkk6evSobrzxRsXFxV11Sqb5XZ2/x1bqmnpdLpf+9V//Vb169dJzzz2n8PDwVtt35vheKSYmRg6HQ9XV1R7bq6urr3mvtLi4uKveaV/e3pvncHdpT73N1q9frxdffFEbNmxos46BAwcqJiZGR48e7dY/ch2pt1l4eLgGDx6sr776SlLgjm9Haj137py2bt2q2bNnt/lzAmVs/S1k1sDccMMNSkhIaPWrvS+8AwYMUHx8vHbu3One5nK5tGfPHve7gvT0dNXU1KisrMzdZteuXWpqaroqPXeUt7V2tE9FRUW68847rzpN0ZIDBw4oOjq6U/64dVW9l9ci/fVFMS0tTYcOHfJ4ESouLlZkZKQSExP9VOVfdXa9LpdLU6dOVXh4uF544QWPd+3X0pnje6WIiAgNGTLE4/nW1NSknTt3erwLv1xaWpp27drlsa24uFhpaWmSvHsOd5f21CtJa9eu1fPPP69169ZddUlxS77++mudPn26U0K3L9pb7+UaGxt16NAhdy2BOr4dqfWtt95SXV2dvvvd77b5cwJlbP2uu1cRB6L//d//tfbv3+++PHj//v3W/v37PS4Tzs7Otv7nf/7H/f2aNWuskSNHWu+884712WefWQ8//HCLl1F/73vfs/bs2WP98Y9/tMaOHRsQl1G31qevv/7ays7Otvbs2ePxuC+//NJKTk62Pvjgg6uO+e6771pvvPGGdfDgQevLL7+0CgoKrNTUVGvlypWdXk9bfK336NGj1m9+8xvrT3/6k3Xs2DHrnXfesf7+7//emjRpkvsxzZdR//CHP7QOHDhgffjhh9Ztt90WMJdR+1JvbW2tdf/991t33323dfToUY/LMBsaGizLCozx3bp1q5WSkmJt3rzZKi8vtxYuXGiNHDnSfSXYo48+ai1btszd/tNPP7VuueUWa/369VZ5ebm1atWqFi+jbus53F18rXfNmjXWkCFDrLfeestjDJtfw1wul5Wfn2+VlJRYx44ds4qLi62cnBxr7Nix3XrlXDNf6/31r39t7dixw/rqq6+ssrIy66c//ak1dOhQ6/Dhw+42gTq+vtba7J//+Z+tn/zkJ1dtD/Sx9aeQOYXki1WrVmnLli3u75tPkWzcuFEZGRmSpC+++MLjw72mTZum8+fP64knnlBNTY1GjBihdevWebx7XbZsmZ5++mlNnjxZdrtdY8eO1YIFC7qmqGtoq0/19fX64osvPK66kS7NvvTr109Op/OqY4aFhamgoEB5eXmSpBtvvFHz5s3T97///c4txgu+1hseHq6dO3dq48aNOnfunL75zW9q7NixHut+HA6HVq9erUWLFmnChAnq0aOHcnJyvJra7Wy+1rtv3z7t2bNHkjRmzBiPY7377rsaMGBAQIzvXXfdpZMnT2rVqlWqrKzU4MGDtW7dOve0+5///GfZ7X+dYB4+fLiWLVumFStW6Fe/+pVuuukmPffcc0pKSnK38eY53F18rbewsFD19fVX/Q7OnDlTs2bNksPh0KFDh/Tb3/5WtbW16tu3r26//XbNmTOnS2bR2uJrvTU1NVq4cKEqKysVHR2tIUOGqLCw0GMGNFDH19daJenIkSP69NNP9dJLL111vEAfW3+yWVY3X9sKAADgo5BZAwMAAIIHAQYAABiHAAMAAIxDgAEAAMYhwAAAAOMQYAAAgHEIMAAAwDgEGAAAYBwCDAAAMA4BBgAAGIcAAwAAjEOAAQAAxvl/RssOJ7W/hRwAAAAASUVORK5CYII=",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "df[df[\"preference\"]][\"cer_diff_preference\"].hist(bins=50)\n",
    "print(df[df[\"preference\"]][\"cer_diff_preference\"].quantile(0.1))\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:59:40.799375Z",
     "start_time": "2024-05-16T13:59:36.394236Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:49.899409Z",
     "iopub.status.busy": "2024-09-03T01:03:49.899256Z",
     "iopub.status.idle": "2024-09-03T01:03:50.162807Z",
     "shell.execute_reply": "2024-09-03T01:03:50.162220Z",
     "shell.execute_reply.started": "2024-09-03T01:03:49.899393Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2216\n",
      "good_continue_at\n",
      "True    39466\n",
      "Name: count, dtype: int64\n",
      "\n",
      " Check some basics... \n",
      " preference\n",
      "False    19733\n",
      "True     19733\n",
      "Name: count, dtype: int64 is_30b\n",
      "True    39466\n",
      "Name: count, dtype: int64 model_name\n",
      "chirp-v3p5-engine-t-3    39466\n",
      "Name: count, dtype: int64 preference  model_name           \n",
      "False       chirp-v3p5-engine-t-3    19733\n",
      "True        chirp-v3p5-engine-t-3    19733\n",
      "Name: count, dtype: int64\n"
     ]
    }
   ],
   "source": [
    "df[\"id\"] = df[\"str_id\"]\n",
    "# get the original duration of the clips, if they are concacted\n",
    "df[\"original_duration_s\"] = df[\"total_start_s\"] + df[\"duration\"]\n",
    "# classify the continue at behavoirs by the duration choice\n",
    "audio_prompt_id_to_continue_at = {}\n",
    "for _, row in df[~df[\"continued_parent\"].isna()].iterrows():\n",
    "    audio_prompt_id = row[\"continued_parent\"]\n",
    "    if audio_prompt_id not in audio_prompt_id_to_continue_at:\n",
    "        audio_prompt_id_to_continue_at[audio_prompt_id] = row[\"continue_at\"]\n",
    "    else:\n",
    "        # pick the max\n",
    "        audio_prompt_id = max(\n",
    "            audio_prompt_id_to_continue_at[audio_prompt_id], row[\"continue_at\"]\n",
    "        )\n",
    "print(len(audio_prompt_id_to_continue_at))\n",
    "df[\"has_continue_and_start_continue_at\"] = df[\"id\"].apply(\n",
    "    lambda x: audio_prompt_id_to_continue_at.get(x)\n",
    ")\n",
    "# we want continue at to be at most of the clip...\n",
    "df[\"good_continue_at\"] = (\n",
    "    (df[\"has_continue_and_start_continue_at\"] / df[\"duration\"]) > 0.9\n",
    ") | df[\"has_continue_and_start_continue_at\"].isna()\n",
    "print(df[\"good_continue_at\"].value_counts())\n",
    "\n",
    "\n",
    "print(\n",
    "    \"\\n Check some basics... \\n\",\n",
    "    df[\"preference\"].value_counts(),\n",
    "    df[\"is_30b\"].value_counts(),\n",
    "    df[\"model_name\"].value_counts(),\n",
    "    df.groupby([\"preference\"])[\"model_name\"].value_counts(),\n",
    ")\n",
    "\n",
    "df = df.sort_values(by=[\"request_id\", \"preference\"])\n",
    "df[\"duration_rel_diff\"] = df[\"duration\"].diff()\n",
    "df[\"play_rel_diff\"] = df[\"reaction_play_count\"].diff()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:59:41.035167Z",
     "start_time": "2024-05-16T13:59:40.801098Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:50.163678Z",
     "iopub.status.busy": "2024-09-03T01:03:50.163523Z",
     "iopub.status.idle": "2024-09-03T01:03:50.248475Z",
     "shell.execute_reply": "2024-09-03T01:03:50.247902Z",
     "shell.execute_reply.started": "2024-09-03T01:03:50.163662Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "negative 19733 positive 17882\n",
      "total pair requests 19733  --> selected pair requests 17882 frac 0.906\n"
     ]
    }
   ],
   "source": [
    "normal_pos_play_count = 3\n",
    "# this is lower, cause a concat is probably already ensuring that it is good\n",
    "concat_pos_play_count = 1\n",
    "# this is a filter on the concated clip\n",
    "concat_total_play_count = 3\n",
    "\n",
    "neg_filter_selection_mask = (\n",
    "    (~df[\"preference\"])  # get basics aligned\n",
    "    & (df[\"reaction_play_count\"] >= 1)  # has to be played once\n",
    "    # & (df[\"play_count\"] <= 3)  # if it is actually bad, shouldn't be listened often\n",
    "    & (df[\"duration\"] >= 10)  # can't be too short, otherwise it is obvious\n",
    "    & (df[\"duration\"] <= 240)  # can't be badly long\n",
    "    & (df[\"has_continue_and_start_continue_at\"].isna())  # won't have any continues\n",
    "    & (df[\"upvote_count\"] == 0)  # won't have any likes\n",
    "    & ((df[\"norm_play_frac\"] <= 3.1))\n",
    "    # & (df[\"dislike_count\"] >= 1) # this is kinda strict\n",
    "    #     & (\n",
    "    #         (df_slice[\"is_in_playlist\"] == False)\n",
    "    #         & (df_slice[\"concat_in_playlist\"] == False)\n",
    "    #     )  # can't be part of a playlist -- otherwise there are some like signal in it?\n",
    ")\n",
    "pos_filter_selectin_mask = (\n",
    "    (df[\"preference\"])  # get basics aligned\n",
    "    & (\n",
    "        df[\"good_continue_at\"]\n",
    "    )  # if continue, needs to continue off a certain percentage\n",
    "    & (df[\"reaction_play_count\"] >= 1)\n",
    "    & (df[\"play_rel_diff\"] >= 0)  # this is more like quality assurance\n",
    "    & (df[\"duration\"] >= 10)  # can't be too short, otherwise it is obvious\n",
    "    & (df[\"duration\"] <= 240)  # can't be badly long\n",
    "    & (df[\"dislike_count\"] == 0)  # can't have dislikes\n",
    "    & (df[\"flag_count\"] == 0)  # can't have issues\n",
    "    & (\n",
    "        (\n",
    "            (df[\"part_of_concat\"])\n",
    "            & (df[\"reaction_play_count\"] >= concat_pos_play_count)\n",
    "            & (df[\"concat_play_counts\"] >= concat_total_play_count)\n",
    "        )\n",
    "        | (\n",
    "            (~df[\"part_of_concat\"])\n",
    "            & (df[\"reaction_play_count\"] >= normal_pos_play_count)\n",
    "            # & (df[\"norm_play_frac\"] >= 1.5)\n",
    "        )\n",
    "        \n",
    "    )\n",
    "    # & (df[\"norm_play_frac\"] >= 1.9)\n",
    "    # & (df[\"user_n_clips\"] >= 40)  # user needs to have genereated at least 20\n",
    "    # & (df[\"duration_rel_diff\"] < 10) # positive isn't just longer\n",
    "    & ((df[\"upvote_count\"] >= 1) | (df[\"reaction_play_count\"] >= 5)| (df[\"concat_play_counts\"] >= 5))\n",
    "    # & (df[\"pos_diff_preference\"] == 2)\n",
    "    & (df[\"task\"] != \"infill\")\n",
    "    & ((df[\"cer_diff_preference\"] < 0.2) & (df[\"cer\"] < 0.95)) # cut on hoot cer difference and abs cer\n",
    ")\n",
    "print(\n",
    "    \"negative\",\n",
    "    sum(neg_filter_selection_mask),\n",
    "    \"positive\",\n",
    "    sum(pos_filter_selectin_mask),\n",
    ")\n",
    "\n",
    "neg_filter_requests = df[neg_filter_selection_mask][\"request_id\"].unique()\n",
    "pos_filter_requests = df[pos_filter_selectin_mask][\"request_id\"].unique()\n",
    "# looking for very strong signal here:\n",
    "# listen to the positive/negative more than once\n",
    "# disliked one of the clips\n",
    "unique_requests = set(pos_filter_requests).intersection(neg_filter_requests)\n",
    "print(\n",
    "    \"total pair requests\",\n",
    "    df[\"request_id\"].nunique(),\n",
    "    \" --> selected pair requests\",\n",
    "    len(unique_requests),\n",
    "    f\"frac {len(unique_requests) / df['request_id'].nunique():.3f}\",\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:59:41.250737Z",
     "start_time": "2024-05-16T13:59:41.036434Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:50.249316Z",
     "iopub.status.busy": "2024-09-03T01:03:50.249166Z",
     "iopub.status.idle": "2024-09-03T01:03:50.359407Z",
     "shell.execute_reply": "2024-09-03T01:03:50.358824Z",
     "shell.execute_reply.started": "2024-09-03T01:03:50.249301Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "30b_t3_v7_cycle requests 17882 clips 35764 total khrs 1.915; N gpus for 1000 iters 2.235; 2 gpus for x iters 1117.625; n unique users 14174 n pro users 8122\n"
     ]
    }
   ],
   "source": [
    "df_slice = df[df[\"request_id\"].isin(set(unique_requests))].copy()\n",
    "print(\n",
    "    f\"{os.path.basename(OUT_DATA_DIR)} requests\",\n",
    "    df_slice[\"request_id\"].nunique(),\n",
    "    \"clips\",\n",
    "    df_slice.shape[0],\n",
    "    f\"total khrs {sum(df_slice['duration'] / 3600 / 1000):.3f};\",\n",
    "    f\"N gpus for 1000 iters {df_slice.shape[0] / 8 / 2 / 1000:.3f};\",\n",
    "    f\"2 gpus for x iters {df_slice.shape[0] / 8 / 2 / 2:.3f};\",\n",
    "    f\"n unique users {df_slice['user_id'].nunique()}\",\n",
    "    f\"n pro users {df_slice[df_slice['is_pro_user']]['user_id'].nunique()}\",\n",
    ")\n",
    "# 76171 152342 total khrs 2.880 n gpus for 1250 iters 3.809\n",
    "# v10 has 78866\n",
    "# v14 has 110402"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:50.360247Z",
     "iopub.status.busy": "2024-09-03T01:03:50.360097Z",
     "iopub.status.idle": "2024-09-03T01:03:50.362367Z",
     "shell.execute_reply": "2024-09-03T01:03:50.361961Z",
     "shell.execute_reply.started": "2024-09-03T01:03:50.360232Z"
    }
   },
   "outputs": [],
   "source": [
    "# v1 requests 17681 clips 35362 total khrs 1.815; N gpus for 1500 iters 1.473; 4 gpus for x iters 552.531; n unique users 15179 n pro users 5983"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:59:41.277006Z",
     "start_time": "2024-05-16T13:59:41.252105Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:50.363043Z",
     "iopub.status.busy": "2024-09-03T01:03:50.362905Z",
     "iopub.status.idle": "2024-09-03T01:03:50.404688Z",
     "shell.execute_reply": "2024-09-03T01:03:50.404214Z",
     "shell.execute_reply.started": "2024-09-03T01:03:50.363029Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "positive in playlist (2537, 101)\n"
     ]
    }
   ],
   "source": [
    "test_mask = (df_slice[\"preference\"]) & (\n",
    "    (df_slice[\"is_in_playlist\"]) | (df_slice[\"concat_in_playlist\"])\n",
    ")\n",
    "print(\"positive in playlist\", df_slice[test_mask].shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:59:41.323409Z",
     "start_time": "2024-05-16T13:59:41.278278Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:50.405419Z",
     "iopub.status.busy": "2024-09-03T01:03:50.405279Z",
     "iopub.status.idle": "2024-09-03T01:03:50.436782Z",
     "shell.execute_reply": "2024-09-03T01:03:50.436396Z",
     "shell.execute_reply.started": "2024-09-03T01:03:50.405406Z"
    }
   },
   "outputs": [],
   "source": [
    "# interesting_clips_must_be_positive_mask = (\n",
    "#     (df_slice[\"upvoted\"] == True)\n",
    "#     | (df_slice[\"has_action\"] == True)\n",
    "#     | (df_slice[\"part_of_concat\"] == True)\n",
    "# )\n",
    "# interesting_clips_must_be_not_negative_mask = (df_slice[\"downvoted\"] == False) # & (df_slice[\"dislike_count\"] < 1)\n",
    "# interesting_clips_mask = interesting_clips_must_be_positive_mask & interesting_clips_must_be_not_negative_mask\n",
    "# assert interesting_clips_mask.eq(df_slice[\"preference\"]).all()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:59:41.392244Z",
     "start_time": "2024-05-16T13:59:41.324472Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:50.439648Z",
     "iopub.status.busy": "2024-09-03T01:03:50.439309Z",
     "iopub.status.idle": "2024-09-03T01:03:50.471509Z",
     "shell.execute_reply": "2024-09-03T01:03:50.471117Z",
     "shell.execute_reply.started": "2024-09-03T01:03:50.439632Z"
    }
   },
   "outputs": [],
   "source": [
    "# save positive ids\n",
    "# positive_preference_ids = df_slice[df_slice[\"preference\"] == False][\"s3_id\"].to_json(orient='values')\n",
    "# with open('/home/tony/Data/Preference/7b_v2/7v_v20_full_recut_id_negative.json', 'w') as file:\n",
    "#     file.write(positive_preference_ids)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:50.472346Z",
     "iopub.status.busy": "2024-09-03T01:03:50.472042Z",
     "iopub.status.idle": "2024-09-03T01:03:50.512139Z",
     "shell.execute_reply": "2024-09-03T01:03:50.511759Z",
     "shell.execute_reply.started": "2024-09-03T01:03:50.472332Z"
    }
   },
   "outputs": [],
   "source": [
    "# df_slice_2 = pd.read_csv(\"/home/tony/Data/Preference/30b_v1/interesting_clips_v4_t_1_20240808_slice.csv\")\n",
    "# df_total = pd.concat([df_slice, df_slice_2])\n",
    "# print(df_total.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:50.512799Z",
     "iopub.status.busy": "2024-09-03T01:03:50.512671Z",
     "iopub.status.idle": "2024-09-03T01:03:50.548537Z",
     "shell.execute_reply": "2024-09-03T01:03:50.548155Z",
     "shell.execute_reply.started": "2024-09-03T01:03:50.512787Z"
    }
   },
   "outputs": [],
   "source": [
    "# print(df_slices_2.shape, df_slice.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:50.549167Z",
     "iopub.status.busy": "2024-09-03T01:03:50.549046Z",
     "iopub.status.idle": "2024-09-03T01:03:50.583238Z",
     "shell.execute_reply": "2024-09-03T01:03:50.582827Z",
     "shell.execute_reply.started": "2024-09-03T01:03:50.549154Z"
    }
   },
   "outputs": [],
   "source": [
    "# print(df_total.shape)\n",
    "# df_slice = df_total.copy()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T14:00:20.866354Z",
     "start_time": "2024-05-16T14:00:12.443344Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:50.583898Z",
     "iopub.status.busy": "2024-09-03T01:03:50.583767Z",
     "iopub.status.idle": "2024-09-03T01:03:50.619096Z",
     "shell.execute_reply": "2024-09-03T01:03:50.618716Z",
     "shell.execute_reply.started": "2024-09-03T01:03:50.583885Z"
    }
   },
   "outputs": [],
   "source": [
    "# df_slice.to_csv(\"/home/tony/Data/Preference/30b_v2/interesting_clips_v4_t_3_20240902_slice.csv\", index=False)\n",
    "# BREAK"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Need to kick out the ones has gpt prompt -- these are pairs with different text inputs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:59:41.932296Z",
     "start_time": "2024-05-16T13:59:41.932287Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:50.619721Z",
     "iopub.status.busy": "2024-09-03T01:03:50.619586Z",
     "iopub.status.idle": "2024-09-03T01:03:50.714994Z",
     "shell.execute_reply": "2024-09-03T01:03:50.714557Z",
     "shell.execute_reply.started": "2024-09-03T01:03:50.619707Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(15727, 17882)"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# don't have continue at\n",
    "df_slice[\"request_id\"] = df_slice[\"request_id\"].astype(str)\n",
    "df_slice[df_slice[\"continue_at\"].isna()][\"request_id\"].nunique(), df_slice[\"request_id\"].nunique()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:50.715734Z",
     "iopub.status.busy": "2024-09-03T01:03:50.715589Z",
     "iopub.status.idle": "2024-09-03T01:03:50.768797Z",
     "shell.execute_reply": "2024-09-03T01:03:50.768193Z",
     "shell.execute_reply.started": "2024-09-03T01:03:50.715720Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(35764, 101)\n",
      "(35764, 101)\n",
      "(35764, 101)\n"
     ]
    }
   ],
   "source": [
    "print(df_slice.shape)\n",
    "df_slice = df_slice[df_slice[\"request_id\"].apply(lambda x: len(x) > 3)]\n",
    "print(df_slice.shape)\n",
    "# df_slice = df_slice[df_slice[\"is_pro_user\"]].copy()\n",
    "print(df_slice.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:59:41.932966Z",
     "start_time": "2024-05-16T13:59:41.932957Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:50.769614Z",
     "iopub.status.busy": "2024-09-03T01:03:50.769468Z",
     "iopub.status.idle": "2024-09-03T01:03:50.776111Z",
     "shell.execute_reply": "2024-09-03T01:03:50.775640Z",
     "shell.execute_reply.started": "2024-09-03T01:03:50.769599Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "17882\n"
     ]
    }
   ],
   "source": [
    "final_filtered_requests = df_slice[\"request_id\"].astype(str).unique()\n",
    "# final_filtered_requests = df_slice[df_slice[\"is_pro_user\"]][\"request_id\"].astype(str).unique()\n",
    "print(len(final_filtered_requests))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:59:41.933558Z",
     "start_time": "2024-05-16T13:59:41.933550Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:50.776848Z",
     "iopub.status.busy": "2024-09-03T01:03:50.776712Z",
     "iopub.status.idle": "2024-09-03T01:03:50.809709Z",
     "shell.execute_reply": "2024-09-03T01:03:50.809323Z",
     "shell.execute_reply.started": "2024-09-03T01:03:50.776835Z"
    }
   },
   "outputs": [],
   "source": [
    "# df_slice.to_csv(\"/home/tony/Data/Preference/30b_v2/interesting_clips_v4_t_3_20240902_slice.csv\", index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:59:41.934277Z",
     "start_time": "2024-05-16T13:59:41.934268Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:50.810391Z",
     "iopub.status.busy": "2024-09-03T01:03:50.810259Z",
     "iopub.status.idle": "2024-09-03T01:03:50.926222Z",
     "shell.execute_reply": "2024-09-03T01:03:50.925698Z",
     "shell.execute_reply.started": "2024-09-03T01:03:50.810379Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "17703 179\n",
      "(35406, 102) (358, 102)\n"
     ]
    }
   ],
   "source": [
    "train_requests, val_requests = train_test_split(\n",
    "    sorted(list(final_filtered_requests)), test_size=0.01, random_state=42\n",
    ")\n",
    "print(len(train_requests), len(val_requests))\n",
    "\n",
    "train_df = df_slice[df_slice[\"request_id\"].astype(str).isin(set(train_requests))].copy()\n",
    "val_df = df_slice[df_slice[\"request_id\"].astype(str).isin(set(val_requests))].copy()\n",
    "train_df = train_df.sort_values(by=[\"request_id\", \"preference\"])\n",
    "train_df = train_df.reset_index()\n",
    "val_df = val_df.sort_values(by=[\"request_id\", \"preference\"])\n",
    "val_df = val_df.reset_index()\n",
    "\n",
    "print(train_df.shape, val_df.shape)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Actually make"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:59:41.934954Z",
     "start_time": "2024-05-16T13:59:41.934946Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:50.926957Z",
     "iopub.status.busy": "2024-09-03T01:03:50.926819Z",
     "iopub.status.idle": "2024-09-03T01:03:50.928995Z",
     "shell.execute_reply": "2024-09-03T01:03:50.928607Z",
     "shell.execute_reply.started": "2024-09-03T01:03:50.926943Z"
    }
   },
   "outputs": [],
   "source": [
    "# val_df[[\"request_id\", \"metadata\", \"updated_at\", \"user_id\", \"preference\"]].head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:59:41.935620Z",
     "start_time": "2024-05-16T13:59:41.935613Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:50.929668Z",
     "iopub.status.busy": "2024-09-03T01:03:50.929531Z",
     "iopub.status.idle": "2024-09-03T01:03:52.306595Z",
     "shell.execute_reply": "2024-09-03T01:03:52.306007Z",
     "shell.execute_reply.started": "2024-09-03T01:03:50.929655Z"
    }
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|███████████████████████████████████████████████████████████████████████████████████████████████████████| 35406/35406 [00:01<00:00, 26444.15it/s]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1,896 hours of 35406 clips, 2.212875 nodes, 368.8125 iters\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    }
   ],
   "source": [
    "total_duration = 0\n",
    "for i, row in tqdm(train_df.iterrows(), total=len(train_df)):\n",
    "    # we need to alternate between preference: neg, pos\n",
    "    # print(i, row)\n",
    "    try:\n",
    "        assert row[\"preference\"] == (i % 2 == 1)\n",
    "        total_duration += row[\"duration\"]\n",
    "    except Exception as E:\n",
    "        print(i, row)\n",
    "        print(E)\n",
    "        raise ValueError()\n",
    "        \n",
    "print(\n",
    "    f\"{round(total_duration / 60 / 60):,} hours of {train_df.shape[0]} clips, {train_df.shape[0] / 8 / 2 / 1000} nodes, {train_df.shape[0] / 8 / 2 / 6} iters\"\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:59:41.936268Z",
     "start_time": "2024-05-16T13:59:41.936260Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:52.307442Z",
     "iopub.status.busy": "2024-09-03T01:03:52.307290Z",
     "iopub.status.idle": "2024-09-03T01:03:56.574817Z",
     "shell.execute_reply": "2024-09-03T01:03:56.574259Z",
     "shell.execute_reply.started": "2024-09-03T01:03:52.307427Z"
    }
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████| 358/358 [00:04<00:00, 85.49it/s]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Total 358 clips, 3 different prompts\n",
      "10 hours of False\n",
      "10 hours of True\n",
      "Done\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    }
   ],
   "source": [
    "make_dataset(val_df, OUT_DATA_DIR, is_val=True, npz_dir=NPZ_DIR)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:59:41.936964Z",
     "start_time": "2024-05-16T13:59:41.936957Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:03:56.575645Z",
     "iopub.status.busy": "2024-09-03T01:03:56.575494Z",
     "iopub.status.idle": "2024-09-03T01:12:10.107735Z",
     "shell.execute_reply": "2024-09-03T01:12:10.107150Z",
     "shell.execute_reply.started": "2024-09-03T01:03:56.575630Z"
    }
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████| 35406/35406 [08:13<00:00, 71.76it/s]\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Total 35406 clips, 260 different prompts\n",
      "963 hours of False\n",
      "932 hours of True\n",
      "Done\n"
     ]
    }
   ],
   "source": [
    "make_dataset(train_df, OUT_DATA_DIR, is_val=False, npz_dir=NPZ_DIR)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-01-29T19:46:47.549860Z",
     "start_time": "2024-01-29T19:46:47.548015Z"
    }
   },
   "source": [
    "# Validation"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:59:41.937879Z",
     "start_time": "2024-05-16T13:59:41.937870Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:12:10.108694Z",
     "iopub.status.busy": "2024-09-03T01:12:10.108522Z",
     "iopub.status.idle": "2024-09-03T01:12:10.209204Z",
     "shell.execute_reply": "2024-09-03T01:12:10.208705Z",
     "shell.execute_reply.started": "2024-09-03T01:12:10.108677Z"
    }
   },
   "outputs": [],
   "source": [
    "# verify\n",
    "mm = np.memmap(os.path.join(OUT_DATA_DIR, f\"data_val.bin\"), dtype=np.uint16, mode=\"r\")\n",
    "test_metas = read_jsonl(os.path.join(OUT_DATA_DIR, f\"meta_val.jsonl\"))\n",
    "test_info = read_json(os.path.join(OUT_DATA_DIR, f\"info_val.json\"))\n",
    "mm = mm.reshape(-1, 6016, 13)\n",
    "assert len(mm) == len(test_metas)\n",
    "assert mm[:100, :, 0].min() >= 0\n",
    "assert mm[:100, :, 0].max() <= 4000\n",
    "assert mm[:100, :, 1:].min() >= 0\n",
    "assert mm[:100, :, 1:].max() <= 2048"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:59:41.938629Z",
     "start_time": "2024-05-16T13:59:41.938621Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:12:10.209980Z",
     "iopub.status.busy": "2024-09-03T01:12:10.209834Z",
     "iopub.status.idle": "2024-09-03T01:12:10.212336Z",
     "shell.execute_reply": "2024-09-03T01:12:10.211926Z",
     "shell.execute_reply.started": "2024-09-03T01:12:10.209965Z"
    }
   },
   "outputs": [],
   "source": [
    "# # randomly listen to some stuff\n",
    "# from suno_utils.tasks.dac_2c_12cb import preload_models as preload_codec_models\n",
    "# from suno_utils.tasks.dac_2c_12cb import (\n",
    "#     encode as codec_encode,\n",
    "#     decode_stream_to_full_audio as codec_decode,\n",
    "#     EMBEDDING_RATE as CODEC_EMBEDDING_RATE,\n",
    "#     decode as decode\n",
    "# )\n",
    "# os.environ[\"CUDA_VISIBLE_DEVICES\"] = \"0\"\n",
    "# _ = preload_codec_models(\"/app/suno/data/dpo/models/dac_2c_25x12.pt\", device=\"cuda\")\n",
    "# assert len(test_metas) == len(mm)\n",
    "# idx_list = list(range(len(test_metas)))\n",
    "# # random.shuffle(idx_list)\n",
    "# # idx_list = [idx for idx in idx_list if \"text\" in test_metas[idx]]\n",
    "# print(len(mm))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:59:41.939205Z",
     "start_time": "2024-05-16T13:59:41.939198Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:12:10.213027Z",
     "iopub.status.busy": "2024-09-03T01:12:10.212891Z",
     "iopub.status.idle": "2024-09-03T01:12:10.249113Z",
     "shell.execute_reply": "2024-09-03T01:12:10.248710Z",
     "shell.execute_reply.started": "2024-09-03T01:12:10.213013Z"
    }
   },
   "outputs": [],
   "source": [
    "# import random\n",
    "# idx = random.choice(test_info[\"perference_0\"][\"idx_list\"])\n",
    "# assert \"original_duration_s\" in test_metas[idx]\n",
    "# # positive index should be shifted by 1\n",
    "# pos_idx = idx + 1\n",
    "# print(\n",
    "#     \"tags:\",\n",
    "#     test_metas[idx].get(\"tags\") == test_metas[pos_idx].get(\"tags\"),\n",
    "#     test_metas[idx].get(\"tags\"),\n",
    "# )\n",
    "# arr = mm[idx, 1:].copy().astype(np.int16)[:, 1:]\n",
    "# pos_arr = mm[pos_idx, 1:].copy().astype(np.int16)[:, 1:]\n",
    "# pad_idx_arr = np.where(arr == COARSE_PAD_TOKEN)[0]\n",
    "# if len(pad_idx_arr) > 0:\n",
    "#     arr = arr[: pad_idx_arr[0], :]\n",
    "# pos_pad_idx_arr = np.where(pos_arr == COARSE_PAD_TOKEN)[0]\n",
    "# if len(pos_pad_idx_arr) > 0:\n",
    "#     pos_arr = pos_arr[: pos_pad_idx_arr[0], :]\n",
    "# a = decode(arr)\n",
    "# print(\"\\n negative example \\n\", test_metas[idx])\n",
    "# a.play(compress=False)\n",
    "# pos_a = decode(pos_arr)\n",
    "# print(\"\\n positive example \\n\", test_metas[pos_idx])\n",
    "# pos_a.play(compress=False)\n",
    "# print(\n",
    "#     \"text:\",\n",
    "#     test_metas[idx].get(\"text\") == test_metas[pos_idx].get(\"text\"),\n",
    "#     test_metas[idx].get(\"text\"),\n",
    "# )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:59:41.939977Z",
     "start_time": "2024-05-16T13:59:41.939969Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:12:10.249787Z",
     "iopub.status.busy": "2024-09-03T01:12:10.249657Z",
     "iopub.status.idle": "2024-09-03T01:12:10.287782Z",
     "shell.execute_reply": "2024-09-03T01:12:10.287398Z",
     "shell.execute_reply.started": "2024-09-03T01:12:10.249773Z"
    }
   },
   "outputs": [],
   "source": [
    "# val_df[val_df[\"tags\"] == 'a vibrant blend of experimental jazz fusion, drum-and-bass and swagger fuzzed-out guitars']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:59:41.940610Z",
     "start_time": "2024-05-16T13:59:41.940603Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:12:10.288461Z",
     "iopub.status.busy": "2024-09-03T01:12:10.288328Z",
     "iopub.status.idle": "2024-09-03T01:12:10.326900Z",
     "shell.execute_reply": "2024-09-03T01:12:10.326519Z",
     "shell.execute_reply.started": "2024-09-03T01:12:10.288448Z"
    }
   },
   "outputs": [],
   "source": [
    "# from collections import Counter\n",
    "# c = Counter()\n",
    "# for _, row in df_slice.iterrows():\n",
    "#     # print(row[\"metadata\"])\n",
    "#     for k in ast.literal_eval(row[\"metadata\"]).keys():\n",
    "#         c[k] += 1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:59:41.941167Z",
     "start_time": "2024-05-16T13:59:41.941159Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:12:10.327557Z",
     "iopub.status.busy": "2024-09-03T01:12:10.327421Z",
     "iopub.status.idle": "2024-09-03T01:12:10.367451Z",
     "shell.execute_reply": "2024-09-03T01:12:10.367075Z",
     "shell.execute_reply.started": "2024-09-03T01:12:10.327543Z"
    }
   },
   "outputs": [],
   "source": [
    "# original_npz_path = f\"/app/suno/data/dpo/7b_npz/{test_metas[idx]['id']}.npz\"\n",
    "# original_npz_path = \"/app/suno/data/dpo/7b_npz/729c3011-f672-4ccd-8d82-1cbf2b52ff69.npz\"\n",
    "# original_arr = np.load(original_npz_path)[\"v2_raw\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:59:41.941801Z",
     "start_time": "2024-05-16T13:59:41.941793Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:12:10.368239Z",
     "iopub.status.busy": "2024-09-03T01:12:10.368107Z",
     "iopub.status.idle": "2024-09-03T01:12:10.405552Z",
     "shell.execute_reply": "2024-09-03T01:12:10.405108Z",
     "shell.execute_reply.started": "2024-09-03T01:12:10.368226Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "179 0\n"
     ]
    }
   ],
   "source": [
    "def validation_on_metas(input_metas):\n",
    "    total_bad = 0\n",
    "    total_good = 0\n",
    "    for idx in range(len(input_metas)):\n",
    "        if idx % 2 == 0:\n",
    "            pos_idx = idx + 1\n",
    "            if input_metas[idx].get(\"tags\") != input_metas[pos_idx].get(\"tags\"):\n",
    "                # print(test_metas[idx].get(\"text\") == test_metas[pos_idx].get(\"text\"), test_metas[idx].get(\"tags\"), test_metas[pos_idx].get(\"tags\"))\n",
    "                total_bad += 1\n",
    "            else:\n",
    "                total_good += 1\n",
    "    print(total_good, total_bad)\n",
    "    return\n",
    "\n",
    "\n",
    "validation_on_metas(test_metas)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:59:41.942520Z",
     "start_time": "2024-05-16T13:59:41.942511Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:12:10.406238Z",
     "iopub.status.busy": "2024-09-03T01:12:10.406102Z",
     "iopub.status.idle": "2024-09-03T01:12:10.444244Z",
     "shell.execute_reply": "2024-09-03T01:12:10.443806Z",
     "shell.execute_reply.started": "2024-09-03T01:12:10.406224Z"
    }
   },
   "outputs": [],
   "source": [
    "train_info = read_json(os.path.join(OUT_DATA_DIR, f\"info_tr.json\"))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:59:41.943072Z",
     "start_time": "2024-05-16T13:59:41.943065Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:12:10.444952Z",
     "iopub.status.busy": "2024-09-03T01:12:10.444818Z",
     "iopub.status.idle": "2024-09-03T01:12:10.477392Z",
     "shell.execute_reply": "2024-09-03T01:12:10.476986Z",
     "shell.execute_reply.started": "2024-09-03T01:12:10.444938Z"
    }
   },
   "outputs": [],
   "source": [
    "n_neg_tr = train_info[\"perference_0\"][\"idx_list\"]\n",
    "n_pos_tr = train_info[\"perference_1\"][\"idx_list\"]\n",
    "assert len(n_pos_tr) == len(n_neg_tr)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:59:41.944246Z",
     "start_time": "2024-05-16T13:59:41.944237Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:12:10.478051Z",
     "iopub.status.busy": "2024-09-03T01:12:10.477918Z",
     "iopub.status.idle": "2024-09-03T01:12:10.517609Z",
     "shell.execute_reply": "2024-09-03T01:12:10.517192Z",
     "shell.execute_reply.started": "2024-09-03T01:12:10.478038Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "total samples 35406 (35406, 102)\n"
     ]
    }
   ],
   "source": [
    "total_iters = len(n_neg_tr) + len(n_pos_tr)\n",
    "print(\"total samples\", total_iters, train_df.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:59:41.945249Z",
     "start_time": "2024-05-16T13:59:41.945241Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:12:10.518282Z",
     "iopub.status.busy": "2024-09-03T01:12:10.518153Z",
     "iopub.status.idle": "2024-09-03T01:12:10.555461Z",
     "shell.execute_reply": "2024-09-03T01:12:10.555049Z",
     "shell.execute_reply.started": "2024-09-03T01:12:10.518269Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1 epoch per batch 2, total 553.21875\n"
     ]
    }
   ],
   "source": [
    "print(\"1 epoch per batch 2, total\", total_iters / 8 / 2 / 4)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:59:41.945972Z",
     "start_time": "2024-05-16T13:59:41.945964Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:12:10.556320Z",
     "iopub.status.busy": "2024-09-03T01:12:10.556189Z",
     "iopub.status.idle": "2024-09-03T01:12:10.770480Z",
     "shell.execute_reply": "2024-09-03T01:12:10.769898Z",
     "shell.execute_reply.started": "2024-09-03T01:12:10.556307Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Submitted batch job 2207\n"
     ]
    }
   ],
   "source": [
    "!cd /home/tony/Work/tony/slurm/30b_dpo && sbatch sbatch_ipo_30b"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2024-09-03T01:12:10.771461Z",
     "iopub.status.busy": "2024-09-03T01:12:10.771301Z",
     "iopub.status.idle": "2024-09-03T01:12:10.782805Z",
     "shell.execute_reply": "2024-09-03T01:12:10.782369Z",
     "shell.execute_reply.started": "2024-09-03T01:12:10.771445Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Cache kept!\n"
     ]
    }
   ],
   "source": [
    "import shutil\n",
    "\n",
    "# Basic file copy\n",
    "shutil.copy('/home/tony/Work/tony/Preference/make_dataset_13b_v4_t3.ipynb', os.path.join(OUT_DATA_DIR, \"make_dataset.ipynb\"))\n",
    "print(\"Cache kept!\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# some gymathtics loading prev data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-16T13:59:41.946562Z",
     "start_time": "2024-05-16T13:59:41.946555Z"
    },
    "execution": {
     "iopub.execute_input": "2024-09-03T01:12:10.783565Z",
     "iopub.status.busy": "2024-09-03T01:12:10.783420Z",
     "iopub.status.idle": "2024-09-03T01:12:10.812246Z",
     "shell.execute_reply": "2024-09-03T01:12:10.811864Z",
     "shell.execute_reply.started": "2024-09-03T01:12:10.783551Z"
    }
   },
   "outputs": [],
   "source": [
    "# prev_v3_data = \"/app/suno/data/dpo/7v_v20_full/\"\n",
    "\n",
    "# test_val_metas = read_jsonl(os.path.join(prev_v3_data, f\"meta_val.jsonl\"))\n",
    "# test_tr_metas = read_jsonl(os.path.join(prev_v3_data, f\"meta_tr.jsonl\"))\n",
    "\n",
    "# all_ids = set()\n",
    "# for meta in test_val_metas:\n",
    "#     all_ids.add(meta[\"id\"])\n",
    "# for meta in test_tr_metas:\n",
    "#     all_ids.add(meta[\"id\"])\n",
    "# print(len(all_ids), len(test_val_metas) + len(test_tr_metas))\n",
    "\n",
    "# all_ids = list(all_ids)\n",
    "# with open(\"/home/tony/Data/Preference/7b_v2/7v_v20_full_recut_id.json\", \"w\") as fp:\n",
    "#     json.dump(all_ids, fp)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2024-09-03T01:12:10.812934Z",
     "iopub.status.busy": "2024-09-03T01:12:10.812805Z",
     "iopub.status.idle": "2024-09-03T01:12:10.902102Z",
     "shell.execute_reply": "2024-09-03T01:12:10.901696Z",
     "shell.execute_reply.started": "2024-09-03T01:12:10.812920Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>level_0</th>\n",
       "      <th>index</th>\n",
       "      <th>id_x</th>\n",
       "      <th>created_at</th>\n",
       "      <th>updated_at</th>\n",
       "      <th>time_used</th>\n",
       "      <th>metadata</th>\n",
       "      <th>user_id</th>\n",
       "      <th>status</th>\n",
       "      <th>request_id</th>\n",
       "      <th>is_generated</th>\n",
       "      <th>s3_id</th>\n",
       "      <th>upvote_count</th>\n",
       "      <th>batch_index</th>\n",
       "      <th>model_name</th>\n",
       "      <th>prompt_text</th>\n",
       "      <th>is_deleted</th>\n",
       "      <th>image_s3_id</th>\n",
       "      <th>is_public</th>\n",
       "      <th>dislike_count</th>\n",
       "      <th>flag_count</th>\n",
       "      <th>play_count</th>\n",
       "      <th>skip_count</th>\n",
       "      <th>title</th>\n",
       "      <th>continued_parent</th>\n",
       "      <th>duration</th>\n",
       "      <th>source</th>\n",
       "      <th>clip_type</th>\n",
       "      <th>task</th>\n",
       "      <th>is_pro_user</th>\n",
       "      <th>is_in_playlist</th>\n",
       "      <th>has_stems</th>\n",
       "      <th>user_n_clips</th>\n",
       "      <th>upvoted</th>\n",
       "      <th>downvoted</th>\n",
       "      <th>has_continued</th>\n",
       "      <th>part_of_concat</th>\n",
       "      <th>has_action</th>\n",
       "      <th>flagged</th>\n",
       "      <th>deleted</th>\n",
       "      <th>pos_preference</th>\n",
       "      <th>neg_preference</th>\n",
       "      <th>diff_preference</th>\n",
       "      <th>preference</th>\n",
       "      <th>reaction_play_count</th>\n",
       "      <th>reaction_pro_play_count</th>\n",
       "      <th>total_start_s</th>\n",
       "      <th>total_clip_s</th>\n",
       "      <th>concat_play_counts</th>\n",
       "      <th>concat_in_playlist</th>\n",
       "      <th>concat_likes</th>\n",
       "      <th>concat_dislikes</th>\n",
       "      <th>str_id</th>\n",
       "      <th>id_y</th>\n",
       "      <th>total_play_count</th>\n",
       "      <th>auto_play_count</th>\n",
       "      <th>total_play_time</th>\n",
       "      <th>total_play_count_hour</th>\n",
       "      <th>auto_play_count_hour</th>\n",
       "      <th>total_play_time_hour</th>\n",
       "      <th>p_date</th>\n",
       "      <th>p_hour</th>\n",
       "      <th>norm_play_frac</th>\n",
       "      <th>cleaned_prompt_text</th>\n",
       "      <th>cer</th>\n",
       "      <th>is_30b</th>\n",
       "      <th>tags</th>\n",
       "      <th>type</th>\n",
       "      <th>is_bot</th>\n",
       "      <th>prompt</th>\n",
       "      <th>stream</th>\n",
       "      <th>priority</th>\n",
       "      <th>experiment</th>\n",
       "      <th>gpt_prompt</th>\n",
       "      <th>negative_tags</th>\n",
       "      <th>refund_credits</th>\n",
       "      <th>make_instrumental</th>\n",
       "      <th>experiment_version</th>\n",
       "      <th>gpt_description_prompt</th>\n",
       "      <th>param_experiment</th>\n",
       "      <th>infill</th>\n",
       "      <th>history</th>\n",
       "      <th>options</th>\n",
       "      <th>continue_at</th>\n",
       "      <th>continued_from_prompt</th>\n",
       "      <th>has_vocal</th>\n",
       "      <th>concat_history</th>\n",
       "      <th>is_audio_upload_tos_accepted</th>\n",
       "      <th>continued_aligned_prompt</th>\n",
       "      <th>audio_prompt_id</th>\n",
       "      <th>stem_type</th>\n",
       "      <th>stem_from_id</th>\n",
       "      <th>error_type</th>\n",
       "      <th>error_message</th>\n",
       "      <th>pos_diff_preference</th>\n",
       "      <th>cer_diff_preference</th>\n",
       "      <th>id</th>\n",
       "      <th>original_duration_s</th>\n",
       "      <th>has_continue_and_start_continue_at</th>\n",
       "      <th>good_continue_at</th>\n",
       "      <th>duration_rel_diff</th>\n",
       "      <th>play_rel_diff</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>636</td>\n",
       "      <td>20680078</td>\n",
       "      <td>1ca5b266-fadd-4bb3-8db0-13274ee96c20</td>\n",
       "      <td>2024-08-31 04:31:44.622797+00:00</td>\n",
       "      <td>2024-08-31 04:31:44.622804+00:00</td>\n",
       "      <td>107.232122</td>\n",
       "      <td>{'tags': '80s,   Synthwave,   punk wave,   ele...</td>\n",
       "      <td>14886814</td>\n",
       "      <td>complete</td>\n",
       "      <td>00d00a69-e7f7-49cf-acee-81e4e5943f65</td>\n",
       "      <td>True</td>\n",
       "      <td>1ca5b266-fadd-4bb3-8db0-13274ee96c20</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>chirp-v3p5-engine-t-3</td>\n",
       "      <td>Free Palestine\\nFree Palestine\\n\\n[Piano Solo]...</td>\n",
       "      <td>False</td>\n",
       "      <td>image_1ca5b266-fadd-4bb3-8db0-13274ee96c20</td>\n",
       "      <td>False</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>Sunshine Dreams</td>\n",
       "      <td>0c1e9ca4-d59c-43a7-bc1a-8b25e06049af</td>\n",
       "      <td>120.00</td>\n",
       "      <td>web</td>\n",
       "      <td>gen</td>\n",
       "      <td>extend</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>164</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>0</td>\n",
       "      <td>False</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1ca5b266-fadd-4bb3-8db0-13274ee96c20</td>\n",
       "      <td>1.984543e+11</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>57.745253</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2024-09-02</td>\n",
       "      <td>19</td>\n",
       "      <td>0.481210</td>\n",
       "      <td>free palestine free palestine long live palest...</td>\n",
       "      <td>0.5126</td>\n",
       "      <td>True</td>\n",
       "      <td>80s,   Synthwave,   punk wave,   electronic,  ...</td>\n",
       "      <td>gen</td>\n",
       "      <td>False</td>\n",
       "      <td>Free Palestine\\nFree Palestine\\n\\n[Piano Solo]...</td>\n",
       "      <td>True</td>\n",
       "      <td>10</td>\n",
       "      <td>[chirp-v3p5-engine-t-3, chirp-v3p5-engine-t-3]</td>\n",
       "      <td>None</td>\n",
       "      <td></td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>v_39</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>False</td>\n",
       "      <td>[{'id': '0c1e9ca4-d59c-43a7-bc1a-8b25e06049af'...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>17.0</td>\n",
       "      <td>Free Palestine\\nFree Palestine\\n\\n[Piano Solo]...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.5126</td>\n",
       "      <td>1ca5b266-fadd-4bb3-8db0-13274ee96c20</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>True</td>\n",
       "      <td>-120.00</td>\n",
       "      <td>-6.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>637</td>\n",
       "      <td>20680077</td>\n",
       "      <td>dfc2dd38-34bc-40e6-a1f6-e6240a83776d</td>\n",
       "      <td>2024-08-31 04:31:44.622684+00:00</td>\n",
       "      <td>2024-08-31 04:31:44.622700+00:00</td>\n",
       "      <td>111.774462</td>\n",
       "      <td>{'tags': '80s,   Synthwave,   punk wave,   ele...</td>\n",
       "      <td>14886814</td>\n",
       "      <td>complete</td>\n",
       "      <td>00d00a69-e7f7-49cf-acee-81e4e5943f65</td>\n",
       "      <td>True</td>\n",
       "      <td>dfc2dd38-34bc-40e6-a1f6-e6240a83776d</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>chirp-v3p5-engine-t-3</td>\n",
       "      <td>Free Palestine\\nFree Palestine\\n\\n[Piano Solo]...</td>\n",
       "      <td>False</td>\n",
       "      <td>image_dfc2dd38-34bc-40e6-a1f6-e6240a83776d</td>\n",
       "      <td>False</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "      <td>Sunshine Dreams</td>\n",
       "      <td>0c1e9ca4-d59c-43a7-bc1a-8b25e06049af</td>\n",
       "      <td>120.00</td>\n",
       "      <td>web</td>\n",
       "      <td>gen</td>\n",
       "      <td>extend</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>164</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>1</td>\n",
       "      <td>True</td>\n",
       "      <td>5.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>17.0</td>\n",
       "      <td>136.999979</td>\n",
       "      <td>4.0</td>\n",
       "      <td>False</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>dfc2dd38-34bc-40e6-a1f6-e6240a83776d</td>\n",
       "      <td>1.983854e+11</td>\n",
       "      <td>5.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>439.986712</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2024-09-02</td>\n",
       "      <td>19</td>\n",
       "      <td>3.666556</td>\n",
       "      <td>free palestine free palestine long live palest...</td>\n",
       "      <td>0.5462</td>\n",
       "      <td>True</td>\n",
       "      <td>80s,   Synthwave,   punk wave,   electronic,  ...</td>\n",
       "      <td>gen</td>\n",
       "      <td>False</td>\n",
       "      <td>Free Palestine\\nFree Palestine\\n\\n[Piano Solo]...</td>\n",
       "      <td>True</td>\n",
       "      <td>10</td>\n",
       "      <td>[chirp-v3p5-engine-t-3, chirp-v3p5-engine-t-3]</td>\n",
       "      <td>None</td>\n",
       "      <td></td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>v_39</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>False</td>\n",
       "      <td>[{'id': '0c1e9ca4-d59c-43a7-bc1a-8b25e06049af'...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>17.0</td>\n",
       "      <td>Free Palestine\\nFree Palestine\\n\\n[Piano Solo]...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0336</td>\n",
       "      <td>dfc2dd38-34bc-40e6-a1f6-e6240a83776d</td>\n",
       "      <td>137.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>True</td>\n",
       "      <td>0.00</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1086</td>\n",
       "      <td>3336343</td>\n",
       "      <td>0d7ab351-b054-40b2-a2f4-877a1e478be2</td>\n",
       "      <td>2024-08-27 14:53:45.101812+00:00</td>\n",
       "      <td>2024-08-27 14:53:45.101818+00:00</td>\n",
       "      <td>85.035722</td>\n",
       "      <td>{'tags': 'high beat rap', 'task': None, 'type'...</td>\n",
       "      <td>6026074</td>\n",
       "      <td>complete</td>\n",
       "      <td>01611dd1-8a94-4475-a9d8-7845b5fb4ecd</td>\n",
       "      <td>True</td>\n",
       "      <td>0d7ab351-b054-40b2-a2f4-877a1e478be2</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>chirp-v3p5-engine-t-3</td>\n",
       "      <td>[Verse]\\nCity of dreams, man, the hustle never...</td>\n",
       "      <td>False</td>\n",
       "      <td>image_0d7ab351-b054-40b2-a2f4-877a1e478be2</td>\n",
       "      <td>False</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>Mumbai Hustle</td>\n",
       "      <td>None</td>\n",
       "      <td>95.96</td>\n",
       "      <td>web</td>\n",
       "      <td>gen</td>\n",
       "      <td></td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>63</td>\n",
       "      <td>False</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>True</td>\n",
       "      <td>-1</td>\n",
       "      <td>False</td>\n",
       "      <td>1.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0d7ab351-b054-40b2-a2f4-877a1e478be2</td>\n",
       "      <td>1.984515e+11</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>13.648086</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2024-09-02</td>\n",
       "      <td>19</td>\n",
       "      <td>0.142227</td>\n",
       "      <td>city of dreams man the hustle never ends from ...</td>\n",
       "      <td>0.2231</td>\n",
       "      <td>True</td>\n",
       "      <td>high beat rap</td>\n",
       "      <td>gen</td>\n",
       "      <td>False</td>\n",
       "      <td>[Verse]\\nCity of dreams, man, the hustle never...</td>\n",
       "      <td>True</td>\n",
       "      <td>0</td>\n",
       "      <td>[chirp-v3p5-engine-t-3, chirp-v3p5-engine-t-3]</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>v_36</td>\n",
       "      <td>Write a rap on hustling in Mumbai city in Engl...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>-0.0465</td>\n",
       "      <td>0d7ab351-b054-40b2-a2f4-877a1e478be2</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>True</td>\n",
       "      <td>-23.04</td>\n",
       "      <td>-13.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1087</td>\n",
       "      <td>3336342</td>\n",
       "      <td>fa48cb45-a21b-45e1-9e9d-a5a2f10c8e28</td>\n",
       "      <td>2024-08-27 14:53:45.101705+00:00</td>\n",
       "      <td>2024-08-27 14:53:45.101720+00:00</td>\n",
       "      <td>191.813621</td>\n",
       "      <td>{'tags': 'high beat rap', 'task': None, 'type'...</td>\n",
       "      <td>6026074</td>\n",
       "      <td>complete</td>\n",
       "      <td>01611dd1-8a94-4475-a9d8-7845b5fb4ecd</td>\n",
       "      <td>True</td>\n",
       "      <td>fa48cb45-a21b-45e1-9e9d-a5a2f10c8e28</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>chirp-v3p5-engine-t-3</td>\n",
       "      <td>[Verse]\\nCity of dreams, man, the hustle never...</td>\n",
       "      <td>False</td>\n",
       "      <td>image_fa48cb45-a21b-45e1-9e9d-a5a2f10c8e28</td>\n",
       "      <td>False</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>Mumbai Hustle</td>\n",
       "      <td>None</td>\n",
       "      <td>227.72</td>\n",
       "      <td>web</td>\n",
       "      <td>gen</td>\n",
       "      <td></td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>63</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>1</td>\n",
       "      <td>True</td>\n",
       "      <td>4.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>fa48cb45-a21b-45e1-9e9d-a5a2f10c8e28</td>\n",
       "      <td>1.984127e+11</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>257.273196</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2024-09-02</td>\n",
       "      <td>19</td>\n",
       "      <td>1.129779</td>\n",
       "      <td>city of dreams man the hustle never ends from ...</td>\n",
       "      <td>0.2081</td>\n",
       "      <td>True</td>\n",
       "      <td>high beat rap</td>\n",
       "      <td>gen</td>\n",
       "      <td>False</td>\n",
       "      <td>[Verse]\\nCity of dreams, man, the hustle never...</td>\n",
       "      <td>True</td>\n",
       "      <td>0</td>\n",
       "      <td>[chirp-v3p5-engine-t-3, chirp-v3p5-engine-t-3]</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>v_36</td>\n",
       "      <td>Write a rap on hustling in Mumbai city in Engl...</td>\n",
       "      <td>cfg_12</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.0</td>\n",
       "      <td>-0.0150</td>\n",
       "      <td>fa48cb45-a21b-45e1-9e9d-a5a2f10c8e28</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>True</td>\n",
       "      <td>131.76</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1092</td>\n",
       "      <td>14201171</td>\n",
       "      <td>6acd28f7-5dd3-4891-bee0-d1ab84c5d1c0</td>\n",
       "      <td>2024-08-29 20:02:16.198929+00:00</td>\n",
       "      <td>2024-08-29 20:02:16.198936+00:00</td>\n",
       "      <td>200.582993</td>\n",
       "      <td>{'tags': 'Tech house remix introperspective Ba...</td>\n",
       "      <td>599094</td>\n",
       "      <td>complete</td>\n",
       "      <td>016250b5-11b4-456d-a3dd-61b5e396f03e</td>\n",
       "      <td>True</td>\n",
       "      <td>6acd28f7-5dd3-4891-bee0-d1ab84c5d1c0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>chirp-v3p5-engine-t-3</td>\n",
       "      <td>[Verse]\\nTake off your clothes\\nTake it all of...</td>\n",
       "      <td>False</td>\n",
       "      <td>image_6acd28f7-5dd3-4891-bee0-d1ab84c5d1c0</td>\n",
       "      <td>False</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>Today Tomorrow Everyday</td>\n",
       "      <td>None</td>\n",
       "      <td>240.00</td>\n",
       "      <td>web</td>\n",
       "      <td>gen</td>\n",
       "      <td></td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>36</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>0</td>\n",
       "      <td>False</td>\n",
       "      <td>1.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>6acd28f7-5dd3-4891-bee0-d1ab84c5d1c0</td>\n",
       "      <td>1.983523e+11</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>14.018092</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2024-09-02</td>\n",
       "      <td>19</td>\n",
       "      <td>0.058409</td>\n",
       "      <td>take off your clothes take it all off today to...</td>\n",
       "      <td>0.8239</td>\n",
       "      <td>True</td>\n",
       "      <td>Tech house remix introperspective Bass club</td>\n",
       "      <td>gen</td>\n",
       "      <td>False</td>\n",
       "      <td>[Verse]\\nTake off your clothes\\nTake it all of...</td>\n",
       "      <td>True</td>\n",
       "      <td>0</td>\n",
       "      <td>[chirp-v3p5-engine-t-3, chirp-v3p5-engine-t-3]</td>\n",
       "      <td>None</td>\n",
       "      <td></td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>v_37</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>0.8239</td>\n",
       "      <td>6acd28f7-5dd3-4891-bee0-d1ab84c5d1c0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>True</td>\n",
       "      <td>184.00</td>\n",
       "      <td>-5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>1093</td>\n",
       "      <td>14201170</td>\n",
       "      <td>02fa6991-5f01-4636-a3f8-b015354affa9</td>\n",
       "      <td>2024-08-29 20:02:16.198793+00:00</td>\n",
       "      <td>2024-08-29 20:02:16.198815+00:00</td>\n",
       "      <td>223.832865</td>\n",
       "      <td>{'tags': 'Tech house remix introperspective Ba...</td>\n",
       "      <td>599094</td>\n",
       "      <td>complete</td>\n",
       "      <td>016250b5-11b4-456d-a3dd-61b5e396f03e</td>\n",
       "      <td>True</td>\n",
       "      <td>02fa6991-5f01-4636-a3f8-b015354affa9</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>chirp-v3p5-engine-t-3</td>\n",
       "      <td>[Verse]\\nTake off your clothes\\nTake it all of...</td>\n",
       "      <td>False</td>\n",
       "      <td>image_02fa6991-5f01-4636-a3f8-b015354affa9</td>\n",
       "      <td>False</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "      <td>0</td>\n",
       "      <td>Today Tomorrow Everyday</td>\n",
       "      <td>None</td>\n",
       "      <td>238.96</td>\n",
       "      <td>web</td>\n",
       "      <td>gen</td>\n",
       "      <td></td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>36</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>1</td>\n",
       "      <td>True</td>\n",
       "      <td>8.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>02fa6991-5f01-4636-a3f8-b015354affa9</td>\n",
       "      <td>1.985729e+11</td>\n",
       "      <td>8.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>419.977106</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2024-09-02</td>\n",
       "      <td>19</td>\n",
       "      <td>1.757521</td>\n",
       "      <td>take off your clothes take it all off today to...</td>\n",
       "      <td>0.4155</td>\n",
       "      <td>True</td>\n",
       "      <td>Tech house remix introperspective Bass club</td>\n",
       "      <td>gen</td>\n",
       "      <td>False</td>\n",
       "      <td>[Verse]\\nTake off your clothes\\nTake it all of...</td>\n",
       "      <td>True</td>\n",
       "      <td>0</td>\n",
       "      <td>[chirp-v3p5-engine-t-3, chirp-v3p5-engine-t-3]</td>\n",
       "      <td>None</td>\n",
       "      <td></td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>v_37</td>\n",
       "      <td>None</td>\n",
       "      <td>max_cfg_12_ntag_3</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.0</td>\n",
       "      <td>-0.4084</td>\n",
       "      <td>02fa6991-5f01-4636-a3f8-b015354affa9</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>True</td>\n",
       "      <td>-1.04</td>\n",
       "      <td>7.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>1296</td>\n",
       "      <td>28464188</td>\n",
       "      <td>a914b325-d74c-4fec-938a-6db0944fd584</td>\n",
       "      <td>2024-09-01 20:27:49.874962+00:00</td>\n",
       "      <td>2024-09-01 20:27:49.874968+00:00</td>\n",
       "      <td>210.299322</td>\n",
       "      <td>{'tags': 'blues male vocals, violin, acoustic ...</td>\n",
       "      <td>1499044</td>\n",
       "      <td>complete</td>\n",
       "      <td>019b1def-aa22-47ee-9681-2d5347378479</td>\n",
       "      <td>True</td>\n",
       "      <td>a914b325-d74c-4fec-938a-6db0944fd584</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>chirp-v3p5-engine-t-3</td>\n",
       "      <td>[Verse]\\nUnder the moonlight glow\\nWhere shado...</td>\n",
       "      <td>False</td>\n",
       "      <td>image_a914b325-d74c-4fec-938a-6db0944fd584</td>\n",
       "      <td>False</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "      <td>Gold for Souls</td>\n",
       "      <td>None</td>\n",
       "      <td>240.00</td>\n",
       "      <td>web</td>\n",
       "      <td>gen</td>\n",
       "      <td></td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>339</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>0</td>\n",
       "      <td>False</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>a914b325-d74c-4fec-938a-6db0944fd584</td>\n",
       "      <td>1.983693e+11</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>63.337622</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2024-09-02</td>\n",
       "      <td>19</td>\n",
       "      <td>0.263907</td>\n",
       "      <td>under the moonlight glow where shadows softly ...</td>\n",
       "      <td>0.1619</td>\n",
       "      <td>True</td>\n",
       "      <td>blues male vocals, violin, acoustic rock, melo...</td>\n",
       "      <td>gen</td>\n",
       "      <td>False</td>\n",
       "      <td>[Verse]\\nUnder the moonlight glow\\nWhere shado...</td>\n",
       "      <td>True</td>\n",
       "      <td>10</td>\n",
       "      <td>[chirp-v3p5-engine-t-3, chirp-v3p5-engine-t-3]</td>\n",
       "      <td>None</td>\n",
       "      <td></td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>v_39</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.1619</td>\n",
       "      <td>a914b325-d74c-4fec-938a-6db0944fd584</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>True</td>\n",
       "      <td>116.00</td>\n",
       "      <td>-4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>1297</td>\n",
       "      <td>28464187</td>\n",
       "      <td>f226a18b-aed7-4e82-bcaa-5fed4126e25d</td>\n",
       "      <td>2024-09-01 20:27:49.874878+00:00</td>\n",
       "      <td>2024-09-01 20:27:49.874889+00:00</td>\n",
       "      <td>206.660231</td>\n",
       "      <td>{'tags': 'blues male vocals, violin, acoustic ...</td>\n",
       "      <td>1499044</td>\n",
       "      <td>complete</td>\n",
       "      <td>019b1def-aa22-47ee-9681-2d5347378479</td>\n",
       "      <td>True</td>\n",
       "      <td>f226a18b-aed7-4e82-bcaa-5fed4126e25d</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>chirp-v3p5-engine-t-3</td>\n",
       "      <td>[Verse]\\nUnder the moonlight glow\\nWhere shado...</td>\n",
       "      <td>False</td>\n",
       "      <td>f226a18b-aed7-4e82-bcaa-5fed4126e25d_907feb54</td>\n",
       "      <td>False</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "      <td>Gold for Souls</td>\n",
       "      <td>None</td>\n",
       "      <td>237.80</td>\n",
       "      <td>web</td>\n",
       "      <td>gen</td>\n",
       "      <td></td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>339</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>1</td>\n",
       "      <td>True</td>\n",
       "      <td>5.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>f226a18b-aed7-4e82-bcaa-5fed4126e25d</td>\n",
       "      <td>1.985552e+11</td>\n",
       "      <td>5.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>469.674013</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2024-09-02</td>\n",
       "      <td>19</td>\n",
       "      <td>1.975080</td>\n",
       "      <td>under the moonlight glow where shadows softly ...</td>\n",
       "      <td>0.1123</td>\n",
       "      <td>True</td>\n",
       "      <td>blues male vocals, violin, acoustic rock, melo...</td>\n",
       "      <td>gen</td>\n",
       "      <td>False</td>\n",
       "      <td>[Verse]\\nUnder the moonlight glow\\nWhere shado...</td>\n",
       "      <td>True</td>\n",
       "      <td>10</td>\n",
       "      <td>[chirp-v3p5-engine-t-3, chirp-v3p5-engine-t-3]</td>\n",
       "      <td>None</td>\n",
       "      <td></td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>v_39</td>\n",
       "      <td>None</td>\n",
       "      <td>max_cfg_12_ntag_3</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.0</td>\n",
       "      <td>-0.0496</td>\n",
       "      <td>f226a18b-aed7-4e82-bcaa-5fed4126e25d</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>True</td>\n",
       "      <td>-2.20</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>2644</td>\n",
       "      <td>21546198</td>\n",
       "      <td>8e0bde2c-9f8e-4739-86a2-516024492158</td>\n",
       "      <td>2024-08-31 09:52:01.959526+00:00</td>\n",
       "      <td>2024-08-31 09:52:01.959548+00:00</td>\n",
       "      <td>215.618332</td>\n",
       "      <td>{'tags': 'Krautrock, Berlin School, Kosmische ...</td>\n",
       "      <td>24249474</td>\n",
       "      <td>complete</td>\n",
       "      <td>0340e772-5bff-4700-aa56-b825900bd0e9</td>\n",
       "      <td>True</td>\n",
       "      <td>8e0bde2c-9f8e-4739-86a2-516024492158</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>chirp-v3p5-engine-t-3</td>\n",
       "      <td>[Short Instrumental Intro]\\n\\n[Verse 1]\\nFortu...</td>\n",
       "      <td>False</td>\n",
       "      <td>image_8e0bde2c-9f8e-4739-86a2-516024492158</td>\n",
       "      <td>False</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>Fortunas Rad</td>\n",
       "      <td>None</td>\n",
       "      <td>240.00</td>\n",
       "      <td>web</td>\n",
       "      <td>gen</td>\n",
       "      <td></td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>193</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>0</td>\n",
       "      <td>False</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>8e0bde2c-9f8e-4739-86a2-516024492158</td>\n",
       "      <td>1.984647e+11</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>192.896565</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2024-09-02</td>\n",
       "      <td>19</td>\n",
       "      <td>0.803736</td>\n",
       "      <td>fortunas rad du drehst so schnell wie der mond...</td>\n",
       "      <td>0.0647</td>\n",
       "      <td>True</td>\n",
       "      <td>Krautrock, Berlin School, Kosmische Musik,  Sy...</td>\n",
       "      <td>gen</td>\n",
       "      <td>False</td>\n",
       "      <td>[Short Instrumental Intro]\\n\\n[Verse 1]\\nFortu...</td>\n",
       "      <td>True</td>\n",
       "      <td>10</td>\n",
       "      <td>[chirp-v3p5-engine-t-3, chirp-v3p5-engine-t-3]</td>\n",
       "      <td>None</td>\n",
       "      <td></td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>v_39</td>\n",
       "      <td>None</td>\n",
       "      <td>max_cfg_12_ntag_3</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0647</td>\n",
       "      <td>8e0bde2c-9f8e-4739-86a2-516024492158</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>True</td>\n",
       "      <td>0.00</td>\n",
       "      <td>-3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>2645</td>\n",
       "      <td>21546199</td>\n",
       "      <td>edff3263-8e98-4cf5-a9e2-547396b3bcdf</td>\n",
       "      <td>2024-08-31 09:52:01.959663+00:00</td>\n",
       "      <td>2024-08-31 09:52:01.959672+00:00</td>\n",
       "      <td>209.053880</td>\n",
       "      <td>{'tags': 'Krautrock, Berlin School, Kosmische ...</td>\n",
       "      <td>24249474</td>\n",
       "      <td>complete</td>\n",
       "      <td>0340e772-5bff-4700-aa56-b825900bd0e9</td>\n",
       "      <td>True</td>\n",
       "      <td>edff3263-8e98-4cf5-a9e2-547396b3bcdf</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>chirp-v3p5-engine-t-3</td>\n",
       "      <td>[Short Instrumental Intro]\\n\\n[Verse 1]\\nFortu...</td>\n",
       "      <td>False</td>\n",
       "      <td>image_edff3263-8e98-4cf5-a9e2-547396b3bcdf</td>\n",
       "      <td>False</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "      <td>Fortunas Rad</td>\n",
       "      <td>None</td>\n",
       "      <td>240.00</td>\n",
       "      <td>web</td>\n",
       "      <td>gen</td>\n",
       "      <td></td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>193</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>1</td>\n",
       "      <td>True</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>258.999979</td>\n",
       "      <td>8.0</td>\n",
       "      <td>False</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>edff3263-8e98-4cf5-a9e2-547396b3bcdf</td>\n",
       "      <td>1.985132e+11</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>277.729597</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2024-09-02</td>\n",
       "      <td>19</td>\n",
       "      <td>1.157207</td>\n",
       "      <td>fortunas rad du drehst so schnell wie der mond...</td>\n",
       "      <td>0.0758</td>\n",
       "      <td>True</td>\n",
       "      <td>Krautrock, Berlin School, Kosmische Musik,  Sy...</td>\n",
       "      <td>gen</td>\n",
       "      <td>False</td>\n",
       "      <td>[Short Instrumental Intro]\\n\\n[Verse 1]\\nFortu...</td>\n",
       "      <td>True</td>\n",
       "      <td>10</td>\n",
       "      <td>[chirp-v3p5-engine-t-3, chirp-v3p5-engine-t-3]</td>\n",
       "      <td>None</td>\n",
       "      <td></td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>v_39</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0111</td>\n",
       "      <td>edff3263-8e98-4cf5-a9e2-547396b3bcdf</td>\n",
       "      <td>240.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>True</td>\n",
       "      <td>0.00</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   level_0     index                                  id_x                       created_at                       updated_at   time_used                                           metadata   user_id    status                            request_id  is_generated                                 s3_id  upvote_count  batch_index             model_name                                        prompt_text  is_deleted                                    image_s3_id  is_public  dislike_count  flag_count  play_count  skip_count                    title                      continued_parent  duration source clip_type    task  is_pro_user  is_in_playlist  has_stems  user_n_clips  upvoted  downvoted  has_continued  part_of_concat  has_action  flagged  deleted  pos_preference  neg_preference  diff_preference  preference  reaction_play_count  reaction_pro_play_count  total_start_s  total_clip_s  concat_play_counts concat_in_playlist  concat_likes  concat_dislikes                                str_id  \\\n",
       "0      636  20680078  1ca5b266-fadd-4bb3-8db0-13274ee96c20 2024-08-31 04:31:44.622797+00:00 2024-08-31 04:31:44.622804+00:00  107.232122  {'tags': '80s,   Synthwave,   punk wave,   ele...  14886814  complete  00d00a69-e7f7-49cf-acee-81e4e5943f65          True  1ca5b266-fadd-4bb3-8db0-13274ee96c20             0            1  chirp-v3p5-engine-t-3  Free Palestine\\nFree Palestine\\n\\n[Piano Solo]...       False     image_1ca5b266-fadd-4bb3-8db0-13274ee96c20      False              0           0           1           0          Sunshine Dreams  0c1e9ca4-d59c-43a7-bc1a-8b25e06049af    120.00    web       gen  extend         True           False      False           164    False      False          False           False       False    False    False           False           False                0       False                  1.0                      1.0            NaN           NaN                 NaN               None           NaN              NaN  1ca5b266-fadd-4bb3-8db0-13274ee96c20   \n",
       "1      637  20680077  dfc2dd38-34bc-40e6-a1f6-e6240a83776d 2024-08-31 04:31:44.622684+00:00 2024-08-31 04:31:44.622700+00:00  111.774462  {'tags': '80s,   Synthwave,   punk wave,   ele...  14886814  complete  00d00a69-e7f7-49cf-acee-81e4e5943f65          True  dfc2dd38-34bc-40e6-a1f6-e6240a83776d             1            0  chirp-v3p5-engine-t-3  Free Palestine\\nFree Palestine\\n\\n[Piano Solo]...       False     image_dfc2dd38-34bc-40e6-a1f6-e6240a83776d      False              0           0           5           0          Sunshine Dreams  0c1e9ca4-d59c-43a7-bc1a-8b25e06049af    120.00    web       gen  extend         True           False      False           164     True      False          False            True       False    False    False            True           False                1        True                  5.0                      5.0           17.0    136.999979                 4.0              False           1.0              0.0  dfc2dd38-34bc-40e6-a1f6-e6240a83776d   \n",
       "2     1086   3336343  0d7ab351-b054-40b2-a2f4-877a1e478be2 2024-08-27 14:53:45.101812+00:00 2024-08-27 14:53:45.101818+00:00   85.035722  {'tags': 'high beat rap', 'task': None, 'type'...   6026074  complete  01611dd1-8a94-4475-a9d8-7845b5fb4ecd          True  0d7ab351-b054-40b2-a2f4-877a1e478be2             0            1  chirp-v3p5-engine-t-3  [Verse]\\nCity of dreams, man, the hustle never...       False     image_0d7ab351-b054-40b2-a2f4-877a1e478be2      False              1           0           1           0            Mumbai Hustle                                  None     95.96    web       gen                False           False      False            63    False       True          False           False       False    False    False           False            True               -1       False                  1.0                      NaN            NaN           NaN                 NaN               None           NaN              NaN  0d7ab351-b054-40b2-a2f4-877a1e478be2   \n",
       "3     1087   3336342  fa48cb45-a21b-45e1-9e9d-a5a2f10c8e28 2024-08-27 14:53:45.101705+00:00 2024-08-27 14:53:45.101720+00:00  191.813621  {'tags': 'high beat rap', 'task': None, 'type'...   6026074  complete  01611dd1-8a94-4475-a9d8-7845b5fb4ecd          True  fa48cb45-a21b-45e1-9e9d-a5a2f10c8e28             1            0  chirp-v3p5-engine-t-3  [Verse]\\nCity of dreams, man, the hustle never...       False     image_fa48cb45-a21b-45e1-9e9d-a5a2f10c8e28      False              0           0           4           0            Mumbai Hustle                                  None    227.72    web       gen                False           False      False            63     True      False          False           False       False    False    False            True           False                1        True                  4.0                      NaN            NaN           NaN                 NaN               None           NaN              NaN  fa48cb45-a21b-45e1-9e9d-a5a2f10c8e28   \n",
       "4     1092  14201171  6acd28f7-5dd3-4891-bee0-d1ab84c5d1c0 2024-08-29 20:02:16.198929+00:00 2024-08-29 20:02:16.198936+00:00  200.582993  {'tags': 'Tech house remix introperspective Ba...    599094  complete  016250b5-11b4-456d-a3dd-61b5e396f03e          True  6acd28f7-5dd3-4891-bee0-d1ab84c5d1c0             0            1  chirp-v3p5-engine-t-3  [Verse]\\nTake off your clothes\\nTake it all of...       False     image_6acd28f7-5dd3-4891-bee0-d1ab84c5d1c0      False              0           0           1           0  Today Tomorrow Everyday                                  None    240.00    web       gen                False           False      False            36    False      False          False           False       False    False    False           False           False                0       False                  1.0                      NaN            NaN           NaN                 NaN               None           NaN              NaN  6acd28f7-5dd3-4891-bee0-d1ab84c5d1c0   \n",
       "5     1093  14201170  02fa6991-5f01-4636-a3f8-b015354affa9 2024-08-29 20:02:16.198793+00:00 2024-08-29 20:02:16.198815+00:00  223.832865  {'tags': 'Tech house remix introperspective Ba...    599094  complete  016250b5-11b4-456d-a3dd-61b5e396f03e          True  02fa6991-5f01-4636-a3f8-b015354affa9             1            0  chirp-v3p5-engine-t-3  [Verse]\\nTake off your clothes\\nTake it all of...       False     image_02fa6991-5f01-4636-a3f8-b015354affa9      False              0           0           8           0  Today Tomorrow Everyday                                  None    238.96    web       gen                False           False      False            36     True      False          False           False       False    False    False            True           False                1        True                  8.0                      NaN            NaN           NaN                 NaN               None           NaN              NaN  02fa6991-5f01-4636-a3f8-b015354affa9   \n",
       "6     1296  28464188  a914b325-d74c-4fec-938a-6db0944fd584 2024-09-01 20:27:49.874962+00:00 2024-09-01 20:27:49.874968+00:00  210.299322  {'tags': 'blues male vocals, violin, acoustic ...   1499044  complete  019b1def-aa22-47ee-9681-2d5347378479          True  a914b325-d74c-4fec-938a-6db0944fd584             0            1  chirp-v3p5-engine-t-3  [Verse]\\nUnder the moonlight glow\\nWhere shado...       False     image_a914b325-d74c-4fec-938a-6db0944fd584      False              0           0           3           0           Gold for Souls                                  None    240.00    web       gen                 True           False      False           339    False      False          False           False       False    False    False           False           False                0       False                  3.0                      3.0            NaN           NaN                 NaN               None           NaN              NaN  a914b325-d74c-4fec-938a-6db0944fd584   \n",
       "7     1297  28464187  f226a18b-aed7-4e82-bcaa-5fed4126e25d 2024-09-01 20:27:49.874878+00:00 2024-09-01 20:27:49.874889+00:00  206.660231  {'tags': 'blues male vocals, violin, acoustic ...   1499044  complete  019b1def-aa22-47ee-9681-2d5347378479          True  f226a18b-aed7-4e82-bcaa-5fed4126e25d             1            0  chirp-v3p5-engine-t-3  [Verse]\\nUnder the moonlight glow\\nWhere shado...       False  f226a18b-aed7-4e82-bcaa-5fed4126e25d_907feb54      False              0           0           5           0           Gold for Souls                                  None    237.80    web       gen                 True           False      False           339     True      False          False           False       False    False    False            True           False                1        True                  5.0                      5.0            NaN           NaN                 NaN               None           NaN              NaN  f226a18b-aed7-4e82-bcaa-5fed4126e25d   \n",
       "8     2644  21546198  8e0bde2c-9f8e-4739-86a2-516024492158 2024-08-31 09:52:01.959526+00:00 2024-08-31 09:52:01.959548+00:00  215.618332  {'tags': 'Krautrock, Berlin School, Kosmische ...  24249474  complete  0340e772-5bff-4700-aa56-b825900bd0e9          True  8e0bde2c-9f8e-4739-86a2-516024492158             0            0  chirp-v3p5-engine-t-3  [Short Instrumental Intro]\\n\\n[Verse 1]\\nFortu...       False     image_8e0bde2c-9f8e-4739-86a2-516024492158      False              0           0           2           0             Fortunas Rad                                  None    240.00    web       gen                 True           False      False           193    False      False          False           False       False    False    False           False           False                0       False                  2.0                      2.0            NaN           NaN                 NaN               None           NaN              NaN  8e0bde2c-9f8e-4739-86a2-516024492158   \n",
       "9     2645  21546199  edff3263-8e98-4cf5-a9e2-547396b3bcdf 2024-08-31 09:52:01.959663+00:00 2024-08-31 09:52:01.959672+00:00  209.053880  {'tags': 'Krautrock, Berlin School, Kosmische ...  24249474  complete  0340e772-5bff-4700-aa56-b825900bd0e9          True  edff3263-8e98-4cf5-a9e2-547396b3bcdf             0            1  chirp-v3p5-engine-t-3  [Short Instrumental Intro]\\n\\n[Verse 1]\\nFortu...       False     image_edff3263-8e98-4cf5-a9e2-547396b3bcdf      False              0           0           3           0             Fortunas Rad                                  None    240.00    web       gen                 True           False      False           193    False      False           True            True       False    False    False            True           False                1        True                  3.0                      3.0            0.0    258.999979                 8.0              False           1.0              0.0  edff3263-8e98-4cf5-a9e2-547396b3bcdf   \n",
       "\n",
       "           id_y  total_play_count  auto_play_count  total_play_time  total_play_count_hour  auto_play_count_hour  total_play_time_hour      p_date p_hour  norm_play_frac                                cleaned_prompt_text     cer  is_30b                                               tags type  is_bot                                             prompt  stream  priority                                      experiment gpt_prompt negative_tags  refund_credits  make_instrumental experiment_version                             gpt_description_prompt   param_experiment infill                                            history  options  continue_at                              continued_from_prompt has_vocal concat_history is_audio_upload_tos_accepted continued_aligned_prompt audio_prompt_id stem_type stem_from_id error_type error_message  pos_diff_preference  cer_diff_preference                                    id  original_duration_s  has_continue_and_start_continue_at  good_continue_at  \\\n",
       "0  1.984543e+11               1.0              1.0        57.745253                    0.0                   0.0                   0.0  2024-09-02     19        0.481210  free palestine free palestine long live palest...  0.5126    True  80s,   Synthwave,   punk wave,   electronic,  ...  gen   False  Free Palestine\\nFree Palestine\\n\\n[Piano Solo]...    True        10  [chirp-v3p5-engine-t-3, chirp-v3p5-engine-t-3]       None                         False              False               v_39                                               None                NaN  False  [{'id': '0c1e9ca4-d59c-43a7-bc1a-8b25e06049af'...      NaN         17.0  Free Palestine\\nFree Palestine\\n\\n[Piano Solo]...       NaN            NaN                          NaN                     None             NaN       NaN          NaN        NaN           NaN                  0.0               0.5126  1ca5b266-fadd-4bb3-8db0-13274ee96c20                  NaN                                 NaN              True   \n",
       "1  1.983854e+11               5.0              0.0       439.986712                    0.0                   0.0                   0.0  2024-09-02     19        3.666556  free palestine free palestine long live palest...  0.5462    True  80s,   Synthwave,   punk wave,   electronic,  ...  gen   False  Free Palestine\\nFree Palestine\\n\\n[Piano Solo]...    True        10  [chirp-v3p5-engine-t-3, chirp-v3p5-engine-t-3]       None                         False              False               v_39                                               None                NaN  False  [{'id': '0c1e9ca4-d59c-43a7-bc1a-8b25e06049af'...      NaN         17.0  Free Palestine\\nFree Palestine\\n\\n[Piano Solo]...       NaN            NaN                          NaN                     None             NaN       NaN          NaN        NaN           NaN                  1.0               0.0336  dfc2dd38-34bc-40e6-a1f6-e6240a83776d                137.0                                 NaN              True   \n",
       "2  1.984515e+11               1.0              0.0        13.648086                    0.0                   0.0                   0.0  2024-09-02     19        0.142227  city of dreams man the hustle never ends from ...  0.2231    True                                      high beat rap  gen   False  [Verse]\\nCity of dreams, man, the hustle never...    True         0  [chirp-v3p5-engine-t-3, chirp-v3p5-engine-t-3]       None          None           False              False               v_36  Write a rap on hustling in Mumbai city in Engl...                NaN    NaN                                                NaN      NaN          NaN                                                NaN       NaN            NaN                          NaN                      NaN             NaN       NaN          NaN        NaN           NaN                 -2.0              -0.0465  0d7ab351-b054-40b2-a2f4-877a1e478be2                  NaN                                 NaN              True   \n",
       "3  1.984127e+11               3.0              0.0       257.273196                    0.0                   0.0                   0.0  2024-09-02     19        1.129779  city of dreams man the hustle never ends from ...  0.2081    True                                      high beat rap  gen   False  [Verse]\\nCity of dreams, man, the hustle never...    True         0  [chirp-v3p5-engine-t-3, chirp-v3p5-engine-t-3]       None          None           False              False               v_36  Write a rap on hustling in Mumbai city in Engl...             cfg_12    NaN                                                NaN      NaN          NaN                                                NaN       NaN            NaN                          NaN                      NaN             NaN       NaN          NaN        NaN           NaN                  2.0              -0.0150  fa48cb45-a21b-45e1-9e9d-a5a2f10c8e28                  NaN                                 NaN              True   \n",
       "4  1.983523e+11               1.0              0.0        14.018092                    0.0                   0.0                   0.0  2024-09-02     19        0.058409  take off your clothes take it all off today to...  0.8239    True        Tech house remix introperspective Bass club  gen   False  [Verse]\\nTake off your clothes\\nTake it all of...    True         0  [chirp-v3p5-engine-t-3, chirp-v3p5-engine-t-3]       None                         False              False               v_37                                               None                NaN    NaN                                                NaN      NaN          NaN                                                NaN       NaN            NaN                          NaN                      NaN             NaN       NaN          NaN        NaN           NaN                 -1.0               0.8239  6acd28f7-5dd3-4891-bee0-d1ab84c5d1c0                  NaN                                 NaN              True   \n",
       "5  1.985729e+11               8.0              0.0       419.977106                    0.0                   0.0                   0.0  2024-09-02     19        1.757521  take off your clothes take it all off today to...  0.4155    True        Tech house remix introperspective Bass club  gen   False  [Verse]\\nTake off your clothes\\nTake it all of...    True         0  [chirp-v3p5-engine-t-3, chirp-v3p5-engine-t-3]       None                         False              False               v_37                                               None  max_cfg_12_ntag_3    NaN                                                NaN      NaN          NaN                                                NaN       NaN            NaN                          NaN                      NaN             NaN       NaN          NaN        NaN           NaN                  1.0              -0.4084  02fa6991-5f01-4636-a3f8-b015354affa9                  NaN                                 NaN              True   \n",
       "6  1.983693e+11               3.0              1.0        63.337622                    0.0                   0.0                   0.0  2024-09-02     19        0.263907  under the moonlight glow where shadows softly ...  0.1619    True  blues male vocals, violin, acoustic rock, melo...  gen   False  [Verse]\\nUnder the moonlight glow\\nWhere shado...    True        10  [chirp-v3p5-engine-t-3, chirp-v3p5-engine-t-3]       None                         False              False               v_39                                               None                NaN    NaN                                                NaN      NaN          NaN                                                NaN       NaN            NaN                          NaN                      NaN             NaN       NaN          NaN        NaN           NaN                  0.0               0.1619  a914b325-d74c-4fec-938a-6db0944fd584                  NaN                                 NaN              True   \n",
       "7  1.985552e+11               5.0              0.0       469.674013                    0.0                   0.0                   0.0  2024-09-02     19        1.975080  under the moonlight glow where shadows softly ...  0.1123    True  blues male vocals, violin, acoustic rock, melo...  gen   False  [Verse]\\nUnder the moonlight glow\\nWhere shado...    True        10  [chirp-v3p5-engine-t-3, chirp-v3p5-engine-t-3]       None                         False              False               v_39                                               None  max_cfg_12_ntag_3    NaN                                                NaN      NaN          NaN                                                NaN       NaN            NaN                          NaN                      NaN             NaN       NaN          NaN        NaN           NaN                  1.0              -0.0496  f226a18b-aed7-4e82-bcaa-5fed4126e25d                  NaN                                 NaN              True   \n",
       "8  1.984647e+11               2.0              0.0       192.896565                    0.0                   0.0                   0.0  2024-09-02     19        0.803736  fortunas rad du drehst so schnell wie der mond...  0.0647    True  Krautrock, Berlin School, Kosmische Musik,  Sy...  gen   False  [Short Instrumental Intro]\\n\\n[Verse 1]\\nFortu...    True        10  [chirp-v3p5-engine-t-3, chirp-v3p5-engine-t-3]       None                         False              False               v_39                                               None  max_cfg_12_ntag_3    NaN                                                NaN      NaN          NaN                                                NaN       NaN            NaN                          NaN                      NaN             NaN       NaN          NaN        NaN           NaN                  0.0               0.0647  8e0bde2c-9f8e-4739-86a2-516024492158                  NaN                                 NaN              True   \n",
       "9  1.985132e+11               3.0              0.0       277.729597                    0.0                   0.0                   0.0  2024-09-02     19        1.157207  fortunas rad du drehst so schnell wie der mond...  0.0758    True  Krautrock, Berlin School, Kosmische Musik,  Sy...  gen   False  [Short Instrumental Intro]\\n\\n[Verse 1]\\nFortu...    True        10  [chirp-v3p5-engine-t-3, chirp-v3p5-engine-t-3]       None                         False              False               v_39                                               None                NaN    NaN                                                NaN      NaN          NaN                                                NaN       NaN            NaN                          NaN                      NaN             NaN       NaN          NaN        NaN           NaN                  1.0               0.0111  edff3263-8e98-4cf5-a9e2-547396b3bcdf                240.0                                 NaN              True   \n",
       "\n",
       "   duration_rel_diff  play_rel_diff  \n",
       "0            -120.00           -6.0  \n",
       "1               0.00            4.0  \n",
       "2             -23.04          -13.0  \n",
       "3             131.76            3.0  \n",
       "4             184.00           -5.0  \n",
       "5              -1.04            7.0  \n",
       "6             116.00           -4.0  \n",
       "7              -2.20            2.0  \n",
       "8               0.00           -3.0  \n",
       "9               0.00            1.0  "
      ]
     },
     "execution_count": 49,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "val_df.head(n=10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "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.10.14"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
