Skip to content

Commit

Permalink
Make the torch dep optional (#1524)
Browse files Browse the repository at this point in the history
`torch` was added in #1496, but it's
very heavy and only required for one eval. Let's move it to an
optional-dependency
  • Loading branch information
etr2460 authored May 1, 2024
1 parent 778caa6 commit 1d3f11c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
python -m pip install --upgrade pip
pip install pyyaml
pip install pytest
pip install -e .
pip install -e .[torch]
- name: Run unit tests
env:
Expand Down
10 changes: 3 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ dependencies = [
"statsmodels",
"termcolor",
"tiktoken",
"torch",
"tqdm",
"types-PyYAML",
"types-tqdm",
Expand All @@ -54,12 +53,9 @@ dependencies = [
repository = "https://github.com/openai/evals"

[project.optional-dependencies]
formatters = [
"black",
"isort",
"autoflake",
"ruff"
]
formatters = ["black", "isort", "autoflake", "ruff"]

torch = ["torch"]

[project.scripts]
oaieval = "evals.cli.oaieval:main"
Expand Down

0 comments on commit 1d3f11c

Please sign in to comment.