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

Not thread safe #181

Open
Dawars opened this issue Feb 27, 2023 · 1 comment
Open

Not thread safe #181

Dawars opened this issue Feb 27, 2023 · 1 comment

Comments

@Dawars
Copy link

Dawars commented Feb 27, 2023

When I use gin config for hyperparameter search with optuna and it starts multiple processes at the same time I get the following error:
Attempted to modify locked Gin config

This is because internally gin stores the configs in global variables.

Is there a way to fix this?

@jingnanshi
Copy link

You should be able to avoid this by doing something similar to this: https://gist.github.com/sile/1158ba37ff5b8c290f8953acebffed80. Essentially you want to have a separate gin config for each process.

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

No branches or pull requests

2 participants