Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mitigate dragon/numpy, mypy/typing_extension dependency issues #653

Merged
merged 2 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually one small note: It looks like the version of numpy that comes in when doing a "normal"

pip install --no-cache-dir smartsim[dev,mypy,ml] && smart build --onnx

is version 1.24.3 (at least for me, from pypi, on osx).

This change will presumably pin to version 1.26.4. I'm not sure if that matters, but if you want to be SUPER safe, you may want to pin to that number.

wheel_path = next(wheels, None)
except Exception:
logger.error(f"Unable to install from {asset_dir}")
Expand Down
Loading