Question Details

No question body available.

Tags

python google-cloud-platform nlp distributed-computing ray

Answers (1)

March 1, 2026 Score: 0 Rep: 714 Quality: Low Completeness: 50%

I think that MAXINFLIGHT is calculated too early, so when is calculated after scaleactors(), not all actors may be ready yet, it will be better if you move it inside the loop.

if len(activefutures) >= len(nlpactors) * 2:

i also notice counter only increments when a task completes, so multiple tasks end up going to the same actor, in this case my friend there is a beter way to do this and is a simple round robin instead

actor = nlpactors[len(activefutures) % len(nlpactors)]

as a final advice if you are using spaCy or transformers inside NLPActor, they may block the GIL and cause actors to run sequentially despite the parallelism setup.