fix(install): add Python 3.13 triton dependency for Intel GPU extras#4372
fix(install): add Python 3.13 triton dependency for Intel GPU extras#4372BillionClaw wants to merge 1 commit into
Conversation
The unsloth_zoo[intelgpu] extra pulls in triton>=3.0.0 from PyPI, but PyPI triton 3.6.0 doesn't have Python 3.13 wheels. This causes pip to fail when installing unsloth[intelgputorch210] on Python 3.13. Add a direct triton wheel URL for Python 3.13 to all Intel GPU extras (intelgputorch260, intelgputorch270, intelgputorch280, intelgputorch290, intelgputorch210) to override the PyPI dependency. Fixes unslothai#4319
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enables Python 3.13 support for Intel GPU installations by resolving a critical dependency issue with the Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly addresses an installation failure on Python 3.13 for Intel GPU extras by pinning a compatible version of the triton dependency. My review includes two main suggestions. First, for security, a file hash should be added to the direct wheel URL, which is a high-priority issue. Second, to improve maintainability, the duplicated dependency line across five extras should be refactored into a single, reusable optional dependency group. These changes will make the project more secure and easier to manage in the long run.
| "unsloth_zoo[intelgpu]", | ||
| "unsloth[huggingfacenotorch]", | ||
|
|
||
| "triton @ https://download.pytorch.org/whl/triton-3.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl ; 'linux' in sys_platform and python_version == '3.13' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')", |
There was a problem hiding this comment.
For security, it's crucial to add a file hash to this direct URL dependency. Without a hash, your project is vulnerable to supply-chain attacks if the file at the URL is ever compromised. Other dependencies in this file already follow this best practice.
Please calculate the SHA256 hash for the wheel and append it to the URL like this:
"...whl#sha256=<your_hash_here> ; ..."You can generate the hash with pip hash <URL>. This should be done for all 5 new triton dependencies.
| "unsloth_zoo[intelgpu]", | ||
| "unsloth[huggingfacenotorch]", | ||
|
|
||
| "triton @ https://download.pytorch.org/whl/triton-3.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl ; 'linux' in sys_platform and python_version == '3.13' and (platform_machine == 'AMD64' or platform_machine == 'x86_64')", |
There was a problem hiding this comment.
This dependency line is duplicated in 5 different intelgputorch... extras. To improve maintainability, I recommend creating a new, dedicated optional-dependency group for this Python 3.13 triton wheel and then referencing it.
For example, you could add a new group:
[project.optional-dependencies]
...
intelgputritonpy313 = [
"triton @ https://...whl#sha256=... ; 'linux' in sys_platform and python_version == '3.13' and ...",
]Then, you can simply include it in the intelgputorch260 extra (and the other 4) like so:
intelgputorch260 = [
"unsloth[intelgputritonpy313]",
"unsloth_zoo[intelgpu]",
...
]This will make future updates to this dependency much easier, as you'll only need to change it in one place.
|
Closing per ClawOSS blocklist — repo has 100% closure rate and no maintainer engagement. |
|
Sorry on the delay, we fixed it in #5484. Appreciate the PR again! |
Problem
Installing
unsloth[intelgputorch210](and other Intel GPU extras) on Python 3.13 fails because theunsloth_zoo[intelgpu]dependency requirestriton>=3.0.0, but PyPI triton 3.6.0 does not have Python 3.13 wheels available.Error:
Root Cause
The
unsloth_zoo[intelgpu]extra specifiestriton>=3.0.0as a dependency. When pip tries to resolve this on Python 3.13, it selects version 3.6.0 which does not have Python 3.13 wheels on PyPI.Fix
Add a direct triton wheel URL (version 3.2.0 with Python 3.13 support) to all Intel GPU extras:
This provides pip with a Python 3.13 compatible triton wheel before it attempts to resolve from PyPI, avoiding the version conflict.
Changes
Fixes #4319