You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clarify how to register custom resolvers project-wide.
Motivation
I couldn't find anything in the documentation about how to register custom resolvers project-wide. The recommended approach seems to be registering them by calling OmegaConf.register_new_resolver in every script that uses them
I however found this comment, which seems to accomplish exactly what I want.
Is this the recommended way for registering resolvers project-wide?
Pitch
Describe the solution you'd like
It would be nice to clarify this in the documentation.
Are you willing to open a pull request? (See CONTRIBUTING)
Sure, but I need clarification on the recommended approach first.
The text was updated successfully, but these errors were encountered:
Hi @Jasha10. Just to clarify, this issue is about how to register custom resolvers project-wide. Even if the recommended approach for registering custom resolvers for a single script is to use OmegaConf.register_new_resolver, that approach does not directly solve the issue of how to register them for all scripts in a project.
Can you please clarify what's the recommended approach for project-wide registration of custom resolvers?
If your project has e.g. an __init__.py or a __main__.py file as its entrypoint, you could define a function def register_my_resolvers(): ... in a module my_resolvers.py and then call that function from your __init__ or __main__ file.
馃殌 Feature Request
Clarify how to register custom resolvers project-wide.
Motivation
I couldn't find anything in the documentation about how to register custom resolvers project-wide. The recommended approach seems to be registering them by calling
OmegaConf.register_new_resolver
in every script that uses themI however found this comment, which seems to accomplish exactly what I want.
Is this the recommended way for registering resolvers project-wide?
Pitch
Describe the solution you'd like
It would be nice to clarify this in the documentation.
Are you willing to open a pull request? (See CONTRIBUTING)
Sure, but I need clarification on the recommended approach first.
The text was updated successfully, but these errors were encountered: