Skip to content
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

hydra.errors.ConfigCompositionException: Error merging 'model/transformer' with schema #148

Open
yja2397 opened this issue Aug 3, 2021 · 2 comments

Comments

@yja2397
Copy link

yja2397 commented Aug 3, 2021

Title

  • hydra.errors.ConfigCompositionException: Error merging 'model/transformer' with schema

Description

./bin/main.py:167: UserWarning:
'model/transformer' is validated against ConfigStore schema with the same name.
This behavior is deprecated in Hydra 1.1 and will be removed in Hydra 1.2.
See https://hydra.cc/docs/next/upgrades/1.0_to_1.1/automatic_schema_matching for migration instructi
ons.
main()
Traceback (most recent call last):
File "C:\Users..\Anaconda3\lib\site-packages\hydra_internal\config_loader_impl.py", line 455,
in _load_single_config
merged = OmegaConf.merge(schema.config, ret.config)
File "C:\Users..\Anaconda3\lib\site-packages\omegaconf\omegaconf.py", line 264, in merge
target.merge_with(*configs[1:])
File "C:\Users..\Anaconda3\lib\site-packages\omegaconf\basecontainer.py", line 438, in merge_w
ith
self._format_and_raise(key=None, value=None, cause=e)
File "C:\Users..\Anaconda3\lib\site-packages\omegaconf\base.py", line 196, in _format_and_rais
e
type_override=type_override,
File "C:\Users..\Anaconda3\lib\site-packages\omegaconf_utils.py", line 741, in format_and_rai
se
_raise(ex, cause)
File "C:\Users..\Anaconda3\lib\site-packages\omegaconf_utils.py", line 719, in _raise
raise ex.with_traceback(sys.exc_info()[2]) # set end OC_CAUSE=1 for full backtrace
File "C:\Users..\Anaconda3\lib\site-packages\omegaconf\basecontainer.py", line 436, in merge_w
ith
self._merge_with(*others)
File "C:\Users..\Anaconda3\lib\site-packages\omegaconf\basecontainer.py", line 460, in merge
with
BaseContainer._map_merge(self, other)
File "C:\Users..\Anaconda3\lib\site-packages\omegaconf\basecontainer.py", line 378, in _map_me
rge
dest[key] = src._get_node(key)
File "C:\Users..\Anaconda3\lib\site-packages\omegaconf\dictconfig.py", line 311, in _setitem
_
key=key, value=value, type_override=ConfigKeyError, cause=e
File "C:\Users..\Anaconda3\lib\site-packages\omegaconf\base.py", line 196, in _format_and_rais
e
type_override=type_override,
File "C:\Users..\Anaconda3\lib\site-packages\omegaconf_utils.py", line 741, in format_and_rai
se
_raise(ex, cause)
File "C:\Users..\Anaconda3\lib\site-packages\omegaconf_utils.py", line 719, in _raise
raise ex.with_traceback(sys.exc_info()[2]) # set end OC_CAUSE=1 for full backtrace
File "C:\Users..\Anaconda3\lib\site-packages\omegaconf\dictconfig.py", line 308, in _setitem
_
self.__set_impl(key=key, value=value)
File "C:\Users..\Anaconda3\lib\site-packages\omegaconf\dictconfig.py", line 318, in __set_impl
self._set_item_impl(key, value)
File "C:\Users..\Anaconda3\lib\site-packages\omegaconf\basecontainer.py", line 493, in _set_it
em_impl
self._validate_set(key, value)
File "C:\Users..\Anaconda3\lib\site-packages\omegaconf\dictconfig.py", line 180, in validate
set
target = self._get_node(key) if key is not None else self
File "C:\Users..\Anaconda3\lib\site-packages\omegaconf\dictconfig.py", line 465, in _get_node
self._validate_get(key)
File "C:\Users..\Anaconda3\lib\site-packages\omegaconf\dictconfig.py", line 167, in validate
get
key=key, value=value, cause=ConfigAttributeError(msg)
File "C:\Users..\Anaconda3\lib\site-packages\omegaconf\base.py", line 196, in _format_and_rais
e
type_override=type_override,
File "C:\Users..\Anaconda3\lib\site-packages\omegaconf_utils.py", line 821, in format_and_rai
se
_raise(ex, cause)
File "C:\Users..\Anaconda3\lib\site-packages\omegaconf_utils.py", line 719, in _raise
raise ex.with_traceback(sys.exc_info()[2]) # set end OC_CAUSE=1 for full backtrace
omegaconf.errors.ConfigKeyError: Key 'ffnet_style' not in 'TransformerConfig'
full_key: ffnet_style
object_type=TransformerConfig

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "./bin/main.py", line 167, in
main()
File "C:\Users..\Anaconda3\lib\site-packages\hydra\main.py", line 53, in decorated_main
config_name=config_name,
File "C:\Users..\Anaconda3\lib\site-packages\hydra_internal\utils.py", line 368, in _run_hydr
a
lambda: hydra.run(
File "C:\Users..\Anaconda3\lib\site-packages\hydra_internal\utils.py", line 214, in run_and_r
eport
raise ex
File "C:\Users..\Anaconda3\lib\site-packages\hydra_internal\utils.py", line 211, in run_and_r
eport
return func()
File "C:\Users..\Anaconda3\lib\site-packages\hydra_internal\utils.py", line 371, in
overrides=args.overrides,
File "C:\Users..\Anaconda3\lib\site-packages\hydra_internal\hydra.py", line 91, in run
run_mode=RunMode.RUN,
File "C:\Users..\Anaconda3\lib\site-packages\hydra_internal\hydra.py", line 568, in compose_c
onfig
from_shell=from_shell,
File "C:\Users..\Anaconda3\lib\site-packages\hydra_internal\config_loader_impl.py", line 150,
in load_configuration
from_shell=from_shell,
File "C:\Users..\Anaconda3\lib\site-packages\hydra_internal\config_loader_impl.py", line 250,
in _load_configuration_impl
defaults=defaults_list.defaults, repo=caching_repo
File "C:\Users..\Anaconda3\lib\site-packages\hydra_internal\config_loader_impl.py", line 515,
in _compose_config_from_defaults_list
loaded = self._load_single_config(default=default, repo=repo)
File "C:\Users..\Anaconda3\lib\site-packages\hydra_internal\config_loader_impl.py", line 465,
in _load_single_config
) from e
hydra.errors.ConfigCompositionException: Error merging 'model/transformer' with schema

