gin-config icon indicating copy to clipboard operation
gin-config copied to clipboard

Not thread safe

Open Dawars opened this issue 1 year ago • 1 comments

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?

Dawars avatar Feb 27 '23 18:02 Dawars

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.

jingnanshi avatar May 05 '23 13:05 jingnanshi