Open luancaarvalho opened 1 year ago
@luancaarvalho FederPy
cannot read local files directly.
In fact, FederPy
generates an html
for display. This hmtl
is run by the browser. It will read the index file in the browser and call FederJs
to parse it. Note that browsers are not allowed to read local files directly, which violates the CORS protocol.
If you want to read a local file, you first have to place the index file on the "network". Maybe you can place it on s3 so that other people on the network can see what you're sharing. Or a simpler example, you can use Python's SimpleHTTPServer to build a simple static file server, then Feder
can find your index file from localhost
.
Sharing index file through Google drive is not working. Is there a solution to run on colab notebook?
@alwayslove2013 I have the same problem for colab notebook. I tried everything.
hnswSource = 'hnswlib'
# hnswIndexFile = docs_path + "hnswlib.index"
# local files do not work (https://github.com/zilliztech/feder/issues/74). Tried using a link
# hnswIndexFile = "https://drive.google.com/file/d/14VyVIfUcdq9vwJzh89eF27puWS2HBBEN/view?usp=sharing"
# files hosted on google drive does not work. Tried filebin
hnswIndexFile = "https://filebin.net/kxv3eaz2nz9lrnee/chroma_hnsw_lite.index"
# filebin also does not work. Tried using ngrock as a file server. Also doesn't work
hnswIndexFile = "https://5cce-35-184-42-253.ngrok-free.app/file"
federPy_hnsw = FederPy(hnswIndexFile, hnswSource)
Hello Feder team!
I'm trying to run your test example, but without using a remote index source location like `https://assets.zilliz.com/hnswlib_hnsw_voc_17k_1f1dfd63a9.index%60. I downloaded the index and put it in my directory. With the remote index, all the visualizations were loaded, but with the local index, the visualizations didn't load and became stuck in an infinite loop. Can you explain why this is happening, please?
Here is the code with both sources: