-
-
Notifications
You must be signed in to change notification settings - Fork 659
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
[Feature Request] Option to specify the arg --config-path, -cp
as an absolute path
#2368
Comments
Yes this makes sense. Thanks |
This was actually already supported as os.path.join("/blah", "/abs/config"), just returns "/abs/config", but we've made this explicit in code and docs now.
This was actually already supported as os.path.join("/blah", "/abs/config"), just returns "/abs/config", but we've made this explicit in code and docs now.
This was actually already supported as os.path.join("/blah", "/abs/config"), just returns "/abs/config", but we've made this explicit in code and docs now.
I am facing a similar scenario. How does one pass the absolute path to config_path in the hydra decorator? When using raises error
The workaround that I am currently using is pass an argument and using the following decorator
|
Hi @udaylunawat, |
🚀 Feature Request
Option to specify the arg
--config-path, -cp
as an absolute path.Motivation
We are working on a new package for local motion planning research. There is a lot of complex configuration required in this project and I think it's a perfect candidate to integrate hydra.
The problem is, it's a package. We would like potential users to be able to install the package (through pypi) and put their configuration files in an arbitrary location. However, currently the config_path arg is relative to the Python file declaring @hydra.main(). In our application @hydra.main() is called within the package, which makes relative paths tricky.
Pitch
Describe the solution you'd like
Would it be possible to check if the specified path in
--config-path
is absolute or relative, using for instanceos.path.isabs(config_path)
? If it's an absolute path, we could simply set the search_path to be equal to the config_path. Otherwise we could keep the current behavior.Describe alternatives you've considered
Alternatively, it could be done using an additional arg specifically for paths relative to the current working directory (or absolute paths).
Are you willing to open a pull request?
Yes
The text was updated successfully, but these errors were encountered: