Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
gmlwns2000 committed Jan 24, 2025
1 parent bd64af2 commit 68467a5
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions python/sglang/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,23 +363,3 @@ def terminate_process(process):
def print_highlight(html_content: str):
html_content = str(html_content).replace("\n", "<br>")
display(HTML(f"<strong style='color: #00008B;'>{html_content}</strong>"))


import pdb # type: ignore
import sys


class ForkedPdb(pdb.Pdb):
"""
PDB Subclass for debugging multi-processed code
Suggested in: https://stackoverflow.com/questions/4716533/how-to-attach-debugger-to-a-python-subproccess
"""

def interaction(self, *args, **kwargs):
_stdin = sys.stdin
try:

sys.stdin = open("/dev/stdin")
pdb.Pdb.interaction(self, *args, **kwargs)
finally:
sys.stdin = _stdin

0 comments on commit 68467a5

Please sign in to comment.