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

Multiprocessing #5

Open
marv123456 opened this issue Oct 13, 2024 · 0 comments
Open

Multiprocessing #5

marv123456 opened this issue Oct 13, 2024 · 0 comments

Comments

@marv123456
Copy link

Multiprocessing

I also tried to run the program in multiple threads, but the performance is worse. What I was investigating each python process can only run in one core and emulates the use of multiple threads but in reality it uses only one, another point to consider is that using multiple threads is recommended for long and heavy tasks, but in the code a thread is called for each file so this can cause a decrease in performance. It is recommended to use multiple processes to take advantage of all the cores and for each process to execute long tasks. I am running on windows so creating multiple processes can only be achieved by executing scripts from a file, I made an adaptation of the code that reduces the processing time of the ECT files by half in my laptop.

I attach the modified files:
test_ECT_Direction_and_Threshold_Learning_multiprocess.zip

However, in this version the use of in_memory is not available nor does it allow collecting random samples.

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

No branches or pull requests

1 participant