Skip to content

fix: python version compatibility and mypy issues#54

Merged
begumcig merged 6 commits intomainfrom
fix/mypy_errors_with_transformers
Apr 10, 2025
Merged

fix: python version compatibility and mypy issues#54
begumcig merged 6 commits intomainfrom
fix/mypy_errors_with_transformers

Conversation

@begumcig
Copy link
Member

@begumcig begumcig commented Apr 9, 2025

Description

transformers == 4.51 introduced some mypy errors as referenced huggingface/transformers#37339
Also addresses compatibility issues with Python <3.10 caused by the use of the | (union) operator.

Type of Change

  • 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

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@llcnt llcnt requested a review from johannaSommer April 10, 2025 14:28
@begumcig begumcig requested a review from llcnt April 10, 2025 15:19
@begumcig begumcig marked this pull request as ready for review April 10, 2025 15:19
Copy link
Collaborator

@llcnt llcnt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I re-ran some tests (no time to run them all unfortunately) just to be sure, and looks good :)

@begumcig begumcig merged commit 6a0981d into main Apr 10, 2025
8 checks passed
@johannaSommer johannaSommer deleted the fix/mypy_errors_with_transformers branch May 19, 2025 13:32
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.

3 participants