Windows parallelisation doesn't work out of the box #79
lenarddome
started this conversation in
Troubleshooting
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Parallel computing on Windows
Issue#16 is a known issue with Windows and parallelisation.
The way to circumvent this is to wrap your code in into
if __name__ == '__main__':and load the parallelised optimisation bits as separate modules.Walktrhough for Jupyter
In principle, you only need to wrap the code chunk were you fit to data in a fashion similar to this:
Walkthrough for using python scripts
Assume that you have the following folder structure:
Feel free to adjust this structure based on your specific project needs.
fitting.py and setup_model.py are the files that contain the fitting and model setup functions, respectively.
For setup_model.py, you can structure it as follows:
Your
fitting.pyfile can be structured as follows:The important part is that you have a
main.pyfile that will be the entry point for your project.You can structure your
main.pyas follows:If you have this sorted, you can execute the
main.pyfile from the command line as well, and the parallelisation should work as expected.Beta Was this translation helpful? Give feedback.
All reactions