Commit 11154692 authored by Ailing's avatar Ailing Committed by Matthijs Douze

Update faiss.py (#387)

update faiss.py to enforce less strict check of error message
parent 17cc899b
...@@ -21,7 +21,7 @@ try: ...@@ -21,7 +21,7 @@ try:
from swigfaiss_gpu import * from swigfaiss_gpu import *
except ImportError as e: except ImportError as e:
if e.args[0] != 'ImportError: No module named swigfaiss_gpu': if 'No module named' not in e.args[0]:
# swigfaiss_gpu is there but failed to load: Warn user about it. # swigfaiss_gpu is there but failed to load: Warn user about it.
sys.stderr.write("Failed to load GPU Faiss: %s\n" % e.args[0]) sys.stderr.write("Failed to load GPU Faiss: %s\n" % e.args[0])
sys.stderr.write("Faiss falling back to CPU-only.\n") sys.stderr.write("Faiss falling back to CPU-only.\n")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment