Skip to content

Commit

Permalink
load_test: update the Queue class provider to work well on MacOS (#92)
Browse files Browse the repository at this point in the history
* load_test: update the Queue class provider to work well on MacOS

see https://stackoverflow.com/questions/65609529/python-multiprocessing-queue-notimplementederror-macos

* load_test: add shebang header

Makes it easier to run the load test. And the executable flag is already set.
  • Loading branch information
kpouget authored Mar 3, 2025
1 parent 23db634 commit 1f5fc43
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions load_test.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#! /usr/bin/env python3

"""Main llm-load-test CLI entrypoint."""

import logging
Expand Down Expand Up @@ -117,12 +119,14 @@ def main(args):
args = utils.parse_args(args)

mp_ctx = mp.get_context("spawn")
logger_q = mp_ctx.Queue()
mp_mgr = mp_ctx.Manager()

logger_q = mp_mgr.Queue()
log_reader_thread = logging_utils.init_logging(args.log_level, logger_q)

# Create processes and their Users
stop_q = mp_ctx.Queue(1)
dataset_q = mp_ctx.Queue()
stop_q = mp_mgr.Queue(1)
dataset_q = mp_mgr.Queue()
procs = []
results_pipes = []

Expand Down

0 comments on commit 1f5fc43

Please sign in to comment.