evaluate icon indicating copy to clipboard operation
evaluate copied to clipboard

Fix wrong lib name in ImportError mesage

Open milistu opened this issue 1 year ago • 0 comments

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 avatar Apr 18 '24 10:04 milistu