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
bcf66ef3
"vscode:/vscode.git/clone" did not exist on "b1eeb934494ef1eee20cf2d35b718790cb9cb550"
Unverified
Commit
bcf66ef3
authored
Jun 05, 2025
by
fzyzcjy
Committed by
GitHub
Jun 05, 2025
Browse files
Tiny allow profiler API to auto create directory (#6865)
parent
0de5e7d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
python/sglang/srt/managers/scheduler.py
python/sglang/srt/managers/scheduler.py
+4
-0
No files found.
python/sglang/srt/managers/scheduler.py
View file @
bcf66ef3
...
@@ -24,6 +24,7 @@ from collections import defaultdict, deque
...
@@ -24,6 +24,7 @@ from collections import defaultdict, deque
from
concurrent
import
futures
from
concurrent
import
futures
from
dataclasses
import
dataclass
from
dataclasses
import
dataclass
from
http
import
HTTPStatus
from
http
import
HTTPStatus
from
pathlib
import
Path
from
types
import
SimpleNamespace
from
types
import
SimpleNamespace
from
typing
import
Dict
,
List
,
Optional
,
Tuple
,
Union
from
typing
import
Dict
,
List
,
Optional
,
Tuple
,
Union
...
@@ -2283,6 +2284,9 @@ class Scheduler(
...
@@ -2283,6 +2284,9 @@ class Scheduler(
message
=
"Profiling is not in progress. Call /start_profile first."
,
message
=
"Profiling is not in progress. Call /start_profile first."
,
)
)
if
not
Path
(
self
.
torch_profiler_output_dir
).
exists
():
Path
(
self
.
torch_profiler_output_dir
).
mkdir
(
parents
=
True
,
exist_ok
=
True
)
stage_suffix
=
f
"-
{
stage
.
__str__
()
}
"
if
stage
else
""
stage_suffix
=
f
"-
{
stage
.
__str__
()
}
"
if
stage
else
""
logger
.
info
(
"Stop profiling"
+
stage_suffix
+
"..."
)
logger
.
info
(
"Stop profiling"
+
stage_suffix
+
"..."
)
if
self
.
torch_profiler
is
not
None
:
if
self
.
torch_profiler
is
not
None
:
...
...
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