fix black in pre-commit (#1940)
This commit is contained in:
@@ -33,10 +33,10 @@
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-11-05T05:11:10.680191Z",
|
||||
"iopub.status.busy": "2024-11-05T05:11:10.679710Z",
|
||||
"iopub.status.idle": "2024-11-05T05:11:39.882385Z",
|
||||
"shell.execute_reply": "2024-11-05T05:11:39.881827Z"
|
||||
"iopub.execute_input": "2024-11-07T18:48:52.032229Z",
|
||||
"iopub.status.busy": "2024-11-07T18:48:52.032105Z",
|
||||
"iopub.status.idle": "2024-11-07T18:49:20.226042Z",
|
||||
"shell.execute_reply": "2024-11-07T18:49:20.225562Z"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
@@ -49,7 +49,7 @@
|
||||
")\n",
|
||||
"\n",
|
||||
"server_process = execute_shell_command(\n",
|
||||
"\"\"\"\n",
|
||||
" \"\"\"\n",
|
||||
"python -m sglang.launch_server --model-path meta-llama/Meta-Llama-3.1-8B-Instruct \\\n",
|
||||
"--port 30000 --host 0.0.0.0\n",
|
||||
"\"\"\"\n",
|
||||
@@ -70,10 +70,10 @@
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-11-05T05:11:39.883923Z",
|
||||
"iopub.status.busy": "2024-11-05T05:11:39.883721Z",
|
||||
"iopub.status.idle": "2024-11-05T05:11:40.124980Z",
|
||||
"shell.execute_reply": "2024-11-05T05:11:40.124557Z"
|
||||
"iopub.execute_input": "2024-11-07T18:49:20.228006Z",
|
||||
"iopub.status.busy": "2024-11-07T18:49:20.227572Z",
|
||||
"iopub.status.idle": "2024-11-07T18:49:20.469885Z",
|
||||
"shell.execute_reply": "2024-11-07T18:49:20.469518Z"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
@@ -101,10 +101,10 @@
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-11-05T05:11:40.126564Z",
|
||||
"iopub.status.busy": "2024-11-05T05:11:40.126369Z",
|
||||
"iopub.status.idle": "2024-11-05T05:11:40.324316Z",
|
||||
"shell.execute_reply": "2024-11-05T05:11:40.323693Z"
|
||||
"iopub.execute_input": "2024-11-07T18:49:20.471956Z",
|
||||
"iopub.status.busy": "2024-11-07T18:49:20.471811Z",
|
||||
"iopub.status.idle": "2024-11-07T18:49:20.667997Z",
|
||||
"shell.execute_reply": "2024-11-07T18:49:20.667630Z"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
@@ -115,9 +115,7 @@
|
||||
"\n",
|
||||
"data = {\n",
|
||||
" \"model\": \"meta-llama/Meta-Llama-3.1-8B-Instruct\",\n",
|
||||
" \"messages\": [\n",
|
||||
" {\"role\": \"user\", \"content\": \"What is the capital of France?\"}\n",
|
||||
" ]\n",
|
||||
" \"messages\": [{\"role\": \"user\", \"content\": \"What is the capital of France?\"}],\n",
|
||||
"}\n",
|
||||
"\n",
|
||||
"response = requests.post(url, json=data)\n",
|
||||
@@ -136,10 +134,10 @@
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-11-05T05:11:40.327043Z",
|
||||
"iopub.status.busy": "2024-11-05T05:11:40.326759Z",
|
||||
"iopub.status.idle": "2024-11-05T05:11:41.687336Z",
|
||||
"shell.execute_reply": "2024-11-05T05:11:41.686855Z"
|
||||
"iopub.execute_input": "2024-11-07T18:49:20.669977Z",
|
||||
"iopub.status.busy": "2024-11-07T18:49:20.669826Z",
|
||||
"iopub.status.idle": "2024-11-07T18:49:22.004855Z",
|
||||
"shell.execute_reply": "2024-11-07T18:49:22.004472Z"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
@@ -171,10 +169,10 @@
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-11-05T05:11:41.688676Z",
|
||||
"iopub.status.busy": "2024-11-05T05:11:41.688527Z",
|
||||
"iopub.status.idle": "2024-11-05T05:11:42.717140Z",
|
||||
"shell.execute_reply": "2024-11-05T05:11:42.716452Z"
|
||||
"iopub.execute_input": "2024-11-07T18:49:22.006983Z",
|
||||
"iopub.status.busy": "2024-11-07T18:49:22.006858Z",
|
||||
"iopub.status.idle": "2024-11-07T18:49:23.029098Z",
|
||||
"shell.execute_reply": "2024-11-07T18:49:23.028697Z"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
@@ -197,7 +195,7 @@
|
||||
"# Handle the streaming output\n",
|
||||
"for chunk in response:\n",
|
||||
" if chunk.choices[0].delta.content:\n",
|
||||
" print(chunk.choices[0].delta.content, end='', flush=True)"
|
||||
" print(chunk.choices[0].delta.content, end=\"\", flush=True)"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -214,10 +212,10 @@
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-11-05T05:11:42.720467Z",
|
||||
"iopub.status.busy": "2024-11-05T05:11:42.720182Z",
|
||||
"iopub.status.idle": "2024-11-05T05:11:43.480765Z",
|
||||
"shell.execute_reply": "2024-11-05T05:11:43.480143Z"
|
||||
"iopub.execute_input": "2024-11-07T18:49:23.031712Z",
|
||||
"iopub.status.busy": "2024-11-07T18:49:23.031571Z",
|
||||
"iopub.status.idle": "2024-11-07T18:49:23.787752Z",
|
||||
"shell.execute_reply": "2024-11-07T18:49:23.787368Z"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
@@ -250,10 +248,10 @@
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-11-05T05:11:43.483575Z",
|
||||
"iopub.status.busy": "2024-11-05T05:11:43.483295Z",
|
||||
"iopub.status.idle": "2024-11-05T05:11:44.242950Z",
|
||||
"shell.execute_reply": "2024-11-05T05:11:44.242248Z"
|
||||
"iopub.execute_input": "2024-11-07T18:49:23.789840Z",
|
||||
"iopub.status.busy": "2024-11-07T18:49:23.789702Z",
|
||||
"iopub.status.idle": "2024-11-07T18:49:24.545631Z",
|
||||
"shell.execute_reply": "2024-11-07T18:49:24.545241Z"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
@@ -290,10 +288,10 @@
|
||||
"execution_count": 8,
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-11-05T05:11:44.245660Z",
|
||||
"iopub.status.busy": "2024-11-05T05:11:44.245373Z",
|
||||
"iopub.status.idle": "2024-11-05T05:11:45.591682Z",
|
||||
"shell.execute_reply": "2024-11-05T05:11:45.591184Z"
|
||||
"iopub.execute_input": "2024-11-07T18:49:24.547641Z",
|
||||
"iopub.status.busy": "2024-11-07T18:49:24.547497Z",
|
||||
"iopub.status.idle": "2024-11-07T18:49:25.888864Z",
|
||||
"shell.execute_reply": "2024-11-07T18:49:25.888114Z"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
|
||||
Reference in New Issue
Block a user