apple / apple/coremltools

coremltools-8.0b2 requires torchvision

Open
#2,318 1 comment 0 reactions 1 assignee Claimed by @DawerG View on GitHub
bug
Dominant language
Python
Stars
5.4k
Forks
850
Avg merge
4d 5h
Merged PRs (30d)
10

Description

## 🐞Describing the bug
It looks like `coremltools` now requires `torchvision`. Is this expected?

## Stack Trace

```
Traceback (most recent call last):
File "", line 1, in
File "conda/lib/python3.11/site-packages/coremltools/__init__.py", line 97, in
from . import converters, models, optimize, proto
...
File ".conda/lib/python3.11/site-packages/coremltools/optimize/torch/_utils/graph_utils.py", line 14, in
import torchvision as _torchvision
ModuleNotFoundError: No module named 'torchvision'
```

## To Reproduce

```shell
conda create -n repro python=3.11 -y && conda activate && pip install coremltools==8.0b2 && python -c "import coremltools as ct"
```

## System environment (please complete the following information):

- coremltools version: 8.0b2
- OS (e.g. MacOS version or Linux type): 24B5024e
- Any other relevant version information (e.g. PyTorch or TensorFlow version): Python 3.11.9

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.