fix: fix ipython running error for Engine due to outlines nest_asyncio (#4582)
Co-authored-by: shuaills <shishuaiuoe@gmail.com>
This commit is contained in:
@@ -19,12 +19,7 @@
|
||||
"- Streaming asynchronous generation\n",
|
||||
"\n",
|
||||
"Additionally, you can easily build a custom server on top of the SGLang offline engine. A detailed example working in a python script can be found in [custom_server](https://github.com/sgl-project/sglang/blob/main/examples/runtime/engine/custom_server.py).\n",
|
||||
"\n",
|
||||
"## SPECIAL WARNING!!!!\n",
|
||||
"\n",
|
||||
"**To launch the offline engine in your python scripts,** `__main__` **condition is necessary, since we use** `spawn` **mode to create subprocesses. Please refer to this simple example**:\n",
|
||||
"\n",
|
||||
"https://github.com/sgl-project/sglang/blob/main/examples/runtime/engine/launch_engine.py"
|
||||
"\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
import os
|
||||
import weakref
|
||||
|
||||
import nest_asyncio
|
||||
|
||||
nest_asyncio.apply()
|
||||
|
||||
from sglang.utils import execute_shell_command, reserve_port
|
||||
|
||||
DEFAULT_MAX_RUNNING_REQUESTS = 200
|
||||
|
||||
Reference in New Issue
Block a user