You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix callable evaluator failing in subprocess workers
_prepare_evaluator() stored callable evaluators in globals() of the api
module, which is inaccessible from ProcessPoolExecutor worker processes.
Workers import openevolve.api fresh and the dynamic attribute doesn't
exist in their memory space, causing AttributeError on every evaluation.
Fix: serialize the callable to disk via cloudpickle/pickle and have the
evaluator wrapper load it from the file. Also document the if __name__
== '__main__' guard requirement for macOS/Windows multiprocessing.
Verified with a local LLM endpoint (Ollama) to confirm cross-process
evaluation works end-to-end.
> **Note:** On macOS and Windows, Python uses `spawn` for multiprocessing. You must wrap evolution calls in `if __name__ == '__main__':` to avoid subprocess bootstrap errors.
132
+
130
133
**Prefer Docker?** See the [Installation & Setup](#installation--setup) section for Docker options.
0 commit comments