This repository was archived by the owner on Dec 17, 2025. It is now read-only.

Description
Is there any reason why both these lines:
|
clients = construct_clients(llm_api=llm_api, num_clients=1) |
|
clients = construct_clients(llm_api=llm_api, num_clients=1) |
have fixed num_clients=1. Couldn't them be changed to:
import multiprocessing
num_cores = multiprocessing.cpu_count() # Get total available CPU cores
clients = construct_clients(llm_api=llm_api, num_clients=num_cores)
As I've seen in the docs, the parallelism in ray can be done 2 ways:
clients = [OpenAIChatCompletionsClient.remote() for _ in range(8)] # multiple actors
# OR
@ray.remote(num_cpus=2) # Each actor uses 2 CPUs
class OpenAIChatCompletionsClient(LLMClient):
pass
And in this case I would prefer the first way... Am I missing anything or the way the code is written does not use all the available CPUs??