Building SmartSim without ML backends #601
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, SmartSim cannot be built correctly (i.e. with all necessary dependencies) without the ML backends.
To reproduce this, build SmartSim using
smart build --no_tf --no_pt
and start an Orchestrator with the following Python snippet taken from the tutorials:The code will fail due to a missing RedisAI installation with the error
The reason is that after RedisAI is built using the
smart
tool, the resulting library is only installed to thelib
folder if and only if the folderbackends/
exists, which it does not if no backends are installed. Since after this step the original build folder is deleted and with it the compiled library.This problem does not occur if any of the backends (TF, PT, ONNX) is installed. However, since they are not needed for many applications it would additional complications and effort to compile them if not necessary. Also compiling RedisAI by itself on pointing
RAI_PATH
to the installation also works, but poses additional effort.To circumvent this problem this PR proposes to simply install the RedisAI library by itself if it was built.