feat(pre-commit): trim unnecessary notebook metadata from git history (#2127)

This commit is contained in:
Xuehai Pan
2024-11-23 05:04:51 +08:00
committed by GitHub
parent 62a4a339eb
commit 72f87b723b
8 changed files with 143 additions and 614 deletions

View File

@@ -32,14 +32,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T18:44:42.063503Z",
"iopub.status.busy": "2024-11-07T18:44:42.063379Z",
"iopub.status.idle": "2024-11-07T18:45:07.255300Z",
"shell.execute_reply": "2024-11-07T18:45:07.254547Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"from sglang.utils import (\n",
@@ -71,14 +64,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T18:45:07.258292Z",
"iopub.status.busy": "2024-11-07T18:45:07.257710Z",
"iopub.status.idle": "2024-11-07T18:45:07.611559Z",
"shell.execute_reply": "2024-11-07T18:45:07.610842Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"url = \"http://localhost:30010/generate\"\n",
@@ -99,14 +85,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T18:45:07.613911Z",
"iopub.status.busy": "2024-11-07T18:45:07.613746Z",
"iopub.status.idle": "2024-11-07T18:45:07.620286Z",
"shell.execute_reply": "2024-11-07T18:45:07.619779Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"url = \"http://localhost:30010/get_server_args\"\n",
@@ -130,14 +109,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T18:45:07.622407Z",
"iopub.status.busy": "2024-11-07T18:45:07.622267Z",
"iopub.status.idle": "2024-11-07T18:45:07.628290Z",
"shell.execute_reply": "2024-11-07T18:45:07.627793Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"url = \"http://localhost:30010/get_model_info\"\n",
@@ -162,14 +134,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T18:45:07.630585Z",
"iopub.status.busy": "2024-11-07T18:45:07.630235Z",
"iopub.status.idle": "2024-11-07T18:45:07.643498Z",
"shell.execute_reply": "2024-11-07T18:45:07.643007Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"url = \"http://localhost:30010/health_generate\"\n",
@@ -181,14 +146,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T18:45:07.645336Z",
"iopub.status.busy": "2024-11-07T18:45:07.645196Z",
"iopub.status.idle": "2024-11-07T18:45:07.650363Z",
"shell.execute_reply": "2024-11-07T18:45:07.649837Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"url = \"http://localhost:30010/health\"\n",
@@ -209,14 +167,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T18:45:07.652212Z",
"iopub.status.busy": "2024-11-07T18:45:07.652076Z",
"iopub.status.idle": "2024-11-07T18:45:07.658633Z",
"shell.execute_reply": "2024-11-07T18:45:07.658119Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"# flush cache\n",
@@ -239,14 +190,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T18:45:07.660468Z",
"iopub.status.busy": "2024-11-07T18:45:07.660325Z",
"iopub.status.idle": "2024-11-07T18:45:07.666476Z",
"shell.execute_reply": "2024-11-07T18:45:07.665984Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"# get_memory_pool_size\n",
@@ -269,14 +213,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T18:45:07.668242Z",
"iopub.status.busy": "2024-11-07T18:45:07.668108Z",
"iopub.status.idle": "2024-11-07T18:45:08.725709Z",
"shell.execute_reply": "2024-11-07T18:45:08.725021Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"# successful update with same architecture and size\n",
@@ -294,14 +231,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T18:45:08.727865Z",
"iopub.status.busy": "2024-11-07T18:45:08.727721Z",
"iopub.status.idle": "2024-11-07T18:45:11.165841Z",
"shell.execute_reply": "2024-11-07T18:45:11.165282Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"# failed update with different parameter size\n",
@@ -333,14 +263,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T18:45:11.167853Z",
"iopub.status.busy": "2024-11-07T18:45:11.167711Z",
"iopub.status.idle": "2024-11-07T18:45:39.542988Z",
"shell.execute_reply": "2024-11-07T18:45:39.542135Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"terminate_process(server_process)\n",
@@ -358,14 +281,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T18:45:39.545416Z",
"iopub.status.busy": "2024-11-07T18:45:39.545005Z",
"iopub.status.idle": "2024-11-07T18:45:39.588793Z",
"shell.execute_reply": "2024-11-07T18:45:39.588054Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"# successful encode for embedding model\n",
@@ -390,14 +306,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T18:45:39.590729Z",
"iopub.status.busy": "2024-11-07T18:45:39.590446Z",
"iopub.status.idle": "2024-11-07T18:45:59.660376Z",
"shell.execute_reply": "2024-11-07T18:45:59.659992Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"terminate_process(embedding_process)\n",
@@ -417,14 +326,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T18:45:59.661779Z",
"iopub.status.busy": "2024-11-07T18:45:59.661641Z",
"iopub.status.idle": "2024-11-07T18:46:00.475726Z",
"shell.execute_reply": "2024-11-07T18:46:00.475269Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"from transformers import AutoTokenizer\n",
@@ -454,15 +356,8 @@
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T18:46:00.477283Z",
"iopub.status.busy": "2024-11-07T18:46:00.477025Z",
"iopub.status.idle": "2024-11-07T18:46:00.525758Z",
"shell.execute_reply": "2024-11-07T18:46:00.525236Z"
}
},
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"terminate_process(reward_process)"
@@ -470,11 +365,6 @@
}
],
"metadata": {
"kernelspec": {
"display_name": "AlphaMeemory",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
@@ -484,8 +374,7 @@
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.7"
"pygments_lexer": "ipython3"
}
},
"nbformat": 4,