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

Fix wrong lib name in ImportError mesage #577

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

milistu
Copy link

@milistu milistu commented Apr 18, 2024

Summary

This PR addresses an issue encountered during the setup of the rouge metric via the evaluate library.

After attempting to load rouge with rouge = evaluate.load("rouge");, I was prompted to install additional dependencies (nltk, rouge_score, absl). However, an error occurred while trying to install absl, revealing a misnaming issue in the installation process.

This PR corrects the library name to absl-py, which is the correct identifier for pip installations.

Additionally, this PR applies code styling to various files in the repository, which I assume were committed without running the make style command.

Changes

  • Corrected the library naming to fix the ImportError encountered when setting up the rouge metric.
      library_import_name = "absl-py" if library_import_name == "absl" else library_import_name
  • Ran the make style command to apply code styling. This command formatted not only the modified file but also other files in the repository.

Impact

  • Correctness: Ensures that the library name is correct in the ImportError message for a better user experience.
  • Code Quality: Increases the uniformity of the codebase by enforcing style guidelines across all files, which may not have been properly formatted in past contributions.

@milistu milistu changed the title Fix missing lib name Fix wrong lib name in ImportError mesage Apr 18, 2024
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

Successfully merging this pull request may close these issues.

1 participant