Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

allennlp test-install broken without checklist #5588

Closed
h-vetinari opened this issue Mar 10, 2022 · 3 comments · Fixed by #5589
Closed

allennlp test-install broken without checklist #5588

h-vetinari opened this issue Mar 10, 2022 · 3 comments · Fixed by #5589
Labels

Comments

@h-vetinari
Copy link
Contributor

This is a bit of fall-out from #5507; encountered in conda-forge/allennlp-feedstock#35

+ allennlp test-install
[...]/lib/python3.9/site-packages/allennlp/confidence_checks/task_checklists/__init__.py:15: UserWarning: To use the checklist integration you should install ``allennlp`` with the "checklist" extra (e.g. ``pip install allennlp[checklist]``) or just install checklist after the fact.
  warnings.warn(
Traceback (most recent call last):
  File "[...]/bin/allennlp", line 11, in <module>
    sys.exit(run())
  File "[...]/lib/python3.9/site-packages/allennlp/__main__.py", line 39, in run
    main(prog="allennlp")
  File "[...]/lib/python3.9/site-packages/allennlp/commands/__init__.py", line 121, in main
    parser, args = parse_args(prog)
  File "[...]/lib/python3.9/site-packages/allennlp/commands/__init__.py", line 109, in parse_args
    import_plugins()
  File "[...]/lib/python3.9/site-packages/allennlp/common/plugins.py", line 79, in import_plugins
    import_module_and_submodules(
  File "[...]/lib/python3.9/site-packages/allennlp/common/util.py", line 362, in import_module_and_submodules
    import_module_and_submodules(subpackage, exclude=exclude)
  File "[...]/lib/python3.9/site-packages/allennlp/common/util.py", line 362, in import_module_and_submodules
    import_module_and_submodules(subpackage, exclude=exclude)
  File "[...]/lib/python3.9/site-packages/allennlp/common/util.py", line 351, in import_module_and_submodules
    module = importlib.import_module(package_name)
  File "[...]/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
    from allennlp.confidence_checks.task_checklists.task_suite import TaskSuite
  File "[...]/lib/python3.9/site-packages/allennlp/confidence_checks/task_checklists/task_suite.py", line 6, in <module>
    from checklist.test_suite import TestSuite
ModuleNotFoundError: No module named 'checklist'
@vikigenius
Copy link
Contributor

I don't this is specific to conda, I just encountered this error yesterday and I used pip to install allennlp. Using allennlp train command gives me the error.

@h-vetinari
Copy link
Contributor Author

Yup, this is not conda-specific. The fix in #5589 should also not be conda-specific, I hope. 🙃

@aphedges
Copy link
Contributor

I encountered this problem using a model from allennlp-models, and I can confirm that installing directly from the PR with pip fixes it.

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

Successfully merging a pull request may close this issue.

3 participants