philschmid / easyllm

https://philschmid.github.io/easyllm/
MIT License
429 stars 33 forks source link

Boto dependency shouldn't be foreced #39

Open giyaseddin opened 10 months ago

giyaseddin commented 10 months ago

I'm getting botocore dependency despite I'm just regularly installing the package. Either it should be added dependency or specified in the install like: easyllm[aws]

Rolling back to v0.5.0 solved the issue for now.

philschmid commented 10 months ago

What error are you getting? can you please share it?

giyaseddin commented 10 months ago
    from easyllm.clients import huggingface
../../../../../miniconda3/envs/llm-poc/lib/python3.11/site-packages/easyllm/clients/huggingface.py:9: in <module>
    from easyllm.prompt_utils.base import build_prompt, buildBasePrompt
../../../../../miniconda3/envs/llm-poc/lib/python3.11/site-packages/easyllm/prompt_utils/base.py:5: in <module>
    from easyllm.utils import setup_logger
../../../../../miniconda3/envs/llm-poc/lib/python3.11/site-packages/easyllm/utils/__init__.py:1: in <module>
    from easyllm.utils.aws import AWSSigV4, get_bedrock_client
../../../../../miniconda3/envs/llm-poc/lib/python3.11/site-packages/easyllm/utils/aws.py:10: in <module>
    from botocore.config import Config
E   ModuleNotFoundError: No module named 'botocore'
================================================================================ warnings summary =================================================================================
../../../../../miniconda3/envs/llm-poc/lib/python3.11/site-packages/pydantic/_internal/_config.py:219
../../../../../miniconda3/envs/llm-poc/lib/python3.11/s

by just running the import. I just got a fresh install (got easyllm==0.6.0) and that's the only change that was applied.

Reproduce:

pip install easyllm --upgrade
>>> from easyllm.clients import huggingface
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/giyaseddin/miniconda3/envs/llm-main/lib/python3.11/site-packages/easyllm/clients/huggingface.py", line 9, in <module>
    from easyllm.prompt_utils.base import build_prompt, buildBasePrompt
  File "/home/giyaseddin/miniconda3/envs/llm-main/lib/python3.11/site-packages/easyllm/prompt_utils/base.py", line 5, in <module>
    from easyllm.utils import setup_logger
  File "/home/giyaseddin/miniconda3/envs/llm-main/lib/python3.11/site-packages/easyllm/utils/__init__.py", line 1, in <module>
    from easyllm.utils.aws import AWSSigV4, get_bedrock_client
  File "/home/giyaseddin/miniconda3/envs/llm-main/lib/python3.11/site-packages/easyllm/utils/aws.py", line 10, in <module>
    from botocore.config import Config
ModuleNotFoundError: No module named 'botocore'
philschmid commented 10 months ago

Let me look at that but. You should be able to install pip install easyllm[bedrock]

philschmid commented 10 months ago

I pushed an updated version.

murdadesmaeeli commented 10 months ago

This issue seems to be closable @philschmid .