From 4f392e3f58c85c61d7fa4c854f40b26dc8f63ff4 Mon Sep 17 00:00:00 2001 From: etr2460 Date: Tue, 30 Apr 2024 16:51:41 -0700 Subject: [PATCH 1/2] Make the torch dep optional --- pyproject.toml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 572dac6417..d9f8f24a94 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,6 @@ dependencies = [ "statsmodels", "termcolor", "tiktoken", - "torch", "tqdm", "types-PyYAML", "types-tqdm", @@ -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" From 75b69212d67c94d6bd515f15337a86745eaefcfc Mon Sep 17 00:00:00 2001 From: etr2460 Date: Tue, 30 Apr 2024 16:56:42 -0700 Subject: [PATCH 2/2] Fix tests --- .github/workflows/run_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_tests.yaml b/.github/workflows/run_tests.yaml index d36981bd98..11a6151d7c 100644 --- a/.github/workflows/run_tests.yaml +++ b/.github/workflows/run_tests.yaml @@ -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: