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

@@ -37,14 +37,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T18:46:54.813876Z",
"iopub.status.busy": "2024-11-07T18:46:54.813741Z",
"iopub.status.idle": "2024-11-07T18:47:24.015527Z",
"shell.execute_reply": "2024-11-07T18:47:24.014987Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"from sglang.utils import (\n",
@@ -77,14 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T18:47:24.018153Z",
"iopub.status.busy": "2024-11-07T18:47:24.017755Z",
"iopub.status.idle": "2024-11-07T18:47:25.374821Z",
"shell.execute_reply": "2024-11-07T18:47:25.374397Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"import openai\n",
@@ -117,14 +103,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T18:47:25.376617Z",
"iopub.status.busy": "2024-11-07T18:47:25.376495Z",
"iopub.status.idle": "2024-11-07T18:47:28.482537Z",
"shell.execute_reply": "2024-11-07T18:47:28.482125Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"response = client.chat.completions.create(\n",
@@ -163,14 +142,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T18:47:28.484819Z",
"iopub.status.busy": "2024-11-07T18:47:28.484673Z",
"iopub.status.idle": "2024-11-07T18:47:28.659814Z",
"shell.execute_reply": "2024-11-07T18:47:28.659435Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"stream = client.chat.completions.create(\n",
@@ -196,14 +168,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T18:47:28.661844Z",
"iopub.status.busy": "2024-11-07T18:47:28.661710Z",
"iopub.status.idle": "2024-11-07T18:47:30.168922Z",
"shell.execute_reply": "2024-11-07T18:47:30.168600Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"response = client.completions.create(\n",
@@ -232,14 +197,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T18:47:30.171319Z",
"iopub.status.busy": "2024-11-07T18:47:30.171176Z",
"iopub.status.idle": "2024-11-07T18:47:33.760113Z",
"shell.execute_reply": "2024-11-07T18:47:33.759713Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"response = client.completions.create(\n",
@@ -271,14 +229,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T18:47:33.762729Z",
"iopub.status.busy": "2024-11-07T18:47:33.762590Z",
"iopub.status.idle": "2024-11-07T18:47:34.255316Z",
"shell.execute_reply": "2024-11-07T18:47:34.254907Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"import json\n",
@@ -323,14 +274,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T18:47:34.257393Z",
"iopub.status.busy": "2024-11-07T18:47:34.257246Z",
"iopub.status.idle": "2024-11-07T18:47:34.413506Z",
"shell.execute_reply": "2024-11-07T18:47:34.413172Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"response = client.chat.completions.create(\n",
@@ -366,14 +310,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T18:47:34.414816Z",
"iopub.status.busy": "2024-11-07T18:47:34.414541Z",
"iopub.status.idle": "2024-11-07T18:47:34.431341Z",
"shell.execute_reply": "2024-11-07T18:47:34.431081Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"import json\n",
@@ -428,14 +365,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T18:47:34.432325Z",
"iopub.status.busy": "2024-11-07T18:47:34.432208Z",
"iopub.status.idle": "2024-11-07T18:47:37.444337Z",
"shell.execute_reply": "2024-11-07T18:47:37.444000Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"while batch_response.status not in [\"completed\", \"failed\", \"cancelled\"]:\n",
@@ -483,14 +413,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T18:47:37.445894Z",
"iopub.status.busy": "2024-11-07T18:47:37.445744Z",
"iopub.status.idle": "2024-11-07T18:48:02.482532Z",
"shell.execute_reply": "2024-11-07T18:48:02.482042Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"import json\n",
@@ -566,14 +489,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T18:48:02.485206Z",
"iopub.status.busy": "2024-11-07T18:48:02.485064Z",
"iopub.status.idle": "2024-11-07T18:48:15.521489Z",
"shell.execute_reply": "2024-11-07T18:48:15.521156Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"import json\n",
@@ -660,15 +576,8 @@
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"execution": {
"iopub.execute_input": "2024-11-07T18:48:15.522794Z",
"iopub.status.busy": "2024-11-07T18:48:15.522657Z",
"iopub.status.idle": "2024-11-07T18:48:16.875740Z",
"shell.execute_reply": "2024-11-07T18:48:16.874847Z"
}
},
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"terminate_process(server_process)"
@@ -676,11 +585,6 @@
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
@@ -690,8 +594,7 @@
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.7"
"pygments_lexer": "ipython3"
}
},
"nbformat": 4,