Skip to content

pyhocon: Cannot resolve variable ${t5_3b_ace05_wu08} #10

Description

@Niklss

ere.conf missing subconfig t5_3b_ace05_wu08

On
python ./run_ere.py t0_3b_conll04 0

06/04/2023 20:04:34 - INFO - util.func - Running experiment: t0_3b_conll04
Traceback (most recent call last):
File "/opt/conda/lib/python3.10/site-packages/pyhocon/config_parser.py", line 478, in _resolve_variable
return True, config.get(variable)
File "/opt/conda/lib/python3.10/site-packages/pyhocon/config_tree.py", line 236, in get
return self._get(ConfigTree.parse_key(key), 0, default)
File "/opt/conda/lib/python3.10/site-packages/pyhocon/config_tree.py", line 176, in _get
raise ConfigMissingException(
pyhocon.exceptions.ConfigMissingException: 'No configuration setting found for key t5_3b_ace05_wu08'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/jovyan/au/ASP/./run_ere.py", line 99, in
runner = ERERunner(
File "/home/jovyan/au/ASP/util/runner.py", line 50, in init
self.config = util.initialize_config(config_name, config_file=config_file)
File "/home/jovyan/au/ASP/util/func.py", line 24, in initialize_config
config = pyhocon.ConfigFactory.parse_file(join("./", config_file))[config_name]
File "/opt/conda/lib/python3.10/site-packages/pyhocon/config_parser.py", line 142, in parse_file
return cls.parse_string(content, os.path.dirname(filename), resolve, unresolved_value)
File "/opt/conda/lib/python3.10/site-packages/pyhocon/config_parser.py", line 192, in parse_string
return ConfigParser().parse(content, basedir, resolve, unresolved_value)
File "/opt/conda/lib/python3.10/site-packages/pyhocon/config_parser.py", line 460, in parse
has_unresolved = cls.resolve_substitutions(config, allow_unresolved)
File "/opt/conda/lib/python3.10/site-packages/pyhocon/config_parser.py", line 646, in resolve_substitutions
is_optional_resolved, resolved_value = cls._resolve_variable(config, substitution)
File "/opt/conda/lib/python3.10/site-packages/pyhocon/config_parser.py", line 487, in _resolve_variable
raise ConfigSubstitutionException(
pyhocon.exceptions.ConfigSubstitutionException: Cannot resolve variable ${t5_3b_ace05_wu08} (line: 191, col: 20)

To fix it

  • Add a subconfig t5_3b_ace05_wu08 to ere.conf
  • Remove flant5_xxl_ace05 subconfig
  • Change ${t5_3b_ace05_wu08} to ${t5_3b_ace05} (link to another subconfig)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions