From f364d23d900ff65325f91dfee2e824e92aff412c Mon Sep 17 00:00:00 2001 From: ankona <3595025+ankona@users.noreply.github.com> Date: Wed, 31 Jul 2024 17:15:26 -0500 Subject: [PATCH 1/2] Mitigate dragon/numpy, mypy/typing_extension dependency issues --- .github/workflows/run_tests.yml | 3 +-- doc/changelog.md | 7 +++++++ smartsim/_core/_cli/scripts/dragon_install.py | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index f3a97474d..bf3ceefc3 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -109,7 +109,7 @@ jobs: - name: Install SmartSim (with ML backends) run: | python -m pip install git+https://github.com/CrayLabs/SmartRedis.git@develop#egg=smartredis - python -m pip install .[dev,ml] + python -m pip install .[dev,mypy,ml] - name: Install ML Runtimes with Smart (with pt, tf, and onnx support) if: contains( matrix.os, 'ubuntu' ) || contains( matrix.os, 'macos-12') @@ -121,7 +121,6 @@ jobs: - name: Run mypy run: | - python -m pip install .[mypy] make check-mypy - name: Run Pylint diff --git a/doc/changelog.md b/doc/changelog.md index 6efeedfaf..9730ad736 100644 --- a/doc/changelog.md +++ b/doc/changelog.md @@ -15,6 +15,7 @@ To be released at some future point in time Description +- Mitigate dependency installation issues - Fix internal host name representation for Dragon backend - Make dependencies more discoverable in setup.py - Add hardware pinning capability when using dragon @@ -27,6 +28,12 @@ Description Detailed Notes +- Installation of mypy or dragon in separate build actions caused + some dependencies (typing_extensions, numpy) to be upgraded and + caused runtime failures. The build actions were tweaked to include + all optional dependencies to be considered by pip during resolution. + Additionally, the numpy version was capped on dragon installations. + ([SmartSim-PR635](https://github.com/CrayLabs/SmartSim/pull/635)) - setup.py used to define dependencies in a way that was not amenable to code scanning tools. Direct dependencies now appear directly in the setup call and the definition of the SmartRedis version diff --git a/smartsim/_core/_cli/scripts/dragon_install.py b/smartsim/_core/_cli/scripts/dragon_install.py index 466c390bd..a2e8ed36f 100644 --- a/smartsim/_core/_cli/scripts/dragon_install.py +++ b/smartsim/_core/_cli/scripts/dragon_install.py @@ -182,7 +182,7 @@ def install_package(asset_dir: pathlib.Path) -> int: logger.info(f"Installing package: {wheel_path.absolute()}") try: - pip("install", "--force-reinstall", str(wheel_path)) + pip("install", "--force-reinstall", str(wheel_path), "numpy<2") wheel_path = next(wheels, None) except Exception: logger.error(f"Unable to install from {asset_dir}") From f4efaeb73417565813cf6b203a7cb7386c5b46ce Mon Sep 17 00:00:00 2001 From: ankona <3595025+ankona@users.noreply.github.com> Date: Wed, 31 Jul 2024 17:18:40 -0500 Subject: [PATCH 2/2] update PR link in changelog --- doc/changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelog.md b/doc/changelog.md index 9730ad736..61c8a8779 100644 --- a/doc/changelog.md +++ b/doc/changelog.md @@ -33,7 +33,7 @@ Detailed Notes caused runtime failures. The build actions were tweaked to include all optional dependencies to be considered by pip during resolution. Additionally, the numpy version was capped on dragon installations. - ([SmartSim-PR635](https://github.com/CrayLabs/SmartSim/pull/635)) + ([SmartSim-PR653](https://github.com/CrayLabs/SmartSim/pull/653)) - setup.py used to define dependencies in a way that was not amenable to code scanning tools. Direct dependencies now appear directly in the setup call and the definition of the SmartRedis version