Skip to content

Conversation

f14-bertolotti
Copy link
Contributor

Motivation

While evaluating with Livecodebench (LCB), I encountered two issues:

  1. The existing timeout of 3 seconds frequently results in timeouts when using ProcessPoolExecutor() with its default number of processes. To address this, I increased the timeout to 30 seconds.

  2. Using ProcessPoolExecutor() with a local function causes a serialization error. This is resolved by moving the local function to the global namespace.

Modifications

  1. Moved _temp_run to the global namespace.
  2. Increased the timeout in codeexecute_check_correctness from 3 seconds to 30 seconds.

Backward Compatibility

These changes are backward compatible. However, note that increasing the timeout may cause some tests to pass that would have previously failed due to exceeding the shorter timeout.

Checklist

Before PR:

  • Pre-commit or other linting tools are used to fix the potential lint issues.
  • Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests.
  • The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  • The documentation has been modified accordingly, like docstring or example tutorials.

After PR:

  • If the modification has potential influence on downstream or other related projects, this PR should be tested with those projects.
  • CLA has been signed and all committers have signed the CLA in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants