Fix GPL-3.0 license compatibility issue with rouge_score #751
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Template
Type of Change
Please delete options that are not relevant.
Description
This PR resolves the GPL-3.0 license compatibility issue by replacing the
rouge_scorepackage dependency withrouge-score.Problem:
The project uses the Apache 2.0 license, but had a dependency on
rouge_scorewhich is licensed under GPL-3.0. These licenses are incompatible - GPL-3.0 requires derivative works to also be GPL-3.0 licensed, which conflicts with Apache 2.0.Solution:
Replaced all references to the
rouge_scorepackage withrouge-score, which is also a Google Brain implementation but is licensed under Apache 2.0. Therouge-scorepackage is a drop-in replacement that provides the same API (rouge_score.rouge_scorer.RougeScorer).Changes made:
lazy_load_depcalls inuptrain/operators/language/rouge.pyto use "rouge-score" packagelazy_load_depcalls inuptrain/operators/embs.pyfor consistencyNote: The CLI (
uptrain/cli.py) and documentation examples already referenced the correctrouge-scorepackage, so no changes were needed there.Fixes #748
Checklist
Author's Note
This is a critical license compliance fix that ensures the project remains fully Apache 2.0 compatible. The change is minimal and non-breaking since:
rouge-scorepackage provides the exact same API asrouge_scorerouge_score.rouge_scorer(no code changes needed elsewhere)rouge_scoreinstalled can simply replace it withrouge-scoreTesting: The changes maintain backward compatibility as the API surface remains identical. The
lazy_load_depfunction will now correctly guide users to install the Apache 2.0 licensed package when they use ROUGE score features.No tests added: This is a dependency package name change only - the functionality and API remain identical, so existing tests continue to validate correctness.
No CHANGELOG entry: The repository doesn't maintain a CHANGELOG file.