From c819823cc506f059073a2fccdf6314d48c9f5a42 Mon Sep 17 00:00:00 2001 From: Kang Seonghoon Date: Thu, 10 Jul 2025 00:53:45 +0000 Subject: [PATCH] Ignore local version identifiers in constraints. Torch is frequently installed with a local version identifier (e.g. `+cu126`), but that identifier causes an issue with pip because there is no public package with that identifier unless an explicit alternative index is used. Stripping the local version identifier should be safe, as we are only using constraints to ensure that per-model dependencies are aligned with existing installations. --- utils/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/__init__.py b/utils/__init__.py index 9bc06335de..994517ecae 100644 --- a/utils/__init__.py +++ b/utils/__init__.py @@ -26,6 +26,7 @@ def get_pkg_versions(packages: List[str]) -> Dict[str, str]: for module in packages: cmd = [sys.executable, "-c", f"import {module}; print({module}.__version__)"] version = subprocess.check_output(cmd).decode().strip() + version = version.split('+')[0] # Remove any local version identifiers versions[module] = version return versions