Skip to content

Commit

Permalink
Merge pull request #33 from Sagacify/sagml-85-update-saga-llm-evaluation
Browse files Browse the repository at this point in the history
chore(pyproject): update project dependencies
  • Loading branch information
LucieNvz authored Oct 22, 2024
2 parents 5aa75f0 + 23e4143 commit 37349bd
Show file tree
Hide file tree
Showing 7 changed files with 3,350 additions and 3,402 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

- name: Install packages & build
run: |
poetry install --without docs
poetry install --without docs --extras scorer
- name: Run formatter
run: |
Expand Down
7 changes: 7 additions & 0 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ To install the Saga LLM Evaluation ML library, use the following command:
pip install saga-llm-evaluation
If you want to use the Scorer class, you need to install the following dependencies:

.. code-block:: bash
pip install saga-llm-evaluation[scorer]
However, beware that this will downgrade the version of the `pandas` library to 1.5.3 if you have a higher version installed. This is due to a compatibility issue with the `pandas` library.

Be aware that by default the library will run pytorch on the CPU. If you want to run it on the GPU, you need to install pytorch with GPU support. You can find the instructions `here <https://pytorch.org/get-started/locally/>`_.

Moreover, to use BLEURTScore, you first need to install BLEURT from the official github repository. You can install it using the following command:
Expand Down
6 changes: 6 additions & 0 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ Usage
Default use of the Scorer
-------------------------
The Scorer is a class that allows you to run multiple metrics at once. The metrics supported are BERTScore, MAUVE, BLEURTScore, Q-Squared, SelCheck-GPT, G-Eval, and GPT-Score, but of course this list is likely to grow in the future.
If you want to use the Scorer class, you need to install the following dependencies:

.. code-block:: bash
pip install saga-llm-evaluation[scorer]
However, beware that this will downgrade the version of the `pandas` library to 1.5.3 if you have a higher version installed. This is due to a compatibility issue with the `pandas` library.

.. code-block:: python
Expand Down
8 changes: 8 additions & 0 deletions installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ To install the Saga LLM Evaluation ML library, use the following command:
pip install saga-llm-evaluation
```

If you want to use the Scorer class, you need to install the following dependencies:

```bash
pip install saga-llm-evaluation[scorer]
```

However, beware that this will downgrade the version of the `pandas` library to 1.5.3 if you have a higher version installed. This is due to a compatibility issue with the `pandas` library.

Be aware that by default the library will run pytorch on the CPU. If you want to run it on the GPU, you need to install pytorch with GPU support. You can find the instructions [here](https://pytorch.org/get-started/locally/).

Moreover, to use BLEURTScore, you first need to install BLEURT from the official github repository. You can install it using the following command:
Expand Down
6,709 changes: 3,322 additions & 3,387 deletions poetry.lock

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ evaluate = "^0.4.1"
mauve-text = "^0.3.0"
bert-score = "^0.3.13"
torch = "2.1.1"
tensorflow = { version = "^2.14", markers = "sys_platform == 'linux'" }
tensorflow-macos = { version = "^2.14", markers = "sys_platform == 'darwin' and platform_machine == 'arm64'" }
elemeta = "1.0.7"
llama-cpp-python = "^0.2.11"
faiss-cpu = "^1.7.4"
langchain = "^0.2.15"
Expand All @@ -29,6 +26,9 @@ langchain-community = "^0.2.15"
nltk = "^3.9.1"
langchain-huggingface = "^0.0.3"

# Extras
elemeta = { version = "^1.0.7", optional = true }

[tool.poetry.dev-dependencies]
pylint = "^2.13"
pylint-quotes = "^0.2.3"
Expand All @@ -46,6 +46,9 @@ sphinx-markdown-builder = "^0.6.7"
sphinx-emoji-favicon = "^0.2"
sphinx-copybutton = "^0.5.2"

[tool.poetry.extras]
scorer = ["elemeta"]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
Expand Down
11 changes: 0 additions & 11 deletions saga_llm_evaluation/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
from elemeta.nlp import english_punctuations, english_stopwords, extended_punctuations
from elemeta.nlp.extractors.high_level import *
from elemeta.nlp.extractors.low_level.abstract_metafeature_extractor import (
AbstractMetafeatureExtractor,
)

from .helpers.embedding_metrics import MAUVE, BERTScore
from .helpers.language_metrics import BLEURTScore, QSquared
from .helpers.llm_metrics import GEval, GPTScore, SelfCheckGPT
from .helpers.utils import MetadataExtractor, get_llama_model

__version__ = "0.11.6"

0 comments on commit 37349bd

Please sign in to comment.