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 threading issues in auto-threshold code #73

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

jmuhlich
Copy link
Contributor

@jmuhlich jmuhlich commented Mar 3, 2024

Previous implementation deadlocked on Windows. This change fixes that and cleans up the code in general. Now uses ThreadPoolExecutor instead of explicitly launching Threads. Even after the general cleanups I was encountering deadlocks in np.dot on normal numpy arrays in a threaded context -- switching to the "blis" BLAS implementation fixed that (requirements.yml now contains an entry for this).

@jmuhlich
Copy link
Contributor Author

jmuhlich commented Mar 3, 2024

This also fixes the bug where not selecting a channel names csv file in the front end caused an unexpected exception on windows. Now the code explicitly checks that the csv path exists and is not a directory rather than relying on exceptions (as the particular IO exceptions raised in some circumstances do vary by platform).

Previous implementation deadlocked on Windows. This change fixes that
and cleans up the code in general. Now uses ThreadPoolExecutor instead
of explicitly launching Threads. Even after the general cleanups I was
encountering deadlocks in np.dot on normal numpy arrays in a threaded
context -- switching to the "blis" BLAS implementation fixed that
(requirements.yml now contains an entry for this).
@jmuhlich jmuhlich force-pushed the auto-threshold-threads branch from 341dbeb to b5cecaa Compare March 3, 2024 22:54
@thejohnhoffer thejohnhoffer merged commit 0488080 into labsyspharm:master Mar 4, 2024
2 checks passed
@jmuhlich jmuhlich deleted the auto-threshold-threads branch March 4, 2024 20:29
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.

2 participants