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
I built a tool that uses Hydra. A second tool is using that tool and wants to have defaults in their config that point to data files within that second tool's package. But, the filepath of those data files depends on how that second file is installed. In python, with importlib you can easily identify the root filepath of a python package or access data files from said package. It'd be nice to have a simple resolver in Hydra that could accomplish this.
Motivation
See above
Pitch
Describe the solution you'd like
I'd like a simple python_package_path or package_file or something resolver added that can return a data file's path for a python package.
Describe alternatives you've considered
I naturally considered implementing my own resolver and adding it via OmegaConf. The problem with this is that then the user of the second tool needs to run a python file from the second tool to see that resolver; if instead, the second tool has, for example, some application that re-routes to a different Hydra app with file defaults set to data files in the package, python code in the second tool would not be run, and the custom resolver wouldn't be loaded.
Are you willing to open a pull request? (See CONTRIBUTING)
Yes, with guidance on where this should best be added.
The text was updated successfully, but these errors were encountered:
🚀 Feature Request
I built a tool that uses Hydra. A second tool is using that tool and wants to have defaults in their config that point to data files within that second tool's package. But, the filepath of those data files depends on how that second file is installed. In python, with
importlib
you can easily identify the root filepath of a python package or access data files from said package. It'd be nice to have a simple resolver in Hydra that could accomplish this.Motivation
See above
Pitch
Describe the solution you'd like
I'd like a simple
python_package_path
orpackage_file
or something resolver added that can return a data file's path for a python package.Describe alternatives you've considered
I naturally considered implementing my own resolver and adding it via OmegaConf. The problem with this is that then the user of the second tool needs to run a python file from the second tool to see that resolver; if instead, the second tool has, for example, some application that re-routes to a different Hydra app with file defaults set to data files in the package, python code in the second tool would not be run, and the custom resolver wouldn't be loaded.
Are you willing to open a pull request? (See CONTRIBUTING)
Yes, with guidance on where this should best be added.
The text was updated successfully, but these errors were encountered: