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

(detailed) conda install instructions? #1550

Closed
hpcpony opened this issue May 17, 2024 · 2 comments
Closed

(detailed) conda install instructions? #1550

hpcpony opened this issue May 17, 2024 · 2 comments
Assignees
Labels

Comments

@hpcpony
Copy link

hpcpony commented May 17, 2024

I tried starting with the conda install from the installation.md...

conda create -n hf
conda activate hf
conda install -c intel intel_extension_for_transformers
  .
  .
  .

...but it's incomplete. Observed by trying to do one of the examples from the README:

(hf) [host:~] python
Python 3.11.9 | packaged by conda-forge | (main, Apr 19 2024, 18:36:13) [GCC 12.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from intel_extension_for_transformers.neural_chat import build_chatbot
None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/Anaconda3-2024.02-1/envs/hf/lib/python3.11/site-packages/intel_extension_for_transformers/neural_chat/__init__.py", line 18, in <module>
    from .config import PipelineConfig
  File "/opt/Anaconda3-2024.02-1/envs/hf/lib/python3.11/site-packages/intel_extension_for_transformers/neural_chat/config.py", line 24, in <module>
    from .utils.common import get_device_type
  File "/opt/Anaconda3-2024.02-1/envs/hf/lib/python3.11/site-packages/intel_extension_for_transformers/neural_chat/utils/common.py", line 18, in <module>
    import torch
ModuleNotFoundError: No module named 'torch'

It seems you have to also install pytorch (and specifically one from the intel channel otherwise libomp.so get borked). Even then there seem to be more things left missing:

(hf) [host:~] conda install -c intel pytorch
  .
  .
  .
(hf) [host:~] python
Python 3.11.9 | packaged by conda-forge | (main, Apr 19 2024, 18:36:13) [GCC 12.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from intel_extension_for_transformers.neural_chat import build_chatbot
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/Anaconda3-2024.02-1/envs/hf/lib/python3.11/site-packages/intel_extension_for_transformers/neural_chat/__init__.py", line 29, in <module>
    from .server.neuralchat_server import NeuralChatServerExecutor
  File "/opt/Anaconda3-2024.02-1/envs/hf/lib/python3.11/site-packages/intel_extension_for_transformers/neural_chat/server/__init__.py", line 22, in <module>
    from .neuralchat_server import NeuralChatServerExecutor
  File "/opt/Anaconda3-2024.02-1/envs/hf/lib/python3.11/site-packages/intel_extension_for_transformers/neural_chat/server/neuralchat_server.py", line 26, in <module>
    import uvicorn
ModuleNotFoundError: No module named 'uvicorn'

I kept installing missing things (yacs, fastapi, shortuuid) but gave up.

Is there something I'm missing?

@srinarayan-srikanthan
Copy link
Contributor

Hi @hpcpony ,

I see you are facing some installation issue. By the looks of the error, you are looking to use neural_chat. Have you installed the dependencies based on your device from https://github.com/intel/intel-extension-for-transformers/tree/v1.4.1/intel_extension_for_transformers/neural_chat#installation

@hpcpony
Copy link
Author

hpcpony commented May 21, 2024

Ah... I'm starting to understand. It wasn't obvious to me that I needed the separate neural-chat stuff. I wish there was a map because it looks like much of this is interrelated (neural-chat, neural-speed, extenstion-for-pytorch, extensions-for-transformers, etc...)

It also looks like there's no way to get everything installed from conda/intel channels and that eventually you have to resort to pip.

Thanks for the assist.

@hpcpony hpcpony closed this as completed May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants