Skip to main content

A Package for generating query-passage relevance assessment labels.

Project description

umBRELA

📟 Instructions

Create Conda Environment

conda create -n umbrela python=3.10
conda activate umbrela

If you do not already have JDK 21 installed, install via conda:

conda install -c conda-forge openjdk=21 maven -y

Install following dependencies for retrieval:

conda install -c pytorch faiss-cpu pytorch -y

Install Dependencies

pip install -r requirements.txt

Judgment generation snippet

Setting up the model jugde:

from umbrela.vicuna_judge import VicunaJudge

judge_vicuna = OSLLMJudge("dl19-passage", "lmsys/vicuna-7b-v1.5")

Passing qrel-passages for evaluations:

input_dict = {
    "query": {"text": "how long is life cycle of flea", "qid": "264014"},
    "candidates": [
        {
            "doc": {
                "segment": "The life cycle of a flea can last anywhere from 20 days to an entire year. It depends on how long the flea remains in the dormant stage (eggs, larvae, pupa). Outside influences, such as weather, affect the flea cycle. A female flea can lay around 20 to 25 eggs in one day."
            },
            "docid": "4834547",
            "score": 14.971799850463867,
        },
    ]
}

judgments = judge_vicuna.judge(input_dict)

🙏 Acknowledgments

This research is supported in part by the Natural Sciences and Engineering Research Council (NSERC) of Canada.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

umbrela-0.0.5-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file umbrela-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: umbrela-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 16.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.14

File hashes

Hashes for umbrela-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4c9f678ee71a96f5bf3f9138695d6e022484bfb135aed36ece7ec4438c06a589
MD5 adcccc85a449e4545bc2eb616a980b20
BLAKE2b-256 29a104ca9729d278b24ae7c4b7f52a93265e8fbe21d1beeec081a49165038240

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page