eto-ai / rikai

Parquet-based ML data format optimized for working with unstructured data
https://rikai.readthedocs.io/en/latest/
Apache License 2.0
136 stars 19 forks source link

Loading torchvision model types lazily #692

Closed da-liii closed 1 year ago

da-liii commented 1 year ago

With #691, we will solve the problem that torchvision version is fixed.

However, for now, the torchvision dependencies are required even when we are using Rikai with Tensorflow.

https://github.com/eto-ai/rikai/blob/28726a0f8ffb1c9f092bbb7bb4987908b3472112/python/rikai/pytorch/models/__init__.py#L17-L26

I suggest that we should not load the above model types when torchvision is not installed.