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
After the 0.4.0 version, we expect usage of Hydra 1.1. This will break your user scripts, and requires an update. In short, you should move your config files to a hydra_configs subfolder of your project folder, and then update your script's @hydra.main to set config_path="hydra_configs". #494 demonstrates these changes for our existing scripts.
Remediation steps
For any script that is pulling in configuration from yaml files (like commonly done from a conf directory inside the same directory as the script) you'll need to make a containing hydra_configs directory (or whatever you may want to name it, though this is the name our warnings look for).
# Before
my_project_dir
> conf
>> my_conf.yaml
> my_cool_script.py
# After
my_project_dir
> hydra_configs
>> conf
>>> my_conf.yaml
> my_cool_script.py
You'll then want to update the @hydra.main decorator to include this location:
Unfortunately there's no way for me to catch these errors in user scripts, I apologize for the disruption here. Hopefully this issue can centralize discussion! I believe without this change Hydra no longer looks for the hydra configuration scripts at the default package level if no config path is given, leading to some missing package directive. Please be sure to rerun setup.py for the project after pulling to be sure you have the most up-to-date version. Reach out here if 0.4.0 is causing you issues otherwise!
The text was updated successfully, but these errors were encountered:
Thanks for this. In addition to the above remediation steps, I also found this to be helpful as well. Particularly, there is an additional step of adding '_self_' to the defaults to suppress the warning. You might want to include that over here as well.
Overview
After the
0.4.0
version, we expect usage of Hydra 1.1. This will break your user scripts, and requires an update. In short, you should move your config files to ahydra_configs
subfolder of your project folder, and then update your script's@hydra.main
to setconfig_path="hydra_configs"
. #494 demonstrates these changes for our existing scripts.Remediation steps
For any script that is pulling in configuration from yaml files (like commonly done from a
conf
directory inside the same directory as the script) you'll need to make a containinghydra_configs
directory (or whatever you may want to name it, though this is the name our warnings look for).You'll then want to update the
@hydra.main
decorator to include this location:Details
Unfortunately there's no way for me to catch these errors in user scripts, I apologize for the disruption here. Hopefully this issue can centralize discussion! I believe without this change Hydra no longer looks for the hydra configuration scripts at the default package level if no config path is given, leading to some missing package directive. Please be sure to rerun
setup.py
for the project after pulling to be sure you have the most up-to-date version. Reach out here if0.4.0
is causing you issues otherwise!The text was updated successfully, but these errors were encountered: