AnswerDotAI / AnswerDotAI/rerankers

Support for MacOS

Open
#71 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.6k
Forks
104
PR merge metrics
No merged PRs in 30d

Description

I was trying to use Reranker in my macos machine. I tried to install the package using `uv add "rerankers[monovlm]"` but got the below error.
I looks like the package has a dependency on `flash-attn` which is not supported in macos.
```
Resolved 156 packages in 527ms
× Failed to build `flash-attn==2.8.3`
├─▶ The build backend returned an error
╰─▶ Call to `setuptools.build_meta:__legacy__.build_wheel` failed (exit status: 1)

[stderr]
Traceback (most recent call last):
File "", line 14, in
File "/Users/imran/.cache/uv/builds-v0/.tmpZ97s55/lib/python3.12/site-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/imran/.cache/uv/builds-v0/.tmpZ97s55/lib/python3.12/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
self.run_setup()
File "/Users/imran/.cache/uv/builds-v0/.tmpZ97s55/lib/python3.12/site-packages/setuptools/build_meta.py", line 512, in run_setup
super().run_setup(setup_script=setup_script)
File "/Users/imran/.cache/uv/builds-v0/.tmpZ97s55/lib/python3.12/site-packages/setuptools/build_meta.py", line 317, in run_setup
exec(code, locals())
File "", line 22, in
ModuleNotFoundError: No module named 'torch'

hint: This error likely indicates that `flash-attn@2.8.3` depends on `torch`, but doesn't declare it as a build dependency. If `flash-attn` is a
first-party package, consider adding `torch` to its `build-system.requires`. Otherwise, either add it to your `pyproject.toml` under:

[tool.uv.extra-build-dependencies]
flash-attn = ["torch"]

or `uv pip install torch` into the environment and re-run with `--no-build-isolation`.
help: If you want to add the package regardless of the failed resolution, provide the `--frozen` flag to skip locking and syncing.
```

I've tried force install the package ignoring the flash-attn dependency. But then when I ran the below code, I realized that macos's gpu `mps` is also not supported.
```
from rerankers import Reranker

ranker = Reranker("monovlm", device="mps")
```

Do you have any plan to make this package work on MacOS?

Thanks!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.