Skip to content

Make torch_xla package PEP 561 compliant #9515

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

wirthual
Copy link

The repo seems to be using type hints very thoroghly, this PR adds changes to make the package PEP 561 compliant:

https://peps.python.org/pep-0561/

This avoids errors like the following when using mypy:

infinity_emb/inference/loading_strategy.py:13: error: Cannot find implementation or library stub for module named "torch_xla"  [import-not-found]

Torch package does the same

Copy link
Collaborator

@qihqi qihqi left a comment

Choose a reason for hiding this comment

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

Thanks!

@qihqi qihqi enabled auto-merge (squash) August 1, 2025 23:42
auto-merge was automatically disabled August 2, 2025 16:51

Head branch was pushed to by a user without write access

@qihqi qihqi enabled auto-merge (squash) August 4, 2025 03:39
auto-merge was automatically disabled August 4, 2025 14:02

Head branch was pushed to by a user without write access

@wirthual
Copy link
Author

wirthual commented Aug 4, 2025

Did a yapf -i setup.py with yapf version 0.40.2. Linting problem should be fixed now.

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.

2 participants