Skip to content

Commit 1d3f11c

Browse files
authored
Make the torch dep optional (#1524)
`torch` was added in #1496, but it's very heavy and only required for one eval. Let's move it to an optional-dependency
1 parent 778caa6 commit 1d3f11c

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

.github/workflows/run_tests.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
python -m pip install --upgrade pip
3030
pip install pyyaml
3131
pip install pytest
32-
pip install -e .
32+
pip install -e .[torch]
3333
3434
- name: Run unit tests
3535
env:

pyproject.toml

+3-7
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ dependencies = [
4343
"statsmodels",
4444
"termcolor",
4545
"tiktoken",
46-
"torch",
4746
"tqdm",
4847
"types-PyYAML",
4948
"types-tqdm",
@@ -54,12 +53,9 @@ dependencies = [
5453
repository = "https://github.com/openai/evals"
5554

5655
[project.optional-dependencies]
57-
formatters = [
58-
"black",
59-
"isort",
60-
"autoflake",
61-
"ruff"
62-
]
56+
formatters = ["black", "isort", "autoflake", "ruff"]
57+
58+
torch = ["torch"]
6359

6460
[project.scripts]
6561
oaieval = "evals.cli.oaieval:main"

0 commit comments

Comments
 (0)