Skip to content

Add Levenshtein and nltk to requirements.txt #1365

Description

@TheFloatingString

Describe the bug

Using a Pipenv environment, I get a ModuleNotFoundError for Levenshtein and nltk when trying to run python -m jiant.scripts.benchmarks.benchmark_submission_formatter.

To Reproduce

  1. Jiant v2.2.0
  2. Windows 11, Pipenv environment
  3. Config artifact: N/A

Expected behavior

python -m jiant.scripts.benchmarks.benchmark_submission_formatter should run without any ModuleNotFoundError errors.

pipenv install -r requirements.txt should install all the dependencies required for this project. However, in a Pipenv environment, the Levenshtein and nltk libraries are not included, as the requirements.txt file does not include Levenshtein and nltk.

As a result, running python -m jiant.scripts.benchmarks.benchmark_submission_formatter returns a ModuleNotFoundError for both dependencies.

While separately installing both Levenshtein and nltk is a quick fix, including both dependencies in the requirements.txt file in the root directory would solve these import errors when a user runs jiant in a new virtual environment where Levenshtein and nltk are not yet installed.

Additional context

Proposed additions to requirements.txt:

nltk==3.8.1
Levenshtein==0.23.0

Please not that I have not yet run tests using these versions, and that further review may be needed to ensure that all unit tests pass using these specific versions.

I'm happy to create a new branch and to add these two dependencies to the requirements* files, though please let me know which next steps would be the most ideal.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions