Skip to content

Commit aa6052f

Browse files
authored
Deps version fix (#59)
* limit hf version to prevent using transformers v5 for now * remove an no-op duplicate line in MLX
1 parent 73197e7 commit aa6052f

File tree

4 files changed

+11
-14
lines changed

4 files changed

+11
-14
lines changed

.github/workflows/coverage.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,12 @@ jobs:
2424

2525
- name: Install dependencies
2626
run: |
27-
python -m venv venv
28-
source venv/bin/activate
29-
pip install -e .[test]
27+
python -m pip install -U pip
28+
pip install -e .
3029
pip install -r requirements-dev.txt
3130
3231
- name: Run tests
3332
run: |
34-
source venv/bin/activate
3533
coverage run --source=genlm/backend -m pytest --benchmark-disable --ignore=tests/test_mlx.py
3634
coverage json --omit "*/test*"
3735
coverage report --omit "*/test*"
@@ -59,14 +57,12 @@ jobs:
5957

6058
- name: Install dependencies
6159
run: |
62-
python -m venv venv
63-
source venv/bin/activate
60+
python -m pip install -U pip
6461
pip install -e .[mlx]
6562
pip install -r requirements-dev.txt
6663
6764
- name: Run MLX tests
6865
run: |
69-
source venv/bin/activate
7066
coverage run --source=genlm/backend -m pytest tests/test_mlx.py
7167
coverage json --omit "*/test*"
7268
coverage report --omit "*/test*"

.github/workflows/pytest.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
jobs:
1313
test:
14-
runs-on: ubuntu-22.04
14+
runs-on: ubuntu-latest
1515

1616
steps:
1717
- uses: actions/checkout@v4
@@ -23,10 +23,12 @@ jobs:
2323
python-version: 3.11.5
2424
cache: 'pip'
2525

26-
- name: Run Tests
26+
- name: Install dependencies
2727
run: |
28-
python -m venv venv
29-
source venv/bin/activate
30-
pip install -e .[test]
28+
python -m pip install -U pip
29+
pip install -e .
3130
pip install -r requirements-dev.txt
31+
32+
- name: Run Tests
33+
run: |
3234
python -m pytest tests --ignore=tests/test_mlx.py

genlm/backend/llm/mlx.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,6 @@ def batch_evaluate_queries(self):
383383

384384
assert len(results) == len(unique_queries)
385385

386-
results = results
387386
for i, q in enumerate(unique_queries):
388387
for dup_query in query_groups[tuple(q.prompt)]:
389388
dup_query.future.set_result(results[i])

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ authors = [
99
]
1010
dependencies = [
1111
"torch",
12-
"transformers>=4.36.0",
12+
"transformers>=4.36.0,<5.0.0.rc0",
1313
"sentencepiece",
1414
"protobuf",
1515
"accelerate",

0 commit comments

Comments
 (0)