Skip to content

Commit

Permalink
Add dependencies in pyproject.toml file
Browse files Browse the repository at this point in the history
  • Loading branch information
VyrodovMikhail committed May 25, 2024
1 parent d2bec81 commit 87f09e4
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 52 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ jobs:
cache: "pip"
- name: "installation"
run: |
pip install -r requirements.txt -r requirements.dev.txt
pip install packaging
pip install --no-build-isolation -r requirements.txt -r requirements.dev.txt
- name: "black"
run: black . --check --diff --color
- name: "isort"
Expand Down
14 changes: 0 additions & 14 deletions goat/backend/Dockerfile

This file was deleted.

19 changes: 0 additions & 19 deletions goat/backend/docker-compose.yml

This file was deleted.

2 changes: 2 additions & 0 deletions goat/backend/eval.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import json
from pathlib import Path

from lm_eval import evaluator
from lm_eval.models.huggingface import HFLM
Expand All @@ -13,6 +14,7 @@ def eval(model_name: str, precision: str):
results = evaluator.simple_evaluate(model=lm, tasks=[taskname])

filename = model_name.replace("/", "__")
Path("results").mkdir(exist_ok=True)
with open(f"results/{filename}.json", "w", encoding="utf-8") as f:
json.dump(results, f, ensure_ascii=False)

Expand Down
9 changes: 0 additions & 9 deletions goat/backend/requirements.txt

This file was deleted.

3 changes: 0 additions & 3 deletions goat/frontend/requirements.txt

This file was deleted.

5 changes: 0 additions & 5 deletions goat/parser/requirements.txt

This file was deleted.

3 changes: 2 additions & 1 deletion goat/utils/database_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ def listen_to_new_requests(self, action):
action(model, precision)

def get_leaderboard_df(self):
df = pd.read_sql_table("leaderboard", self.engine)
query = "SELECT * FROM leaderboard"
df = pd.DataFrame(self.engine.connect().execute(text(query)))
return df

def end_connection(self):
Expand Down
30 changes: 30 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,36 @@ name = "goat"
author = "deepvk, VyrodovMikhail"
url = "https://github.com/deepvk/goat"

[project]
name = "goat"
version="0.0.0"
authors = [
{name="deepvk, VyrodovMikhail"}
]
description = "A framework for evaluating language models"
readme = "README.md"
license = { "text" = "Apache-2.0" }
requires-python = ">=3.8"
dependencies = [
"beautifulsoup4>=4.12.2",
"packaging",
"numpy",
"pandas",
"requests",
"typer<0.10.0",
"Scrapy>=2.11.0",
"gradio",
"psycopg2>=2.9.9",
"SQLAlchemy>=2.0.29",
"flash-attn==2.5.8",
"torch==2.2.0",
"torchdata==0.7.1",
"torchtext==0.17.0",
"torchvision==0.17.0",
"transformer_engine==0.0.0",
"lm_eval@git+https://github.com/deepvk/lm-evaluation-harness@goat",
]

[tool.isort]
profile = "black"
line_length = 120
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-e .

0 comments on commit 87f09e4

Please sign in to comment.