Skip to content

docs: state the supported PyTorch version range - #2854

Open
Ishkirat-Singh wants to merge 1 commit into
apple:mainfrom
Ishkirat-Singh:docs/torch-supported-versions
Open

Ishkirat-Singh wants to merge 1 commit into
apple:mainfrom
Ishkirat-Singh:docs/torch-supported-versions

Conversation

@Ishkirat-Singh

Copy link
Copy Markdown

Fixes #2823

coremltools/_deps/__init__.py warns at import 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 found out at import time (or, on torch 2.11+, from a ModuleNotFoundError).

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.torch requires PyTorch ≥ 2.1.
  • README.md, "Install": one sentence pointing at that section.

The numbers follow the constants in _deps/__init__.py and the maintainer confirmation in the issue thread; the wording is based on the reporter's suggestion there. Docs-only, no code changes.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant