Parameter_Sampler merge requestshttps://ford.biologie.hu-berlin.de/tbphu/Parameter_Sampler/-/merge_requests2021-04-02T21:46:53Zhttps://ford.biologie.hu-berlin.de/tbphu/Parameter_Sampler/-/merge_requests/1added assert for scoreresults2021-04-02T21:46:53ZLasse Bonnadded assert for scoreresultsAdded an assert with an error message. <br>
On line 843 `sc` is created with a double list comprehension, by adding an assert statement asserting whether `scoreresults` element 0 is a list we check that the double list comprehension can ...Added an assert with an error message. <br>
On line 843 `sc` is created with a double list comprehension, by adding an assert statement asserting whether `scoreresults` element 0 is a list we check that the double list comprehension can go ahead. The `AssertionError` prints a short text and the `scoreresults` - often you will see that its an empty list indicating that your integration has failed.
**tldr** assert error to get understandable error messageJens HahnJens Hahnhttps://ford.biologie.hu-berlin.de/tbphu/Parameter_Sampler/-/merge_requests/2using pathos pool in multipleruns2021-04-02T21:44:57ZLasse Bonnusing pathos pool in multiplerunsSave around 45 lines of multiprocessing by using pathos [pp.pool](https://pathos.readthedocs.io/en/latest/pathos.html#module-pathos.pp).
pathos pool is the same as multiprocessing [pool](https://docs.python.org/3/library/multiprocessing...Save around 45 lines of multiprocessing by using pathos [pp.pool](https://pathos.readthedocs.io/en/latest/pathos.html#module-pathos.pp).
pathos pool is the same as multiprocessing [pool](https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.Pool) where there is a set number of processes. With the map function you assign a list of arguments to a function and the map gives one argument(-vector) to each process. If there is more arguments than the size of the pool, the program waits and when a worker has finished one process it can start on the next one. The result is a list of return from the function that was mapped onto the arguments.
I use pathos because normal python multiprocessing uses pickle for data management but pickle cannot deal with methods of classes. Pathos multiprocessing uses dill, which can serialise methods.
### pros:
- simpler and less code
- no manual creating processes and joining etc
### cons:
- new dependency if you use multiprocessingJens HahnJens Hahnhttps://ford.biologie.hu-berlin.de/tbphu/Parameter_Sampler/-/merge_requests/3added elif for pyDOE import. added import ParameterResults in ParameterSampler2021-04-02T21:16:39ZJorin Diemeradded elif for pyDOE import. added import ParameterResults in ParameterSamplerpyDOE wasn't imported if evolutionary_search package not found. Added import of pyDOE if it's available, as it is also needed if method is annealing or basin hopping. Also added import of ParameterResults class into ParameterSampler.pyDOE wasn't imported if evolutionary_search package not found. Added import of pyDOE if it's available, as it is also needed if method is annealing or basin hopping. Also added import of ParameterResults class into ParameterSampler.Jens HahnJens Hahn