docs: state the supported PyTorch version range - #2854
Open
Ishkirat-Singh wants to merge 1 commit into
Open
Ishkirat-Singh wants to merge 1 commit into
Ishkirat-Singh wants to merge 1 commit into
Conversation
coremltools/_deps/__init__.py warns when torch is newer than _TORCH_MAX_VERSION (2.8.0) and disables coremltools.optimize.torch below _CT_OPTIMIZE_TORCH_MIN_VERSION (2.1.0), but neither the installation guide nor the README mentioned the range, so users only discovered it at import time. State it where users pick their torch version. Fixes apple#2823
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #2823
coremltools/_deps/__init__.pywarns at import when torch is newer than_TORCH_MAX_VERSION(2.8.0) and disablescoremltools.optimize.torchbelow_CT_OPTIMIZE_TORCH_MIN_VERSION(2.1.0), but neither the installation guide nor the README mentioned the range, so users only found out at import time (or, on torch 2.11+, from aModuleNotFoundError).This states the range where users choose their torch version:
docs-guides/source/installing-coremltools.md, "Install Third-party Packages": tested up to PyTorch 2.8, newer versions warn at import and may fail;coremltools.optimize.torchrequires PyTorch ≥ 2.1.README.md, "Install": one sentence pointing at that section.The numbers follow the constants in
_deps/__init__.pyand the maintainer confirmation in the issue thread; the wording is based on the reporter's suggestion there. Docs-only, no code changes.