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

fix: Display output in mardown #199

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 33 additions & 40 deletions notebooks/en/code_search.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -172,41 +172,39 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"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<PostingList>,\\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<PostingList>,\\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": {
Expand Down Expand Up @@ -314,7 +312,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
Expand All @@ -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": {
Expand Down