From f5d3de1375db9dcddc70a5b69a7c03dd6e02268b Mon Sep 17 00:00:00 2001 From: Xu Zhao Date: Mon, 17 Jun 2024 12:49:06 -0700 Subject: [PATCH] Remove torchvision and torchaudio dependency when testing userbenchmark. (#2309) Summary: Most userbenchmarks handle dependencies themselves, and torchvision/torchaudio are not required. Pull Request resolved: https://github.com/pytorch/benchmark/pull/2309 Reviewed By: aaronenyeshi Differential Revision: D58686618 Pulled By: xuzhao9 fbshipit-source-id: b6ad66333586e237ef115c2c39c0069e4cb58450 --- install.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install.py b/install.py index ea825e6f7c..943de9dc11 100644 --- a/install.py +++ b/install.py @@ -55,6 +55,8 @@ def pip_install_requirements(requirements_txt="requirements.txt"): end="", flush=True, ) + if args.userbenchmark: + TORCH_DEPS = ["torch"] try: versions = get_pkg_versions(TORCH_DEPS) except ModuleNotFoundError as e: