aidb icon indicating copy to clipboard operation
aidb copied to clipboard

Fix python version in setup for numba errors

Open sky-2002 opened this issue 2 years ago • 12 comments

Description: As per the issue given here, numba requires python version <3.12 and >=3.8. According to the PEP 440 version specifiers, I have added <3.12 in the setup function in setup.py file.

Note: The installation will still have the issue, but now the setup will have python version requirements so users can change versions accordingly.

sky-2002 avatar Nov 18 '23 05:11 sky-2002

Thanks for putting this together, this would be our first external contribution!

I think since numba is our only 3.12 blocker, we should actually make numba optional and jit the functions on demand, if it's available. Do you think you could do that instead?

ddkang avatar Nov 18 '23 14:11 ddkang

Hi @ddkang, I could see numba being used only in one function, so I have tried making it optional (checking with import). Let me know if that works.

sky-2002 avatar Nov 18 '23 17:11 sky-2002

@ttt-77 can you review these changes?

ddkang avatar Nov 18 '23 18:11 ddkang

The code logic looks good to me. Could you test it with numba and without numba if possible?

ttt-77 avatar Nov 18 '23 19:11 ttt-77

The code logic looks good to me. Could you test it with numba and without numba if possible?

Sure. One thing I wanted to ask, as numba is still there in requirements, users would still get the python version related error due to numba installation. Do we need to also make changes to requirements or what?

sky-2002 avatar Nov 19 '23 12:11 sky-2002

Can we make the requirement optional? Like aidb[all] vs aidb[base] or something

ddkang avatar Nov 19 '23 16:11 ddkang

@ddkang Sorry for a late reply, cant we just add numba[some_name] in requirements instead of just numba. So that it only gets installed when someone does - pip install aidb[some_name]. Will that be good?

sky-2002 avatar Nov 21 '23 14:11 sky-2002

Sure sounds good

ddkang avatar Nov 21 '23 14:11 ddkang

But I think aidb cannot be installed as pip install aidb as of now. So maybe temporarily, we can go with the method given here, which says that we can specify python version after the package: for example - numba; python_version=='3.11' in the requirements. Should I add this and push?

sky-2002 avatar Nov 21 '23 16:11 sky-2002

@ddkang Do you also have a slack or discord channel for aidb, I am planning to add a new vectorDB to aidb(written code already), so I may need to ask doubts there.

sky-2002 avatar Nov 21 '23 16:11 sky-2002

Hi @sky-2002 could you email me for the slack invite link? Thank you for helping with the development!

Sounds good regarding the temporary solution.

ddkang avatar Nov 21 '23 21:11 ddkang

But I think aidb cannot be installed as pip install aidb as of now. So maybe temporarily, we can go with the method given here, which says that we can specify python version after the package: for example - numba; python_version=='3.11' in the requirements. Should I add this and push?

Try pip install ai-db

ttt-77 avatar Nov 22 '23 03:11 ttt-77