Skip to content

Commit

Permalink
More logging on sglang server
Browse files Browse the repository at this point in the history
  • Loading branch information
jakep-allenai committed Jan 29, 2025
1 parent 0ccb99c commit 04615d7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions olmocr/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,11 @@ async def process_line(line):
nonlocal last_running_req, last_queue_req, last_semaphore_release, server_printed_ready_message
sglang_logger.info(line)

# if the server hasn't initialized yet, log all the lines to the main logger also, so that the user
# can see any warnings/errors more easily
if not server_printed_ready_message:
logger.info(line)

if "Detected errors during sampling" in line:
logger.error("Cannot continue, sampling errors detected, model is probably corrupt")
sys.exit(1)
Expand Down

0 comments on commit 04615d7

Please sign in to comment.