vecs icon indicating copy to clipboard operation
vecs copied to clipboard

Feature Request: Progress Bars

Open olirice opened this issue 2 years ago • 2 comments

The lack of feedback during Collection.upsert and Collection.create_index is a bad DX.

It would be great to get some progress bars but I haven't been able to get them working properly in notebooks and shell environments.

If anyone has experience adding them this would be a great community contribution

upsert

https://github.com/supabase/vecs/blob/87ed2d3d96b0a950adbcf1950c18ba691550bd47/src/vecs/collection.py#L108 but it can't always assume that vectors is sized. Maybe a runtime check to see if *vectors* has a known length and providing it to the progress bar if known would be best

create_index

https://github.com/supabase/vecs/blob/87ed2d3d96b0a950adbcf1950c18ba691550bd47/src/vecs/collection.py#L346-L350

this one is a little more involved as it'll have to introduce client side keyset pagination on the id primary key to get feedback to python

olirice avatar Jun 02 '23 18:06 olirice

@olirice I would like to work on it.

can please point me to contributing guideline for this repo I was find it

sahusiddharth avatar Dec 31 '23 12:12 sahusiddharth

great!

we don't have official contributing guidelines

Broadly you'll need

  • python 3.7+ (and be compatible with 3.7)
  • docker

setup a virtualenv

python -m venv venv
source venv/bin/activate
pip install -e ".[dev,docs,text_embedding]"

install the pre-commit hooks

pre-commit install

at that point you should be able to run

pytest

and have it pass. Note: on the first run a docker container will be spinning up so it could take a couple minutes. After that It'll be much faster.

We have 100% code coverage as a requirement so any new lines/functions must be covered. You can check if what you introduce is covered using

pytest --cov=vecs --cov-report=html -vv

to generate a report, followed by

open htmlcov/index.html 

to see the coverage report

all new functions/methods should conform to the current documentation style

let me know if you have any trouble

olirice avatar Jan 02 '24 20:01 olirice