How could it solve? I tried Speech-Transformer and kospeech

Linked Issues

  • resolved #
@sooftware
Copy link
Owner

Hi! This repo is archived. Further development is conducted here.
This repo will help you.

@ddlBoJack
Copy link

hello, I came with similar problem with you:

Traceback (most recent call last):
  File "/opt/conda/lib/python3.8/site-packages/hydra/_internal/config_loader_impl.py", line 618, in _load_config_impl
    merged = OmegaConf.merge(schema.config, ret.config)
  File "/opt/conda/lib/python3.8/site-packages/omegaconf/omegaconf.py", line 321, in merge
    target.merge_with(*others[1:])
  File "/opt/conda/lib/python3.8/site-packages/omegaconf/basecontainer.py", line 331, in merge_with
    self._format_and_raise(key=None, value=None, cause=e)
  File "/opt/conda/lib/python3.8/site-packages/omegaconf/base.py", line 95, in _format_and_raise
    format_and_raise(
  File "/opt/conda/lib/python3.8/site-packages/omegaconf/_utils.py", line 629, in format_and_raise
    _raise(ex, cause)
  File "/opt/conda/lib/python3.8/site-packages/omegaconf/_utils.py", line 610, in _raise
    raise ex  # set end OC_CAUSE=1 for full backtrace
  File "/opt/conda/lib/python3.8/site-packages/omegaconf/basecontainer.py", line 329, in merge_with
    self._merge_with(*others)
  File "/opt/conda/lib/python3.8/site-packages/omegaconf/basecontainer.py", line 347, in _merge_with
    BaseContainer._map_merge(self, other)
  File "/opt/conda/lib/python3.8/site-packages/omegaconf/basecontainer.py", line 294, in _map_merge
    dest_node._merge_with(src_value)
  File "/opt/conda/lib/python3.8/site-packages/omegaconf/basecontainer.py", line 347, in _merge_with
    BaseContainer._map_merge(self, other)
  File "/opt/conda/lib/python3.8/site-packages/omegaconf/basecontainer.py", line 294, in _map_merge
    dest_node._merge_with(src_value)
  File "/opt/conda/lib/python3.8/site-packages/omegaconf/basecontainer.py", line 347, in _merge_with
    BaseContainer._map_merge(self, other)
  File "/opt/conda/lib/python3.8/site-packages/omegaconf/basecontainer.py", line 294, in _map_merge
    dest_node._merge_with(src_value)
  File "/opt/conda/lib/python3.8/site-packages/omegaconf/basecontainer.py", line 347, in _merge_with
    BaseContainer._map_merge(self, other)
  File "/opt/conda/lib/python3.8/site-packages/omegaconf/basecontainer.py", line 314, in _map_merge
    dest[key] = src._get_node(key)
  File "/opt/conda/lib/python3.8/site-packages/omegaconf/dictconfig.py", line 258, in __setitem__
    self._format_and_raise(
  File "/opt/conda/lib/python3.8/site-packages/omegaconf/base.py", line 95, in _format_and_raise
    format_and_raise(
  File "/opt/conda/lib/python3.8/site-packages/omegaconf/_utils.py", line 629, in format_and_raise
    _raise(ex, cause)
  File "/opt/conda/lib/python3.8/site-packages/omegaconf/_utils.py", line 610, in _raise
    raise ex  # set end OC_CAUSE=1 for full backtrace
omegaconf.errors.ConfigKeyError: Key 'decoding.silweight' not in 'AxConfig'
        full_key: hydra.sweeper.ax_config.decoding.silweight
        reference_type=AxConfig
        object_type=AxConfig

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "examples/speech_recognition/new/infer.py", line 477, in <module>
    cli_main()
  File "examples/speech_recognition/new/infer.py", line 473, in cli_main
    hydra_main()  # pylint: disable=no-value-for-parameter
  File "/opt/conda/lib/python3.8/site-packages/hydra/main.py", line 32, in decorated_main
    _run_hydra(
  File "/opt/conda/lib/python3.8/site-packages/hydra/_internal/utils.py", line 354, in _run_hydra
    run_and_report(
  File "/opt/conda/lib/python3.8/site-packages/hydra/_internal/utils.py", line 201, in run_and_report
    raise ex
  File "/opt/conda/lib/python3.8/site-packages/hydra/_internal/utils.py", line 198, in run_and_report
    return func()
  File "/opt/conda/lib/python3.8/site-packages/hydra/_internal/utils.py", line 355, in <lambda>
    lambda: hydra.multirun(
  File "/opt/conda/lib/python3.8/site-packages/hydra/_internal/hydra.py", line 123, in multirun
    cfg = self.compose_config(
  File "/opt/conda/lib/python3.8/site-packages/hydra/_internal/hydra.py", line 507, in compose_config
    cfg = self.config_loader.load_configuration(
  File "/opt/conda/lib/python3.8/site-packages/hydra/_internal/config_loader_impl.py", line 151, in load_configuration
    return self._load_configuration(
  File "/opt/conda/lib/python3.8/site-packages/hydra/_internal/config_loader_impl.py", line 256, in _load_configuration
    cfg = self._merge_defaults_into_config(
  File "/opt/conda/lib/python3.8/site-packages/hydra/_internal/config_loader_impl.py", line 804, in _merge_defaults_into_config
    hydra_cfg = merge_defaults_list_into_config(hydra_cfg, system_list)
  File "/opt/conda/lib/python3.8/site-packages/hydra/_internal/config_loader_impl.py", line 777, in merge_defaults_list_into_config
    merged_cfg = self._merge_config(
  File "/opt/conda/lib/python3.8/site-packages/hydra/_internal/config_loader_impl.py", line 695, in _merge_config
    loaded_cfg, _ = self._load_config_impl(
  File "/opt/conda/lib/python3.8/site-packages/hydra/_internal/config_loader_impl.py", line 628, in _load_config_impl
    raise ConfigCompositionException(
hydra.errors.ConfigCompositionException: Error merging 'hydra/sweeper/ax' with schema

I want to know how you solved it. Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants