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
[WIP] improve parameters support of the callbacks #64
[WIP] improve parameters support of the callbacks #64
Conversation
Thecave3
commented
Mar 16, 2023
- adaptation of parallelrunner.py to support all versions of Python
- minor bugs fixed
- adaptation of parallelrunner.py to support all versions of Python - minor bugs fixed
…ignetlabdei-callback-support
Signetlabdei callback support
.github/workflows/run-tests.yml
Outdated
@@ -4,7 +4,7 @@ on: | |||
push: | |||
branches: [ master, develop ] | |||
pull_request: | |||
branches: [ master, develop ] | |||
# branches: [ master, develop ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this needed...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably not
@@ -1,20 +1,27 @@ | |||
from .runner import SimulationRunner | |||
from multiprocessing import Pool | |||
from .utils import CallbackBase | |||
from multiprocessing.pool import ThreadPool as Pool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was taken from StackOverflow right? What about explaining with a few lines the reasoning behind this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ThreadPool should share the memory with the main process, which is important to correctly use the callbacks.
The main difference between with Pool is that Pool spawn 5 independent processes (https://stackoverflow.com/questions/46045956/whats-the-difference-between-threadpool-vs-pool-in-the-multiprocessing-module).
At the current moment, I have included a simple test to check the effective working of the callback system, but I am having some issues since it cannot find the Here is reported the full log of the execution:
|
…to callback-support
- adaptation of parallelrunner.py to support all versions of Python - minor bugs fixed
…to callback-support
#67) * Draft base callback * Add cb param in manager * Draft base callback * Add cb param in manager * Support paraller runner * Re-introduce support for parent cb init * Merge changes in utils * Small fixes * fix ctrld by parent flag for callbacks * Improve parameters support of the callbacks (#64) --------- Co-authored-by: pagmatt <mattpagg@gmail.com> Co-authored-by: Andrea Lacava <lacava.a@norhteastern.edu> --------- Co-authored-by: Andrea Lacava <thecave003@gmail.com> Co-authored-by: Andrea Lacava <lacava.a@norhteastern.edu>