GithubHelp home page GithubHelp logo

vearch / python-algorithm-plugin Goto Github PK

View Code? Open in Web Editor NEW
16.0 16.0 12.0 5.86 MB

Algorithm plugins of generating embedding vectors used for vector search

License: Other

Dockerfile 0.75% Shell 6.00% Python 88.69% CSS 1.52% HTML 3.03%

python-algorithm-plugin's Issues

DB and space are not used consistent when using different name

Hello,

I discovered that if you use a different name for DB and space, some APIs will return the wrong result. for example, get image by id. Which causes confusion.

To reproduce the issue you can create a DB as "zerobox" and a space as "bottles".
Then insert an image into the space after that run API get image by id

# insert image
POST {{vearch_url}}/zerobox/bottles/black1

{
  "keyword": "Black Bottle",
  "url": "/images/test_black_1.jpg",
  "image": {
    "feature": "/images/test_black_1.jpg"
  },
  "tags": [
    "black",
    "straight"
  ]
}

# get image by id
GET {{vearch_url}}/zerobox/bottles/black1

# the result is wrong, it should be found.
{"_index":"zerobox","_type":"bottles","_id":"black1","found":false}

If this is an expected behaviour, it is better documented in README.

Thanks,

Robin

Improvement request

Hello,

Could you set the response Content-Type to "application/json"? it will helps other programs to understand results better. .e.g Postman.

for example, in Postman, it could not form the result automatically because the return header content-type is text/html.
image

image

The result is formatted as html.

Thanks,

Robin

使用插件插入图片数据后直接使用特征进行检索,检索失败。

gamma.log 中显示:
ERROR 2021-02-08 07:33:13,760 gamma_engine.cc:322 index not trained!

文档中指出:
Note:If no index is created, you need add a parameter in request to enforce brute force search rather than index search, eg:

curl -H "content-type: application/json" -XPOST -d '{ "query": { "sum": [{"feature":"../images/COCO_val2014_000000123599.jpg", "field":"feature1"}]},"is_brute_search":1}' http://127.0.0.1:4101/test/test/_search

加上这个 is_brute_search 参数,可以成功检索。

想知道 所谓的 train 是什么意思?该如何理解 is_brute_search ?
谢谢!

np.linalg.norm处理的目的是什么

插件的util中:
def normlize(feat):
feat = feat/np.linalg.norm(feat)
return feat.tolist()

请问特征向量在这里使用np.linalg.norm的目的是什么?
那么我用插件入库数据,但没有走插件转换向量去查询的时候结构就不对了?

  • [ ]

create partition err: create gamma table has err:[4294967294]

i readed the blog on zhihu a few days ago

i'm using vearch 3.1.0 and the latest version of python plugin

it seems my installation is ok, and i continue to run the db & space create command

db test created but then I got error"{"code":550,"msg":"create partition err: create gamma table has err:[4294967294] "}"

i am new to vearch and AI, what's nest should i do.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.