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

This problem occurs when running the script:allennlp.common.checks.ConfigurationError:key 'data_loader' is required #25

Open
wxs1208 opened this issue Jan 22, 2021 · 1 comment

Comments

@wxs1208
Copy link

wxs1208 commented Jan 22, 2021

Traceback (most recent call last):
File "/.virtualenvs/bort_test/lib/python3.6/site-packages/allennlp/common/params.py", line 239, in pop
value = self.params.pop(key)
KeyError: 'data_loader'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/.virtualenvs/bort_test/bin/allennlp", line 9, in
sys.exit(run())
File "/.virtualenvs/bort_test/lib/python3.6/site-packages/allennlp/main.py", line 34, in run
main(prog="allennlp")
File "/.virtualenvs/bort_test/lib/python3.6/site-packages/allennlp/commands/init.py", line 94, in main
args.func(args)
File "/.virtualenvs/bort_test/lib/python3.6/site-packages/allennlp/commands/train.py", line 112, in train_model_from_args
file_friendly_logging=args.file_friendly_logging,
File "/.virtualenvs/bort_test/lib/python3.6/site-packages/allennlp/commands/train.py", line 171, in train_model_from_file
file_friendly_logging=file_friendly_logging,
File "/.virtualenvs/bort_test/lib/python3.6/site-packages/allennlp/commands/train.py", line 232, in train_model
file_friendly_logging=file_friendly_logging,
File "/.virtualenvs/bort_test/lib/python3.6/site-packages/allennlp/commands/train.py", line 423, in _train_worker
params=params, serialization_dir=serialization_dir, local_rank=process_rank,
File "/.virtualenvs/bort_test/lib/python3.6/site-packages/allennlp/common/from_params.py", line 583, in from_params
**extras,
File "/.virtualenvs/bort_test/lib/python3.6/site-packages/allennlp/common/from_params.py", line 612, in from_params
kwargs = create_kwargs(constructor_to_inspect, cls, params, **extras)
File "/.virtualenvs/bort_test/lib/python3.6/site-packages/allennlp/common/from_params.py", line 182, in create_kwargs
cls.name, param_name, annotation, param.default, params, **extras
File "/.virtualenvs/bort_test/lib/python3.6/site-packages/allennlp/common/from_params.py", line 283, in pop_and_construct_arg
popped_params = params.pop(name, default) if default != _NO_DEFAULT else params.pop(name)
File "/.virtualenvs/bort_test/lib/python3.6/site-packages/allennlp/common/params.py", line 247, in pop
raise ConfigurationError(msg)
allennlp.common.checks.ConfigurationError: key "data_loader" is required
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/administrator/dont-stop-pretraining/scripts/train.py", line 145, in
main()
File "/home/administrator/dont-stop-pretraining/scripts/train.py", line 141, in main
subprocess.run(" ".join(allennlp_command), shell=True, check=True)
File "/usr/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'allennlp train --include-package dont_stop_pretraining training_config/classifier.jsonnet -s model_logs/citation_intent_base' returned non-zero exit status 1.

the script is :
python -m scripts.train
--config training_config/classifier.jsonnet
--serialization_dir model_logs/citation_intent_base
--hyperparameters ROBERTA_CLASSIFIER_SMALL
--dataset citation_intent
--model roberta-base
--device 0
--perf +f1
--evaluate_on_test

@kernelmachine
Copy link
Contributor

Hi there, sorry it's unclear how to help with this -- I would make sure that you've installed the pinned allennlp version and see if the error still occurs.

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