{ "cells": [ { "cell_type": "markdown", "id": "65aec129", "metadata": {}, "source": [ "# Example to show" ] }, { "cell_type": "code", "execution_count": 1, "id": "efdc584c", "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "\n", "df = pd.read_csv('meta.csv')" ] }, { "cell_type": "code", "execution_count": 2, "id": "a067d40c", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Models with task = 'TextClassification':\n", "['DEEPSEEK' 'LLAMA' 'MISTRAL' 'BARTBASE' 'BARTLARGE' 'BERTBASE'\n", " 'BERTLARGE' 'DISTILBERT']\n", "\n", "Total number of TextClassification models: 8\n" ] } ], "source": [ "# Filter rows where the task is 'TextClassification'\n", "filtered = df[df['task'] == 'TextClassification']\n", "\n", "# Get the unique model names under this task\n", "models = filtered['model'].unique()\n", "\n", "print(\"Models with task = 'TextClassification':\")\n", "print(models)\n", "\n", "# (Optional) print how many models there are\n", "print(f\"\\nTotal number of TextClassification models: {len(models)}\")" ] }, { "cell_type": "code", "execution_count": 3, "id": "2d875356", "metadata": {}, "outputs": [], "source": [ "import re\n", "import pandas as pd\n", "\n", "# ==== Power-related Metrics Description Text ====\n", "power_text = \"\"\"\n", "Turbostat:PkgWatt.*.*[W] — Package-level power consumption (watts). (sampled)\n", "Turbostat:RAMWatt.*.*[W] — RAM subsystem power (watts). (sampled)\n", "GPU: power.draw.*.*[W] — GPU power draw (watts) for the sampling period (sampled).\n", "GPU: power.draw.average.*.*[W] — Average power draw (watts). (sampled/aggregate)\n", "GPU: power.draw.instant.*.*[W] — Instantaneous power draw reading (watts). (instant)\n", "\"\"\"\n", "\n", "# ==== Extract Metrics and Descriptions ====\n", "power_metrics = re.findall(r\"^([A-Za-z0-9_:.*\\[\\]]+)\\s+—\\s+(.*)$\", power_text, flags=re.M)\n", "df_metrics = pd.DataFrame(power_metrics, columns=[\"metric_pattern\", \"description\"])\n" ] }, { "cell_type": "code", "execution_count": 4, "id": "0a1046bd", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Reading: ./infer_separated/data_DEEPSEEKforInference_default_2025-04-26T09-41-59_htc-g003.txt\n", "Matched 6 columns:\n", "['Turbostat:PkgWatt.-.htc-g003[W]', 'Turbostat:PkgWatt.0.htc-g003[W]', 'Turbostat:PkgWatt.24.htc-g003[W]', 'Turbostat:RAMWatt.-.htc-g003[W]', 'Turbostat:RAMWatt.0.htc-g003[W]', 'Turbostat:RAMWatt.24.htc-g003[W]']\n" ] }, { "data": { "text/html": [ "
| \n", " | Turbostat:PkgWatt.-.htc-g003[W] | \n", "Turbostat:PkgWatt.0.htc-g003[W] | \n", "Turbostat:PkgWatt.24.htc-g003[W] | \n", "Turbostat:RAMWatt.-.htc-g003[W] | \n", "Turbostat:RAMWatt.0.htc-g003[W] | \n", "Turbostat:RAMWatt.24.htc-g003[W] | \n", "
|---|---|---|---|---|---|---|
| 0 | \n", "164.72 | \n", "87.840 | \n", "76.880 | \n", "101.62 | \n", "54.750 | \n", "46.870 | \n", "
| 1 | \n", "163.26 | \n", "87.720 | \n", "75.550 | \n", "101.34 | \n", "54.620 | \n", "46.720 | \n", "
| 2 | \n", "167.75 | \n", "89.220 | \n", "78.530 | \n", "101.55 | \n", "54.350 | \n", "47.210 | \n", "
| 3 | \n", "165.91 | \n", "88.365 | \n", "77.545 | \n", "101.43 | \n", "54.815 | \n", "46.605 | \n", "
| 4 | \n", "162.19 | \n", "86.480 | \n", "75.710 | \n", "99.98 | \n", "53.810 | \n", "46.170 | \n", "