-
-
Notifications
You must be signed in to change notification settings - Fork 656
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
[Bug] Custom OmegaConf resolvers registered at module level aren't propagated to submitit launcher processes #861
Comments
Thanks for reporting, will look into it. |
@samuelstanton You can move the |
@calebho, simply moving it inside the I had similar issue few days ago but went around it by doing this in my if OmegaConf.get_resolver("my_custom_resolver") is None:
OmegaConf.register_resolver("my_custom_resolver", my_custom_resolver) I forgot to report it - that would save some of your time - sorry. |
Can we revisit this? I'm not using multirun or the submitit plugin because it's currently missing some functionality I want. Instead I call submitit myself using either the local executor or the slurm executor, and I get the following error:
I think it's related to this |
Could you provide a minimal script to reproduce this? Thank you. |
Here's a script:
and a config file
full exception is
I just installed from git master ( |
Please open a new task a minimal repro. strip anything that is not relavant. |
🐛 Bug
Description
Not sure whether this is expected behavior. If it is, it should be documented somewhere. If you register a custom OmegaConf resolver at module scope, they won't be propagated to the launcher processes. Thus when you try to access a config node which uses a custom resolver, you get an exception.
Checklist
To reproduce
Regular run works fine:
Multirun with submitit throws an exception:
Moving
OmegaConf.register_resolver
insidemain
works:Expected Behavior
System information
Additional context
I think this is an issue with how submitit is serializing the Python interpreter state to the worker processes. Might require a non-trivial change in its design
The text was updated successfully, but these errors were encountered: