Publishing a Notebook with chiVe dataset

Why did we create this repository?

Contents of vald-demo/chive

chive\
- README.md
- sample-values.yaml: Sample YAML for deploying Vald using Helm to run notebook.
- tutorial.ipynb : Example of using Vald with chiVe.
- tutorial.md : Example of using Vald with chiVe (with output cells)

How to use

git clone https://github.com/vdaas/vald-demo.git
docker run -it -v $(pwd)/vald-demo:/home/jovyan/work -p 8888:8888 jupyter/datascience-notebook

Insert

# create gRPC channel
channel = grpc.insecure_channel("localhost:8081")
# create stub
istub = insert_pb2_grpc.InsertStub(channel)

# Insert
sample = np.random.rand(300)
ivec = payload_pb2.Object.Vector(id="test", vector=sample)
icfg = payload_pb2.Insert.Config(skip_strict_exist_check=True)
ireq = payload_pb2.Insert.Request(vector=ivec, config=icfg)

istub.Insert(ireq)
name: "vald-agent-ngt-0"
uuid: "test"
ips: "127.0.0.1"
ips: "127.0.0.1"
ips: "127.0.0.1"
ips: "127.0.0.1"
ips: "127.0.0.1"

Search

# create stub
sstub = search_pb2_grpc.SearchStub(channel)

# Search
svec = np.random.rand(300)
scfg = payload_pb2.Search.Config(num=10, radius=-1.0, epsilon=0.1, timeout=3000000000)
sreq = payload_pb2.Search.Request(vector=svec, config=scfg)

sstub.Search(sreq)
results {
id: "test"
distance: 0.22659634053707123
}

Update

# create stub
ustub = update_pb2_grpc.UpdateStub(channel)

# Update
sample = np.random.rand(300)
uvec = payload_pb2.Object.Vector(id="test", vector=sample)
ucfg = payload_pb2.Update.Config(skip_strict_exist_check=True)
ureq = payload_pb2.Update.Request(vector=uvec, config=ucfg)

ustub.Update(ureq)
name: "vald-agent-ngt-0"
uuid: "test"
ips: "127.0.0.1"
ips: "127.0.0.1"
ips: "127.0.0.1"
ips: "127.0.0.1"
ips: "127.0.0.1"

Remove

# create stub
rstub = remove_pb2_grpc.RemoveStub(channel)

# Remove
rid = payload_pb2.Object.ID(id="test")
rcfg = payload_pb2.Remove.Config(skip_strict_exist_check=True)
rreq = payload_pb2.Remove.Request(id=rid, config=rcfg)

rstub.Remove(rreq)
name: "vald-agent-ngt-0"
uuid: "test"
ips: "127.0.0.1"
ips: "127.0.0.1"
ips: "127.0.0.1"
ips: "127.0.0.1"
ips: "127.0.0.1"

Closing

--

--

--

A highly scalable distributed fast approximate nearest neighbor dense vector search engine.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

9 Powerful MS Excel Features That You May Not Be Aware Of

Statistical Distributions & Hypothesis Testing for Beginners.

Extracting features from dates

Revenue Prediction based on Historical Data and Economic Indicators

Data Mining and Visualization to Understand Accident-prone Areas

Automating GIS and remote sensing workflows with open python libraries

Python or R? Which One is Better for Data Scientists or Data Analysts?

Creating a dashboard using Python to track critical financial and economic indicators

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
vald.vdaas.org

vald.vdaas.org

A highly scalable distributed fast approximate nearest neighbor dense vector search engine.

More from Medium

Decision Optimization for Watson Studio Deploy in Cloud Pak for Data as a Service Pricing FAQs

Deploying Kubeflow on Digital Ocean

Anomaly Detection in Click-stream Analytics

Price Graph With Secret Manager Keys On Cloud Run Part 1