Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parallelism issue on github actions #104

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Fix parallelism issue on github actions #104

wants to merge 12 commits into from

Conversation

ma595
Copy link
Collaborator

@ma595 ma595 commented Feb 11, 2025

This PR fixes issue #102.

Summary: Locally the ProcessPoolExecutor works well, however it seems to hang at Step 4. This arose because of the recent change to process parallelism from thread parallelism.

  • The fix is because of the addition of if __name__ == "__main__" to main.py. This is good practice anyway as it prevents the execution of code due to import. This is unlikely to happen in this case, however.
    • The above addition also prevents infinite recursion within github actions.
  • It also relies on the setting multiprocessing.set_start_method("forkserver", force=True) at the main call, instead of just fork. forkserver does not inherit threads, preventing deadlocks. This seems to suggest that some threads are lingering and need to be destroyed. In general, however, forkserver seems to be safer in CI environments.

With parallel execution the CI for DEF_Trunk now runs in 6m. See this successful run.

@ma595 ma595 self-assigned this Feb 12, 2025
@ma595 ma595 requested a review from Mandresy-code February 12, 2025 09:11
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.

1 participant