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

renaming ground_truths to ground_truth. #640

Merged
merged 2 commits into from Feb 23, 2024

Conversation

alexjyong
Copy link
Contributor

@alexjyong alexjyong commented Feb 20, 2024

User description

Noticed that there were still references to ground_truths in the code and documentation (barring the validation function of course) after we updated this to ground_truth. This PR cleans that part up.

Also updated the raise_exceptions error message to read raise_exceptions=False instead of raise_exception=False


Description

  • Renamed all instances of ground_truths to ground_truth across various Python and Markdown files, including documentation and Jupyter Notebooks.
  • This change aligns the codebase with the updated variable naming convention.

Changes walkthrough

Relevant files
Enhancement
2 files
evaluation.py
Update Dataset Type Annotation                                                                 

src/ragas/evaluation.py

  • Updated the Dataset type annotation to use ground_truth instead of
    ground_truths.
  • +2/-2     
    base.py
    Update Comment to Match Variable Name                                                   

    src/ragas/metrics/base.py

  • Changed the comment to reflect the updated variable name ground_truth.

  • +1/-1     
    Documentation
    15 files
    README.md
    Correct Dataset Features in README Example                                         

    README.md

  • Corrected the dataset features in the example to use ground_truth.
  • +1/-1     
    answer_correctness.md
    Update Dataset Features in Documentation                                             

    docs/concepts/metrics/answer_correctness.md

  • Updated dataset features in the documentation example to ground_truth.

  • +1/-1     
    context_recall.md
    Modify Dataset Features in Context Recall Documentation               

    docs/concepts/metrics/context_recall.md

  • Modified dataset features in the documentation to use ground_truth.
  • +1/-1     
    semantic_similarity.md
    Adjust Dataset Features in Semantic Similarity Documentation     

    docs/concepts/metrics/semantic_similarity.md

    • Adjusted dataset features in the documentation to ground_truth.
    +1/-1     
    compare_llms.md
    Change Variable Name in Compare LLMS Example                                     

    docs/howtos/applications/compare_llms.md

  • Changed ground_truths to ground_truth in the example code snippet.
  • +2/-2     
    custom_prompts.md
    Update Dataset Features in Custom Prompts Example                           

    docs/howtos/applications/custom_prompts.md

    • Updated dataset features in the example code to ground_truth.
    +2/-2     
    data_preparation.md
    Correct Dataset Features in Data Preparation Example                     

    docs/howtos/applications/data_preparation.md

    • Corrected dataset features in the example code to ground_truth.
    +1/-1     
    use_prompt_adaptation.md
    Update Dataset Features in Prompt Adaptation Example                     

    docs/howtos/applications/use_prompt_adaptation.md

    • Updated dataset features in the example code to ground_truth.
    +2/-2     
    aws-bedrock.ipynb
    Change Dataset Features in AWS Bedrock Notebook                               

    docs/howtos/customisations/aws-bedrock.ipynb

  • Changed dataset features to ground_truth in the Jupyter Notebook
    example.
  • +3/-3     
    azure-openai.ipynb
    Update Dataset Features in Azure OpenAI Notebook                             

    docs/howtos/customisations/azure-openai.ipynb

  • Updated dataset features to ground_truth in the Azure OpenAI Notebook
    example.
  • +3/-3     
    gcp-vertexai.ipynb
    Correct Dataset Features in GCP VertexAI Notebook                           

    docs/howtos/customisations/gcp-vertexai.ipynb

  • Corrected dataset features to ground_truth in the GCP VertexAI
    Notebook example.
  • +3/-3     
    langchain.ipynb
    Change Dataset Features in Langchain Notebook                                   

    docs/howtos/integrations/langchain.ipynb

  • Changed dataset features to ground_truth in the Langchain Notebook
    example.
  • +2/-2     
    langfuse.ipynb
    Update Dataset Features in Langfuse Notebook                                     

    docs/howtos/integrations/langfuse.ipynb

  • Updated dataset features to ground_truth in the Langfuse Notebook
    example.
  • +2/-2     
    llamaindex.ipynb
    Correct Dataset Features in LlamaIndex Notebook                               

    docs/howtos/integrations/llamaindex.ipynb

  • Corrected dataset features to ground_truth in the LlamaIndex Notebook
    example.
  • +2/-2     
    zeno.ipynb
    Update Dataset Features in Zeno Notebook                                             

    docs/howtos/integrations/zeno.ipynb

  • Updated dataset features to ground_truth in the Zeno Notebook example.

  • +3/-3     
    💡 Usage Guide

    Checking Your Pull Request

    Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

    Talking to CodeAnt AI

    Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

    /codeantai ask: Your question here
    

    This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

    @codeant-ai codeant-ai bot added the enhancement New feature or request label Feb 20, 2024
    Copy link

    codeant-ai bot commented Feb 20, 2024

    PR Description updated to latest commit (c4538b2)

    @jjmachan
    Copy link
    Member

    wow, thank you sooo much for this - really ❤️
    you're a gem @alexjyong and most welcome to the contributor list 🍻

    @jjmachan jjmachan merged commit 2a3c3ab into explodinggradients:main Feb 23, 2024
    15 checks passed
    @globavi
    Copy link

    globavi commented Feb 23, 2024

    hi together, hi @jjmachan, @alexjyong
    i updated my code using ground_truth instead of ground_truths but no get an error in validation. Isn't it still a list of strings? dbdf54b#diff-04f7f4b287461dad91bc777c6897385a32d3c0447119a6d5eb209369e8c8e308 (so refering to line 23 and 26)

    joy13975 pushed a commit to joy13975/ragas that referenced this pull request Feb 28, 2024
    ## Description
    Noticed that there were still references to `ground_truths` in the code
    and documentation (barring the validation function of course) after we
    updated this to `ground_truth`. This PR cleans that part up.
    
    Also updated the raise_exceptions error message to read
    `raise_exceptions=False` instead of `raise_exception=False`
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    enhancement New feature or request
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    None yet

    3 participants