Docs: add special warning to engine docs (#3979)

This commit is contained in:
Chayenne
2025-02-28 21:59:20 -08:00
committed by GitHub
parent 930da877c4
commit 6b859e7ddd
2 changed files with 6 additions and 3 deletions

View File

@@ -18,10 +18,13 @@
"- Non-streaming asynchronous generation\n",
"- 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",
"<span style=\"color:red\">**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](https://github.com/sgl-project/sglang/blob/main/examples/runtime/engine/launch_engine.py) **for more details.**</span>\n",
"## SPECIAL WARNING!!!!\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)."
"**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"
]
},
{

View File

@@ -1,3 +1,3 @@
make clean
make html
python3 -m http.server --d _build/html
python3 -m http.server --d _build/html 8003