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
When having a configuration that uses ??? in the defaults (to make specifying it mandatory), autocomplete crashes because it looks for that argument first.
Traceback (most recent call last):
File "/home/goens/.virtualenvs/pykpn/lib/python3.6/site-packages/hydra/_internal/config_loader_impl.py", line 262, in _load_configuration
run_mode=run_mode,
File "/home/goens/.virtualenvs/pykpn/lib/python3.6/site-packages/hydra/_internal/config_loader_impl.py", line 805, in _merge_defaults_into_config
hydra_cfg = merge_defaults_list_into_config(hydra_cfg, user_list)
File "/home/goens/.virtualenvs/pykpn/lib/python3.6/site-packages/hydra/_internal/config_loader_impl.py", line 757, in merge_defaults_list_into_config
config_group=default1.config_group
hydra._internal.config_loader_impl.UnspecifiedMandatoryDefault
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "test.py", line 9, in <module>
main()
File "/home/goens/.virtualenvs/pykpn/lib/python3.6/site-packages/hydra/main.py", line 37, in decorated_main
strict=strict,
File "/home/goens/.virtualenvs/pykpn/lib/python3.6/site-packages/hydra/_internal/utils.py", line 372, in _run_hydra
lambda: hydra.shell_completion(
File "/home/goens/.virtualenvs/pykpn/lib/python3.6/site-packages/hydra/_internal/utils.py", line 201, in run_and_report
raise ex
File "/home/goens/.virtualenvs/pykpn/lib/python3.6/site-packages/hydra/_internal/utils.py", line 198, in run_and_report
return func()
File "/home/goens/.virtualenvs/pykpn/lib/python3.6/site-packages/hydra/_internal/utils.py", line 373, in <lambda>
config_name=config_name, overrides=args.overrides
File "/home/goens/.virtualenvs/pykpn/lib/python3.6/site-packages/hydra/_internal/hydra.py", line 247, in shell_completion
plugin.query(config_name=config_name)
File "/home/goens/.virtualenvs/pykpn/lib/python3.6/site-packages/hydra/_internal/core_plugins/bash_completion.py", line 84, in query
print(" ".join(self._query(config_name=config_name, line=line)))
File "/home/goens/.virtualenvs/pykpn/lib/python3.6/site-packages/hydra/plugins/completion_plugin.py", line 213, in _query
config_name=config_name, overrides=words, run_mode=run_mode, strict=True
File "/home/goens/.virtualenvs/pykpn/lib/python3.6/site-packages/hydra/_internal/config_loader_impl.py", line 156, in load_configuration
from_shell=from_shell,
File "/home/goens/.virtualenvs/pykpn/lib/python3.6/site-packages/hydra/_internal/config_loader_impl.py", line 272, in _load_configuration
raise ConfigCompositionException(msg) from e
hydra.errors.ConfigCompositionException: You must specify 'test', e.g, test=<OPTION>
Available options:
st.py
Expected Behavior
Hydra would ignore the ??? when called with -sc and give me possible autocompletions instead of crashing.
System information
Hydra Version : 1.0.6
Python version : 3.6.10
Virtual environment type and version : virtualenv 20.3.0+ds
Operating system : Debian experimental (sid)
Additional context
I'd imagine this would also happen with the fish shell, as it seems to be the order in which hydra resolves the -sc argument, which I suppose is shell-independent, but I did not test it.
The text was updated successfully, but these errors were encountered:
馃悰 Bug
Description
When having a configuration that uses ??? in the defaults (to make specifying it mandatory), autocomplete crashes because it looks for that argument first.
Checklist
To reproduce
A minimal example,
test.py
in
conf/config.yaml
:** Minimal Code/Config snippet to reproduce **
$> export HYDRA_FULL_ERROR=1
$> python test.py t<tab>
** Stack trace/error message **
Expected Behavior
Hydra would ignore the ??? when called with
-sc
and give me possible autocompletions instead of crashing.System information
Additional context
I'd imagine this would also happen with the fish shell, as it seems to be the order in which hydra resolves the
-sc
argument, which I suppose is shell-independent, but I did not test it.The text was updated successfully, but these errors were encountered: