stanford-futuredata / ARES

https://ares-ai.vercel.app/
Apache License 2.0
372 stars 41 forks source link

[bug] error during import - vLLM not imported. #48

Closed mglowacki100 closed 3 weeks ago

mglowacki100 commented 1 month ago

Error could be reproduced on google colab, but also occurs on different environments.

  1. pip install ares-ai , restart session (google colab)
  2. from ares import ARES from readme GIves:
    
    vLLM not imported.
    ImportError                               Traceback (most recent call last)
    [<ipython-input-2-6e6f35634c3a>](https://localhost:8080/#) in <cell line: 1>()
    ----> 1 from ares import ARES

3 frames /usr/local/lib/python3.10/dist-packages/ares/init.py in ----> 1 from .ares import ARES

/usr/local/lib/python3.10/dist-packages/ares/ares.py in 1 from .synthetic_generator import synthetic_generator_config 2 from .binary_classifier import binary_classifer_config ----> 3 from .rag_scoring import rag_scoring_config 4 from .ues_idp import ues_idp_config 5 from .kilt_filter import KILT_dataset_process

/usr/local/lib/python3.10/dist-packages/ares/rag_scoring.py in ----> 1 from ares.RAG_Automatic_Evaluation.LLMJudge_RAG_Compared_Scoring import begin 2 from ares.RAG_Automatic_Evaluation.LLMJudge_RAG_Compared_Scoring import filter_dataset 3 from ares.RAG_Automatic_Evaluation.LLMJudge_RAG_Compared_Scoring import preprocess_data 4 from ares.RAG_Automatic_Evaluation.LLMJudge_RAG_Compared_Scoring import load_api_model 5 from ares.RAG_Automatic_Evaluation.LLMJudge_RAG_Compared_Scoring import load_tokenizer_and_model

/usr/local/lib/python3.10/dist-packages/ares/RAG_Automatic_Evaluation/LLMJudge_RAG_Compared_Scoring.py in 45 46 from ares.RAG_Automatic_Evaluation.ppi import clt_iid, binomial_iid, pp_mean_iid_asymptotic ---> 47 from ares.RAG_Automatic_Evaluation.Evaluation_Functions import ( 48 calculate_accuracy, few_shot_context_relevance_scoring, 49 few_shot_answer_faithfulness_scoring, few_shot_answer_relevance_scoring,

ImportError: cannot import name 'few_shot_context_relevance_scoring_vllm' from 'ares.RAG_Automatic_Evaluation.Evaluation_Functions' (/usr/local/lib/python3.10/dist-packages/ares/RAG_Automatic_Evaluation/Evaluation_Functions.py)


NOTE: If your import is failing due to a missing package, you can manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the "Open Examples" button below.

robbym-dev commented 3 weeks ago

Hi @mglowacki100,

The import error is resolved. Please reinstall the pip package with pip install ares-ai. Let us know if you encounter any further issues. Thank you!