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

run_ner.py error:Is this error related to the path of Pretrained LM? #3

Closed
Hubotcoder opened this issue Dec 12, 2022 · 2 comments
Closed

Comments

@Hubotcoder
Copy link

12/12/2022 16:09:12 - INFO - util.func - Running experiment: t5_base
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\conda\conda\envs\asp\lib\site-packages\pyhocon\config_parser.py", line 538, in _resolve_variable
return True, config.get(variable)
File "C:\Users\Administrator\AppData\Local\conda\conda\envs\asp\lib\site-packages\pyhocon\config_tree.py", line 236, in get
return self._get(ConfigTree.parse_key(key), 0, default)
File "C:\Users\Administrator\AppData\Local\conda\conda\envs\asp\lib\site-packages\pyhocon\config_tree.py", line 176, in _get
raise ConfigMissingException(
pyhocon.exceptions.ConfigMissingException: 'No configuration setting found for key ASP'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:/svn/ASPCoref/run_ner.py", line 94, in
runner = NERRunner(
File "D:\svn\ASPCoref\util\runner.py", line 50, in init
self.config = util.initialize_config(config_name, config_file=config_file)
File "D:\svn\ASPCoref\util\func.py", line 24, in initialize_config
config = pyhocon.ConfigFactory.parse_file(join("./", config_file))[config_name]
File "C:\Users\Administrator\AppData\Local\conda\conda\envs\asp\lib\site-packages\pyhocon\config_parser.py", line 152, in parse_file
return cls.parse_string(content, os.path.dirname(filename), resolve, unresolved_value)
File "C:\Users\Administrator\AppData\Local\conda\conda\envs\asp\lib\site-packages\pyhocon\config_parser.py", line 202, in parse_string
return ConfigParser().parse(content, basedir, resolve, unresolved_value)
File "C:\Users\Administrator\AppData\Local\conda\conda\envs\asp\lib\site-packages\pyhocon\config_parser.py", line 521, in parse
has_unresolved = cls.resolve_substitutions(config, allow_unresolved)
File "C:\Users\Administrator\AppData\Local\conda\conda\envs\asp\lib\site-packages\pyhocon\config_parser.py", line 703, in resolve_substitutions
is_optional_resolved, resolved_value = cls._resolve_variable(config, substitution)
File "C:\Users\Administrator\AppData\Local\conda\conda\envs\asp\lib\site-packages\pyhocon\config_parser.py", line 547, in _resolve_variable
raise ConfigSubstitutionException(
pyhocon.exceptions.ConfigSubstitutionException: Cannot resolve variable ${ASP} (line: 5, col: 14)

@lyutyuh
Copy link
Owner

lyutyuh commented Dec 12, 2022

Hello! $ASP is the directory where you clone the ASP repo. After cloning you should set ASP to the directory, as shown in the Setup section in README:

git clone https://github.com/lyutyuh/ASP.git
cd ASP
export ASP=$PWD

@Hubotcoder
Copy link
Author

Hello! $ASP is the directory where you clone the ASP repo. After cloning you should set ASP to the directory, as shown in the Setup section in README:

git clone https://github.com/lyutyuh/ASP.git
cd ASP
export ASP=$PWD

Thank you for your quick reply! Problem solved! I use the following code in my Windows system:
set ASP=D:\svn\ASPCoref

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

2 participants