Skip to content

Commit

Permalink
Remove outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
Aymeric committed Feb 29, 2024
1 parent 790e208 commit af13271
Showing 1 changed file with 11 additions and 101 deletions.
112 changes: 11 additions & 101 deletions notebooks/en/rag_evaluation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,9 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Token has not been saved to git credential helper. Pass `add_to_git_credential=True` if you want to set the git credential as well.\n",
"Token is valid (permission: read).\n",
"Your token has been saved to /Users/aymeric/.cache/huggingface/token\n",
"Login successful\n"
]
}
],
"outputs": [],
"source": [
"from huggingface_hub import notebook_login\n",
"\n",
Expand Down Expand Up @@ -150,26 +139,11 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"metadata": {
"id": "3gTOlRKO9jVM"
},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "84b857caf9314005be499369f99638ee",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
" 0%| | 0/2647 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"from langchain.text_splitter import RecursiveCharacterTextSplitter\n",
"from langchain.docstore.document import Document as LangchainDocument\n",
Expand All @@ -192,26 +166,6 @@
" docs_processed += text_splitter.split_documents([doc])"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"2000"
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"max([len(doc.page_content) for doc in docs_processed])"
]
},
{
"cell_type": "markdown",
"metadata": {
Expand Down Expand Up @@ -307,33 +261,11 @@
},
{
"cell_type": "code",
"execution_count": 101,
"execution_count": null,
"metadata": {
"id": "8fteqDDD9jVN"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Generating 10 QA couples...\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "84a6817f8a64408eb05f16fdca3fe9f9",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
" 0%| | 0/10 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"import random\n",
"\n",
Expand Down Expand Up @@ -527,33 +459,11 @@
},
{
"cell_type": "code",
"execution_count": 104,
"execution_count": null,
"metadata": {
"id": "b9tbk7ME9jVO"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Generating critique for each QA couple...\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "41d674592e6a4200824277b52900b0aa",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
" 0%| | 0/8 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"print(\"Generating critique for each QA couple...\")\n",
"for output in tqdm(outputs):\n",
Expand Down Expand Up @@ -1593,9 +1503,9 @@
"provenance": []
},
"kernelspec": {
"display_name": "cookbook",
"display_name": "cookbook2",
"language": "python",
"name": "cookbook"
"name": "cookbook2"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -1607,7 +1517,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.6"
"version": "3.12.0"
}
},
"nbformat": 4,
Expand Down

0 comments on commit af13271

Please sign in to comment.