Skip to content

Commit

Permalink
squished some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
SubhadityaMukherjee committed Jul 3, 2024
1 parent 038f37e commit 2e2f6c9
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 9 deletions.
Binary file modified .DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions backend/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"llm_prompt_template" : "The following is a set of documents {docs}. Based on these docs, please summarize the content concisely. Also give a list of main concepts found in the documents. Do not add any new information. Helpful Answer: ",
"num_return_documents" : 50,
"embedding_model": "BAAI/bge-large-en-v1.5",
"llm_model": "qwen2:1.5b",
"num_documents_for_llm" : 10,
"llm_model": "llama3",
"num_documents_for_llm" : 50,
"data_dir": "./data/",
"persist_dir": "./data/chroma_db",
"testing_flag": false,
Expand Down
Binary file modified backend/data/.langchain.db
Binary file not shown.
2 changes: 1 addition & 1 deletion backend/modules/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def create_vector_store(
# subset the data for testing
if config["test_subset_2000"] == True:
print("[INFO] Subsetting the data to 100 rows.")
documents = documents[:100]
documents = documents[:500]
unique_docs, unique_ids = generate_unique_documents(documents, db)

print(
Expand Down
4 changes: 2 additions & 2 deletions backend/modules/metadata_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def get_all_metadata_from_openml(config: dict) -> Tuple[pd.DataFrame, Sequence[i
# subset the data for testing
if config["test_subset_2000"] == True:
print("[INFO] Subsetting the data to 100 rows.")
all_objects = all_objects[:100]
all_objects = all_objects[:500]

data_id = [int(all_objects.iloc[i]["did"]) for i in range(len(all_objects))]

Expand All @@ -232,7 +232,7 @@ def get_all_metadata_from_openml(config: dict) -> Tuple[pd.DataFrame, Sequence[i
openml_data_object = handler.get_metadata(data_id)

print("[INFO] Saving metadata to file.")
save_metadata_to_file((openml_data_object, data_id, all_objects), save_filename)
save_metadata_to_file((openml_data_object, data_id, all_objects, handler), save_filename)

return openml_data_object, data_id, all_objects, handler

Expand Down
7 changes: 5 additions & 2 deletions docs/developer tutorials/train and evaluate models.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@
"metadata": {},
"outputs": [],
"source": [
"list_of_embedding_models = [\"BAAI/bge-small-en-v1.5\"]\n",
"# list_of_embedding_models = [\"BAAI/bge-small-en-v1.5\", \"Alibaba-NLP/gte-Qwen2-1.5B-instruct\"]\n",
"list_of_embedding_models = [\"GritLM/GritLM-7B\"]\n",
"list_of_llm_models = [\"qwen2:1.5b\", \"phi3\"]"
]
},
Expand Down Expand Up @@ -212,6 +213,8 @@
" # TODO : Replace this evaluation with a more meaningful one\n",
" combined_df = aggregate_multiple_queries_and_count(queries,qa_dataset=qa_dataset, config=config, group_cols = [\"id\", \"name\"], sort_by=\"query\", count = True)\n",
"\n",
" # TODO : ADD LLM evaluation here when the function is ready\n",
"\n",
" combined_df.to_csv(experiment_path / \"results.csv\")"
]
},
Expand Down Expand Up @@ -239,7 +242,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.19"
"version": "3.10.14"
}
},
"nbformat": 4,
Expand Down
3 changes: 2 additions & 1 deletion frontend/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
st.title("OpenML AI Search")

query_type = st.selectbox("Select Query Type", ["Dataset", "Flow"])
query = st.chat_input("Enter your query")
# query = st ("Enter your query")
query = st.text_input("Enter your query")

st.session_state["query"] = query

Expand Down
2 changes: 1 addition & 1 deletion ollama/get_ollama.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ while [ "$(ollama list | grep 'NAME')" == "" ]; do
sleep 1
done

ollama run qwen2:1.5b
ollama run llama3

3 changes: 3 additions & 0 deletions start_training.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cd backend
python training.py
cd ..

0 comments on commit 2e2f6c9

Please sign in to comment.