Skip to content

Commit 3a9d005

Browse files
authored
fix(amplify): cap setuptools<82 to preserve pkg_resources (NVIDIA-BioNeMo#1574)
## Description Fixes nightly CI failure in `unit-tests (models/amplify)` ([run #25911784459](https://github.com/NVIDIA/bionemo-framework/actions/runs/25911784459)). ### Root Cause When `pip install -e .` runs for the amplify recipe, pip resolves `setuptools>=61.0` to v82.0.1. In setuptools 82+, `pkg_resources` was removed as a bundled module. The `hypothesis` testing library (installed in the base container image) imports `pkg_resources` in its `entry_points.py`, causing pytest to crash at startup: ``` ModuleNotFoundError: No module named 'pkg_resources' ``` ### Fix - Cap `setuptools>=61.0,<82` in `[build-system].requires` - Add `setuptools<82` to `[project].dependencies` to prevent runtime upgrade This preserves backward compatibility until either the base image is updated with a newer hypothesis that does not use `pkg_resources`, or setuptools-pkg-resources is added. ### Type of changes - [x] Bug fix (non-breaking change which fixes an issue) Signed-off-by: svc-bionemo <267129667+svc-bionemo@users.noreply.github.com> Signed-off-by: svc-bionemo <267129667+svc-bionemo@users.noreply.github.com> Co-authored-by: svc-bionemo <267129667+svc-bionemo@users.noreply.github.com>
1 parent e870d31 commit 3a9d005

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

bionemo-recipes/models/amplify/pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["setuptools>=61.0"]
2+
requires = ["setuptools>=61.0,<82"]
33
build-backend = "setuptools.build_meta"
44

55

@@ -16,6 +16,7 @@ dependencies = [
1616
"nvidia_resiliency_ext",
1717
"omegaconf",
1818
"pytest",
19+
"setuptools<82",
1920
"torch==2.6.0a0+ecf3bae40a.nv25.01",
2021
"transformer_engine[pytorch]",
2122
"transformers<5.0", # TODO(BIO-143): update AMPLIFY to support Transformers v5

0 commit comments

Comments
 (0)