Closed colganwi closed 7 months ago
Attention: 6 lines
in your changes are missing coverage. Please review.
:exclamation: No coverage uploaded for pull request base (
master@5b8a452
). Click here to learn what that means.:exclamation: Current head bcae813 differs from pull request most recent head 42cd03f. Consider uploading reports for the commit 42cd03f to get more accurate results
Files | Patch % | Lines |
---|---|---|
cassiopeia/solver/ILPSolver.py | 50.00% | 5 Missing :warning: |
cassiopeia/solver/HybridSolver.py | 80.00% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This is for the case of running the hybrid solver in parallel with multiprocessing. Since multiprocessing creates demonic threads these threads cannot then call multiprocessing again to create more threads.
The logging changes enable better control of the logging behavior since the logging output become quite long when hybrid solver is called in parallel. Specifically, logfile
can be set to None to disable logging and the default stdout
logging level has been changed to WARNING
. If you still want the hybrid solver to print to stdout
you can override the logging level with:
logging.basicConfig(level=logging.INFO)
Hi @colganwi,
Great, that makes a lot more sense now. I've seen the same issue pop up, so thanks for the PR. Looks great to me and will merge it in.
Currently,
cas.solver.HybridSolver
cannot be run in parallel because daemonic processes cannot spawn new processes. This PR solves this by modifyingcas.solver.HybridSolver
to not use multiprocessing whenthreads = 1
.