Skip to content

Fix cycle verification "worker stopped" warning #402

Merged
ptajvar merged 1 commit into
devfrom
fix/pna-2198-fix-cycle-verification-worker-warning
Jun 17, 2026
Merged

Fix cycle verification "worker stopped" warning #402
ptajvar merged 1 commit into
devfrom
fix/pna-2198-fix-cycle-verification-worker-warning

Conversation

@ptajvar

@ptajvar ptajvar commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

During edge cycle verification, we get a warning about workers being terminated. This warning is benign and we recover all components, but still we would like to understand and fix the issue.

Update: The issue of workers stopping is resolved by assigning a high timeout value in joblib 'Parallel' initialization. We have also limited the number of threads used in duckdb connections that are initiated by parallelized workers to 1.

Fixes: PNA-2198

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Tried on a few samples to verify that the warning disappears.

PR checklist:

  • This comment contains a description of changes (with reason).
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • If a new tool or package is included, I have updated dependencies in pyproject.toml and cited it properly
  • I have checked my code and documentation and corrected any misspellings
  • I have documented any significant changes to the code in CHANGELOG.md

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses benign “worker stopped” warnings seen during PNA edge cycle verification by tuning the parallel execution and DuckDB per-worker configuration to reduce worker churn and thread oversubscription.

Changes:

  • Limit DuckDB connections created inside parallel workers to a single DuckDB thread (threads=1).
  • Configure joblib Parallel to use the loky backend with an increased backend timeout to reduce worker-restart warnings during long batches.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +355 to +361
# Keep workers alive longer to avoid worker-restart warnings
# during long component processing batches.
n_removed_edges_list = Parallel(
n_jobs=n_threads,
backend="loky",
backend_kwargs={"timeout": 1800},
)(
@ptajvar ptajvar merged commit 0d8beca into dev Jun 17, 2026
16 checks passed
@ptajvar ptajvar deleted the fix/pna-2198-fix-cycle-verification-worker-warning branch June 17, 2026 11:05
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