-
Notifications
You must be signed in to change notification settings - Fork 37
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for tracking this one down so quickly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last thing actually! Not worth holding up approval over, though!!
@@ -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") |
There was a problem hiding this comment.
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.
Whoops, just missed the merge, hahaha |
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.