Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onnx .dylib link [Mac M3/ARM/MACOS] #909

Open
farris opened this issue Sep 22, 2024 · 1 comment
Open

onnx .dylib link [Mac M3/ARM/MACOS] #909

farris opened this issue Sep 22, 2024 · 1 comment

Comments

@farris
Copy link

farris commented Sep 22, 2024

Describe the bug
When following the steps to build the generate() API from source link, there is an issue linking the API back to the onnxruntime dependency

Traceback (most recent call last):
  File "onnxruntime-genai/examples/python/phi3-qa.py", line 1, in <module>
    import onnxruntime_genai as og
  File "/.venvs/universal_venv/lib/python3.12/site-packages/onnxruntime_genai/__init__.py", line 9, in <module>
    _dll_directory.add_onnxruntime_dependency(__id__)
  File "/.venvs/universal_venv/lib/python3.12/site-packages/onnxruntime_genai/_dll_directory.py", line 62, in add_onnxruntime_dependency
    raise ImportError("Could not find the onnxruntime shared library.")
ImportError: Could not find the onnxruntime shared library.

Expected behavior
To fix it, I changed the _dll_directory script to point to the onnx dylib

target_lib_path = "~/Desktop/dev/onnxruntime-genai/ort/lib/libonnxruntime.dylib"

Additional context
Do with this info what you will 😄

@skyline75489
Copy link
Contributor

Hi @farris, the current version of GenAI doesn't have full support on macOS. I'm working on improving this and it should be improved in the next release. Thanks for trying it out :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants