Skip to content

Conversation

@yttrium400
Copy link

Pull Request Template

Type of Change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Description

This PR resolves the GPL-3.0 license compatibility issue by replacing the rouge_score package dependency with rouge-score.

Problem:
The project uses the Apache 2.0 license, but had a dependency on rouge_score which 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_score package with rouge-score, which is also a Google Brain implementation but is licensed under Apache 2.0. The rouge-score package is a drop-in replacement that provides the same API (rouge_score.rouge_scorer.RougeScorer).

Changes made:

  1. Updated lazy_load_dep calls in uptrain/operators/language/rouge.py to use "rouge-score" package
  2. Updated lazy_load_dep calls in uptrain/operators/embs.py for consistency
  3. Added inline comments documenting the license compatibility reason

Note: The CLI (uptrain/cli.py) and documentation examples already referenced the correct rouge-score package, so no changes were needed there.

Fixes #748

Checklist

  • I have read the CONTRIBUTING document.
  • My code follows the code style (BLACK) of this project.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the documentation accordingly.
  • I have added an appropriate CHANGELOG entry.

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:

  • The rouge-score package provides the exact same API as rouge_score
  • The module import name remains rouge_score.rouge_scorer (no code changes needed elsewhere)
  • The CLI already specified the correct package name
  • Users who have rouge_score installed can simply replace it with rouge-score

Testing: The changes maintain backward compatibility as the API surface remains identical. The lazy_load_dep function 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.

Swastik Lohchab added 3 commits December 6, 2025 23:14
Changed package name from 'rouge_score' to 'rouge-score' (Apache 2.0)
to resolve license compatibility issue with Apache 2.0 project license.

The rouge-score package is a Google Brain implementation that is
Apache 2.0 licensed, unlike the GPL-3.0 rouge_score package.

Refs uptrain-ai#748
Updated lazy_load_dep call to use 'rouge-score' package name
for consistency with license fix.

Refs uptrain-ai#748
Document why rouge-score package is used instead of rouge_score
for better code maintainability and clarity.
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.

Dependency License Issue: rogue_score (GPL-3.0) is not compatible with Apache 2.0

1 participant