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

Fix installer to work without VarBERT #68

Merged
merged 1 commit into from
Nov 21, 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
2 changes: 1 addition & 1 deletion dailalib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "3.13.2"
__version__ = "3.13.3"

import os
# stop LiteLLM from querying at all to the remote server
Expand Down
11 changes: 10 additions & 1 deletion dailalib/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@

from libbs.plugin_installer import LibBSPluginInstaller

VARBERT_AVAILABLE = True
try:
import varbert
except ImportError:
VARBERT_AVAILABLE = False


class DAILAInstaller(LibBSPluginInstaller):
def __init__(self):
Expand Down Expand Up @@ -67,7 +73,10 @@ def install_angr(self, path=None, interactive=True):
def display_epilogue(self):
super().display_epilogue()
print("")
self.install_local_models()
if VARBERT_AVAILABLE:
self.install_local_models()
else:
self.warn("VarBERT not installed, reinstall with `pip install dailalib[full]` to enable local models if you would like them.")

def install_local_models(self):
self.info("We will now download local models for each decompiler you've installed. Ctrl+C to cancel.")
Expand Down
Loading