From 14148f58382bcea6897d64ffd38fc3a3090c5fa0 Mon Sep 17 00:00:00 2001 From: Phill Zarfos Date: Wed, 24 May 2023 21:08:54 -0400 Subject: [PATCH] updated requirements.txt, fixed CallbackManager import, added Setup section to README --- README.md | 21 ++++++++++++++++++--- meta_optimizing.py | 2 +- requirements.txt | 10 +++++++--- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d22ae20..6bfa08c 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,23 @@ You can ingest the documentation using `ingest.py` and then ask questions about ## Meta-optimizing -This is the subject of [this video](https://youtu.be/gR__vhOVvy4). You can see the elements at play one by one in `meta_optimizing.ipynb` or as a streamlit app in `meta_optimizing.py`. Run with stramlit: +This is the subject of [this video](https://youtu.be/gR__vhOVvy4). You can see the elements at play one by one in `meta_optimizing.ipynb` or as a streamlit app in `meta_optimizing.py`. Run with streamlit: -```python +```sh +# First, run ingest.py to generate the faiss_store.pkl and docs.index files +# based on the clearml-docs repo documentation +git clone https://github.com/allegroai/clearml-docs.git +python ingest.py + +# Then run the app with streamlit streamlit run meta_optimizing.py -``` \ No newline at end of file +``` + +## Setup + +In addition to the Python packages in `requirements.txt`, you also need to download `en_core_web_sm` using the `spacy` package: + +```sh +pip install -r requirements.txt +python -m spacy download en_core_web_sm +``` diff --git a/meta_optimizing.py b/meta_optimizing.py index 0a8ccb2..d6123c2 100644 --- a/meta_optimizing.py +++ b/meta_optimizing.py @@ -16,7 +16,7 @@ from langchain import VectorDBQAWithSourcesChain from langchain.callbacks import ClearMLCallbackHandler, StdOutCallbackHandler -from langchain.callbacks.base import CallbackManager +from langchain.callbacks.manager import CallbackManager from langchain.chains import LLMChain from langchain.chat_models import ChatOpenAI from langchain.embeddings import OpenAIEmbeddings diff --git a/requirements.txt b/requirements.txt index 19f6849..35ea762 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,13 @@ -clearml==1.10.1 -clearml==1.10.0 +clearml==1.10.4 colored==1.4.4 faiss_cpu==1.7.3 +langchain==0.0.170 numpy==1.24.2 -openai==0.27.2 +openai==0.27.7 pandas==1.5.3 +plotly==5.14.1 scikit_learn==1.2.2 +spacy==3.5.3 streamlit==1.20.0 +tiktoken==0.4.0 +urllib3==1.26.16