ImportError
Search before asking
- [X] I have searched the Inference issues and found no similar bug report.
Bug
When trying to do
from inference.models import YOLOWorld
or
from inference.models import Clip
It gives an importerror. when changing the code to:
from inference.models.yolo_world import YOLOWorld
and
from inference.models.clip import Clip
it works. The versions of the imports that give import errors are also used in the package itself, it is used in /inference/models/yolo_world/yolo_world.py for instance.
I fixed it for myself, but the package should probably be updated with this small change.
Environment
No response
Minimal Reproducible Example
No response
Additional
No response
Are you willing to submit a PR?
- [X] Yes I'd like to help by submitting a PR!
Yeah, that's not super clear as we've missed that in one of docs iteration.
Idea is the following - each model is plug-in to the inference package installable as extras (due to various aspects of licensing for different models)
We definitely need a docs page showcasing all extras we support. As a quick way to help you, let me provide this link: https://github.com/roboflow/inference/blob/main/.release/pypi/inference.cpu.setup.py#L58
pip install "inference[<extras-name>]"
Hi, I'm having the same issue. I tried doing pip install inference[yolo-world] but it says 'no matches found'. I'm on python 3.10, tested with 3.11.9 too, but same problem. I tried changing the internal package imports but it's not working.
Hi there,
thanks for reporting. Could u verify one thing:
pip install inference[yolo-world]
zsh: no matches found: inference[yolo-world] # this breaks on my end
but this:
pip install "inference[yolo-world]"
seems to be working fine, I made mistake in my previous response, fixed in now.
Really sorry for confusion