From f3e69507246349be225e9f8f22ed57fad77d5203 Mon Sep 17 00:00:00 2001 From: Anush008 Date: Sun, 15 Sep 2024 15:06:20 +0530 Subject: [PATCH] fix: Display output in mardown --- notebooks/en/code_search.ipynb | 73 +++++++++++++++------------------- 1 file changed, 33 insertions(+), 40 deletions(-) diff --git a/notebooks/en/code_search.ipynb b/notebooks/en/code_search.ipynb index 07b7e9a0..c85d1d4c 100644 --- a/notebooks/en/code_search.ipynb +++ b/notebooks/en/code_search.ipynb @@ -172,7 +172,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" @@ -180,33 +180,31 @@ "id": "nZEBXstzQQCk", "outputId": "81d723e6-08c2-4a25-8b8e-508c4a7e86b1" }, - "outputs": [ - { - "data": { - "text/plain": [ - "{'name': 'InvertedIndexRam',\n", - " 'signature': '# [doc = \" Inverted flatten index from dimension id to posting list\"] # [derive (Debug , Clone , PartialEq)] pub struct InvertedIndexRam { # [doc = \" Posting lists for each dimension flattened (dimension id -> posting list)\"] # [doc = \" Gaps are filled with empty posting lists\"] pub postings : Vec < PostingList > , # [doc = \" Number of unique indexed vectors\"] # [doc = \" pre-computed on build and upsert to avoid having to traverse the posting lists.\"] pub vector_count : usize , }',\n", - " 'code_type': 'Struct',\n", - " 'docstring': '= \" Inverted flatten index from dimension id to posting list\"',\n", - " 'line': 15,\n", - " 'line_from': 13,\n", - " 'line_to': 22,\n", - " 'context': {'module': 'inverted_index',\n", - " 'file_path': 'lib/sparse/src/index/inverted_index/inverted_index_ram.rs',\n", - " 'file_name': 'inverted_index_ram.rs',\n", - " 'struct_name': None,\n", - " 'snippet': '/// Inverted flatten index from dimension id to posting list\\n#[derive(Debug, Clone, PartialEq)]\\npub struct InvertedIndexRam {\\n /// Posting lists for each dimension flattened (dimension id -> posting list)\\n /// Gaps are filled with empty posting lists\\n pub postings: Vec,\\n /// Number of unique indexed vectors\\n /// pre-computed on build and upsert to avoid having to traverse the posting lists.\\n pub vector_count: usize,\\n}\\n'}}" - ] - }, - "execution_count": 3, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "structures[0]" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "```python\n", + "{'name': 'InvertedIndexRam',\n", + " 'signature': '# [doc = \" Inverted flatten index from dimension id to posting list\"] # [derive (Debug , Clone , PartialEq)] pub struct InvertedIndexRam { # [doc = \" Posting lists for each dimension flattened (dimension id -> posting list)\"] # [doc = \" Gaps are filled with empty posting lists\"] pub postings : Vec < PostingList > , # [doc = \" Number of unique indexed vectors\"] # [doc = \" pre-computed on build and upsert to avoid having to traverse the posting lists.\"] pub vector_count : usize , }',\n", + " 'code_type': 'Struct',\n", + " 'docstring': '= \" Inverted flatten index from dimension id to posting list\"',\n", + " 'line': 15,\n", + " 'line_from': 13,\n", + " 'line_to': 22,\n", + " 'context': {'module': 'inverted_index',\n", + " 'file_path': 'lib/sparse/src/index/inverted_index/inverted_index_ram.rs',\n", + " 'file_name': 'inverted_index_ram.rs',\n", + " 'struct_name': None,\n", + " 'snippet': '/// Inverted flatten index from dimension id to posting list\\n#[derive(Debug, Clone, PartialEq)]\\npub struct InvertedIndexRam {\\n /// Posting lists for each dimension flattened (dimension id -> posting list)\\n /// Gaps are filled with empty posting lists\\n pub postings: Vec,\\n /// Number of unique indexed vectors\\n /// pre-computed on build and upsert to avoid having to traverse the posting lists.\\n pub vector_count: usize,\\n}\\n'}}\n", + " ```" + ] + }, { "cell_type": "markdown", "metadata": { @@ -314,7 +312,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", @@ -323,25 +321,20 @@ "id": "zosN7TC9QQCl", "outputId": "38e0d938-3fb1-4426-f00c-74a42267bf7d" }, - "outputs": [ - { - "data": { - "application/vnd.google.colaboratory.intrinsic+json": { - "type": "string" - }, - "text/plain": [ - "'Function Hnsw discover precision that does Checks discovery search precision when using hnsw index this is different from the tests in defined as Fn hnsw discover precision module integration file hnsw_discover_test rs'" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "text_representations[1000]" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "```python\n", + "'Function Hnsw discover precision that does Checks discovery search precision when using hnsw index this is different from the tests in defined as Fn hnsw discover precision module integration file hnsw_discover_test rs'\n", + "```" + ] + }, { "cell_type": "markdown", "metadata": {