Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Windows Support for Human-Eval
This PR adds comprehensive Windows support to the code evaluation pipeline. Here are the key changes:
Process Management
Process
handling with Windows-compatiblePool
implementationpool.terminate()
andpool.join()
to prevent zombie processes on timeoutmultiprocessing.get_context('spawn')
Timeout Implementation
PyThreadState_SetAsyncExc
to inject exceptions into running threadsdone
andraised
events to handle race conditions in timeout scenariosMemory Management
pywin32
package for Job Object API accesspywin32>=306; platform_system == "Windows"
JOB_OBJECT_LIMIT_PROCESS_MEMORY
flagPlatform Detection
IS_WINDOWS
flag usingplatform.system()
for conditional code pathsThese changes ensure that the human-eval framework runs reliably on Windows while maintaining feature parity with Unix systems. The implementation handles Windows-specific quirks around process management, timeouts, and memory limits while preserving the security and isolation guarantees of the original implementation.
Following is the sanity check using the example results done on Windows:
Closes #51 #45
CC #50