Skip to content

Commit

Permalink
Mitigate dragon/numpy, mypy/typing_extension dependency issues (#653)
Browse files Browse the repository at this point in the history
This PR mitigates two issues encountered during installation on build
agents

## mypy/typing_extensions

Installation of mypy or dragon in separate build actions caused some
dependencies (typing_extensions, numpy) to be upgraded. Those upgrades
result in runtime failures. The build actions were tweaked to allow pip
to consider all optional dependencies during resolution.

## dragon/numpy

Additionally, the numpy version was capped on dragon installations.

[ committed by @ankona]
[ approved by @ashao @MattToast ]
  • Loading branch information
ankona authored Jul 31, 2024
1 parent d7d979e commit 6f6722c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -121,7 +121,6 @@ jobs:

- name: Run mypy
run: |
python -m pip install .[mypy]
make check-mypy
- name: Run Pylint
Expand Down
7 changes: 7 additions & 0 deletions doc/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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-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
Expand Down
2 changes: 1 addition & 1 deletion smartsim/_core/_cli/scripts/dragon_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down

0 comments on commit 6f6722c

Please sign in to comment.