Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin known working version of python libraries #13

Open
antonum opened this issue Dec 19, 2023 · 0 comments
Open

Pin known working version of python libraries #13

antonum opened this issue Dec 19, 2023 · 0 comments

Comments

@antonum
Copy link
Collaborator

antonum commented Dec 19, 2023

Gen AI libraries, such as OpenAI, LangChain and LlamaIndex are evolving rapidly and keep introducing breaking changes in the APIs.

The code that is based on the "latest" or unpinned libraries can work today, but will throw unexpected errors tomorrow, just because one of the latest libraries introduced a breaking change.

Identify and pin known working combinations of versions of libraries for all the notebooks.

The target platform for all the tests is Google Colab!!! It might have a different set of base libraries loaded compared to your local/hosted notebook environments. Always make sure Google Colab works. If any other environment works too - that's a nice bonus, but Google Colab is the absolute requirement.

Here are the steps:

  • Remove all the pins from the pip install cell
  • Test, if needed make changes to the code so it works with the latest libraries, or identify the working version such as !pip -q install "openai==0.28"
  • Remove the -q flag from !pip -q install and rerun the cell - at the end of the output you'll see the line like: Successfully installed accelerate-0.25.0 backoff-2.2.1 cohere-4.39 ...
  • Pin the library versions to these in the line above.
  • Add back -q flag to !pip -q install , and retest the entire notebook.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant