-
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
Fix re-run smart build bug #165
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.
Overall this is great. There is one problem which I did not forsee writing up the ticket. The function installed_redisai_backends
accounts for the fact that the backends may be installed site-wide at the RAI_PATH
which is our plan for smartsim module files (see https://github.com/craylabs/poseidon/issues/176).
This function will stop users from trying to build when they already have the backends built somewhere, but the error message isn't super helpful. They might even try to run smart clean
and then find out they are still greeted with the same message if they still have the modulefile loaded.
Leaning on @al-rigazzi and @ashao to make suggestions here. Requesting changes as I think we need to address this first as site-wide installs are part of the plan.
Yeah, I think the user should be notified if |
@al-rigazzi I agree. I think the best plan is to allow them to build and use the backends they want to build seperately if need be. But the default should be to use the set It would be best if there was some way for the user to also install the recommended ML backends provided the RAI version that was installed. this would enabled site-install users to run # create python env
module load smartsim-0.4.0-rai-1.2.3
smart build --install-ml this would essentially skip the build process if the backends were module loaded into the environment and then install the correct python dependencies into the user environment. what do you think @al-rigazzi ? |
Yes, I agree with @Spartee, that would be cleaner (and automatically documented through |
Codecov Report
@@ Coverage Diff @@
## develop #165 +/- ##
==========================================
Coverage ? 81.20%
==========================================
Files ? 57
Lines ? 2910
Branches ? 0
==========================================
Hits ? 2363
Misses ? 547
Partials ? 0 |
@Spartee @al-rigazzi changes have been made to address your comments. |
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 small change, otherwise good to merge! Feel free to merge after that comment is edited.
smartsim/_core/_cli/build.py
Outdated
if os.environ.get("RAI_PATH"): | ||
if installed_redisai_backends(): | ||
logger.error( | ||
f"Backends are already built and loaded at '{CONFIG.redisai}'. There is no need to build." |
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.
mention that they are specified in the environment at RAI_PATH
so the user is aware thats where they are specified.
This PR fixes #162.
There are four cases that this PR accounts for which have been confirmed to work on local machine and Horizon.
smart build
whenRAI_PATH
is set and backends are installedsmart build
whenRAI_PATH
is set, but backends are not installedsmart build
, they should unsetRAI_PATH
smart build
whenRAI_PATH
is not set and backends are installedsmart clean
before runningsmart build
smart build
whenRAI_PATH
is not set and backends are not installedsmart build
to continue