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

Parallel runs #820

Open
algebravic opened this issue May 6, 2021 · 2 comments
Open

Parallel runs #820

algebravic opened this issue May 6, 2021 · 2 comments

Comments

@algebravic
Copy link

I would like to run a large number of experiments. Since I have a number of CPUs and GPUs available, I'd like to run them in parallel. I didn't see anything in the docs to address this. Are there race conditions in observers that I should be worried about?

@daliasen
Copy link
Contributor

daliasen commented May 6, 2021

I was wondering about the same thing and eventually settled down for the SqlObserver.

I use the SqlObserver with a PostgreSQL database. The fix in pull request #813 solved the issues with race conditions I was having when running multiple experiments in parallel.

I would be cautious using SqlObserver with an SQLite database though. I'm not sure if simultaneous writers would be handled correctly.

My understanding is that the TinyDbObserver is inherently not usable if you want to be able to view the progress of your experiments while they are running but perhaps it's fine otherwise.

It would be useful to have some information about how each observer handles concurrency in the docs.

@thequilo
Copy link
Collaborator

I don't know of any race conditions that are not handled. The FileStorageObserver has code to handle simultaneous creation of run dirs from different threads/processes and each run uses a different directory after that. I think that MogoDb is itself already thread-safe.

I agree that this information would be helpful in the docs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants