-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Config files are missing --> hydra.errors.MissingConfigException:Cannot find primary config 'sam2_hiera_l.yaml' #81
Comments
copy the sam2_configs folder under the root project path |
modify here. |
I encountered the same problem. I use the code below to solve hydra.errors.MissingConfigException, while a new error occurs:
|
you can do copy the then us this code :
|
You can fix it by reconfiguring the Hydra search path. This worked for me: import hydra
from sam2.build_sam import build_sam2
# hydra is initialized on import of sam2, which sets the search path which can't be modified
# so we need to clear the hydra instance
hydra.core.global_hydra.GlobalHydra.instance().clear()
# reinit hydra with a new search path for configs
hydra.initialize_config_module('<path-to-sam2_configs>', version_base='1.2')
# this should work now
model = build_sam2('<config-name>', '<checkpoint-path>') |
I was able to resolve this issue by building C extensions and placing the complied module in the source directory.
|
|
I suggested a fix if anyone is interested: |
I fix by placing
|
I also got this error, although I tried all before mentioned solutions, but nothing worked for me. So, I had a look at the hydra implementation and in the docu of the compose function they mention the following:
So, I tried |
just model_cfg = "sam2_hiera_l.yaml" without full path worked for me |
While loading sam2 model in predictor, got an error for loading config file:
sam2 config files at
/sam2_configs
are missing from hydra config search path.It would be great if they are added at package level and hence no
hydra.errors.MissingConfigException
The text was updated successfully, but these errors were encountered: