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

Solving #266 with a new multiprocessing design #268

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

philippkraft
Copy link
Collaborator

No description provided.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 912

  • 12 of 12 (100.0%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.1%) to 84.697%

Files with Coverage Reduction New Missed Lines %
spotpy/algorithms/_algorithm.py 1 86.51%
Totals Coverage Status
Change from base Build 910: 0.1%
Covered Lines: 4079
Relevant Lines: 4816

💛 - Coveralls

@thouska
Copy link
Owner

thouska commented Apr 16, 2021

Thank you for the pull request. I think this could work, in fact it does wotk for 'ram' databases. However, switiching dbformat to 'csv' result in an TypeError: cannot pickle". Good news is, we do not need the parallel mode to know anythin about the database.

In case we switch to multiprocessing (as proposed here), we would need to hand over the user defined spot_setup class to the ForEach class only. So far it somehow gets to whole _algorithm via self. We might also need some queues for collecting and storing the data.

In case we stay with pathos.multiprocessing, we would need to figure out, why the csv database remains empty (happens if I try to reproduce #266). This is a strange error to me, as normal .txt writing does not result in any errors under pathos.multiprocessing in spotpy (tests locally).

I guess, we can follow up on both ways, having multiprocessing for pickable models and pathos for not pickable things. Would be nice to get at least one of them to run.

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.

3 participants