Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
786be44d
Unverified
Commit
786be44d
authored
Dec 04, 2024
by
Chayenne
Committed by
GitHub
Dec 04, 2024
Browse files
Fix Docs CI When Compile Error (#2323)
parent
2db44698
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
docs/Makefile
docs/Makefile
+1
-1
docs/backend/native_api.ipynb
docs/backend/native_api.ipynb
+5
-5
python/sglang/srt/server.py
python/sglang/srt/server.py
+1
-1
No files found.
docs/Makefile
View file @
786be44d
...
@@ -19,7 +19,7 @@ compile:
...
@@ -19,7 +19,7 @@ compile:
echo
"Executing
$$
nb"
;
\
echo
"Executing
$$
nb"
;
\
jupyter nbconvert
--to
notebook
--execute
--inplace
"
$$
nb"
\
jupyter nbconvert
--to
notebook
--execute
--inplace
"
$$
nb"
\
--ExecutePreprocessor
.timeout
=
600
\
--ExecutePreprocessor
.timeout
=
600
\
--ExecutePreprocessor
.kernel_name
=
python3
;
\
--ExecutePreprocessor
.kernel_name
=
python3
||
exit
1
;
\
fi
;
\
fi
;
\
done
done
...
...
docs/backend/native_api.ipynb
View file @
786be44d
...
@@ -220,19 +220,19 @@
...
@@ -220,19 +220,19 @@
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
"# failed update with different parameter size\n",
"# failed update with different parameter size
or wrong name
\n",
"\n",
"\n",
"url = \"http://localhost:30010/update_weights_from_disk\"\n",
"url = \"http://localhost:30010/update_weights_from_disk\"\n",
"data = {\"model_path\": \"meta-llama/Llama-3.2-
3B
\"}\n",
"data = {\"model_path\": \"meta-llama/Llama-3.2-
1B-wrong
\"}\n",
"\n",
"\n",
"response = requests.post(url, json=data)\n",
"response = requests.post(url, json=data)\n",
"response_json = response.json()\n",
"response_json = response.json()\n",
"print_highlight(response_json)\n",
"print_highlight(response_json)\n",
"assert response_json[\"success\"] is False\n",
"assert response_json[\"success\"] is False\n",
"assert response_json[\"message\"] == (\n",
"assert response_json[\"message\"] == (\n",
" \"Failed to
update
weights
: The size of tensor a (2048) must match
\"\n",
" \"Failed to
get
weights
iterator:
\"\n",
" \"
the size of tensor b (3072) at non-singleton dimension 1.\\n
\"\n",
" \"
meta-llama/Llama-3.2-1B-wrong
\"\n",
" \"
Rolling back to original weights
.\"\n",
" \"
(repository not found)
.\"\n",
")"
")"
]
]
},
},
...
...
python/sglang/srt/server.py
View file @
786be44d
...
@@ -329,7 +329,7 @@ async def encode_request(obj: EmbeddingReqInput, request: Request):
...
@@ -329,7 +329,7 @@ async def encode_request(obj: EmbeddingReqInput, request: Request):
)
)
@
app
.
api_route
(
"/
encode
"
,
methods
=
[
"POST"
,
"PUT"
])
@
app
.
api_route
(
"/
classify
"
,
methods
=
[
"POST"
,
"PUT"
])
@
time_func_latency
@
time_func_latency
async
def
classify_request
(
obj
:
EmbeddingReqInput
,
request
:
Request
):
async
def
classify_request
(
obj
:
EmbeddingReqInput
,
request
:
Request
):
"""Handle a reward model request. Now the arguments and return values are the same as embedding models."""
"""Handle a reward model request. Now the arguments and return values are the same as embedding models."""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment