├── .xet └── config.toml ├── .gitattributes ├── data ├── squad2.json ├── qa_result_df.pickle ├── openai_qn_embeddings.npy ├── paragraphs_and_qa.pickle ├── query_augment_cache.pickle ├── bm25_knn_qn_to_paragraph.npy ├── openai_knn_qn_to_paragraph.npy ├── qa_question_augmentation.pickle ├── openai_paragraphs_embeddings.npy ├── sub_qa_question_augmentation.pickle └── bm25_knn_qn_to_paragraph_augmented.npy ├── requirements.txt ├── xmemo ├── 558ea79e9db37829c5bd21fe76b8a9643ad70d8cf792e1a39df746e271953828.pickle ├── 77fd21df8c8e7900f005091fa11c661fd69c29ddcda6c2ef56266297123ae245.pickle ├── 781376466a87dec662b0367cac19fd838c7be795daecf537e03a878514f28af7.pickle ├── d6b734089137bc13e1286c07142dd652ce6226acec3f9065da6c645ef9d7deb1.pickle ├── e06196685b0c2069ecd0b9336662b29b395d8b8fc7c1b9eb2117f1c1f2804e7a.pickle ├── e270d13c76177f1521788e24c7bcd8e73996f7f68764719b8e878262b0c9f344.pickle ├── ee19726183938849020ea796eef0e469f0723582925a26cba0095c33616b3578.pickle ├── 13874af01dcac59b9b8ce9a31aa3a55f77b8b193df520e672084250e96b4f062.pickle ├── 2943cba8dd9262e61ddb52e4f10a7dfb33f46e3d7c18bf5e796fb0cec11fc0e4.pickle ├── 5bf1df97489e86f817f0fc32db826845e3c3db6976a0e95bccdaf62f23b3bfce.pickle ├── 6eacf75df40188544016f9917529add051be3798b90cedd807fa18af519fc760.pickle ├── 6f9fdedb188cbc14a74921efe44e51202f2878fd483cc3648fa869888fd39322.pickle ├── 701803f134137adbfaba992742b64186f29b1ab4fa66913876e3387749b3a382.pickle ├── 7d061a8f7ec1b8fea50a10b175722d29d1302c81dfea987a61278ee439c74e62.pickle ├── 877197d865d11dd8a0d7f8f600194670b0ece3e1a13532555d3b012f96525dbb.pickle ├── 97b541c4adf311821df1df21ad0cc2c0b8d4e3262891398739a4ee4df39d29dc.pickle └── cc5bfe00d3f697777cc7ab8cde916b35aee5628c3e8d9f80005fb7e6e00ba76c.pickle ├── bm25_helpers.py ├── LICENSE ├── README.md ├── xetmemo_kernel_extension.py └── .gitignore /.xet/config.toml: -------------------------------------------------------------------------------- 1 | [upstream] 2 | origin_type = "github" 3 | user_name = "xetdata" 4 | repo_name = "RagIRBench" 5 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # XET LOCK 2 | * filter=xet diff=xet merge=xet -text 3 | *.gitattributes filter= 4 | *.xet/** filter= 5 | -------------------------------------------------------------------------------- /data/squad2.json: -------------------------------------------------------------------------------- 1 | # xet version 0 2 | filesize = 42123633 3 | hash = '6a4354fdc67fbe0f8565f0bc22cb1c03e4f3323efb843c68030a1bf951e090dd' 4 | -------------------------------------------------------------------------------- /data/qa_result_df.pickle: -------------------------------------------------------------------------------- 1 | # xet version 0 2 | filesize = 7483020 3 | hash = '156cb0506922e372adcd0f71abebb09469f79f5374eb4dabf97d61197f7eafb5' 4 | -------------------------------------------------------------------------------- /data/openai_qn_embeddings.npy: -------------------------------------------------------------------------------- 1 | # xet version 0 2 | filesize = 1066856576 3 | hash = '60e6a1cc0cc790e63e61c63cca21bb4acc758ac88266f725273232eee81dddf9' 4 | -------------------------------------------------------------------------------- /data/paragraphs_and_qa.pickle: -------------------------------------------------------------------------------- 1 | # xet version 0 2 | filesize = 22028135 3 | hash = 'f17ad47bbf2c57a86303d629690b05554eab5c3959116e1907e35bfe3c4af7dc' 4 | -------------------------------------------------------------------------------- /data/query_augment_cache.pickle: -------------------------------------------------------------------------------- 1 | # xet version 0 2 | filesize = 11078602 3 | hash = '511c290b50994d523193421e729d046066be0b0067b586179cb6e26e2c7c546f' 4 | -------------------------------------------------------------------------------- /data/bm25_knn_qn_to_paragraph.npy: -------------------------------------------------------------------------------- 1 | # xet version 0 2 | filesize = 6945808 3 | hash = '9b9df79cde592f084ccbcbcfb179fa7732efae72a914a9dc0b34a5fcd4ad533b' 4 | -------------------------------------------------------------------------------- /data/openai_knn_qn_to_paragraph.npy: -------------------------------------------------------------------------------- 1 | # xet version 0 2 | filesize = 13891488 3 | hash = '19cb5b8df79fd4716fb576a4659c3c5dbf5a5b7d2bc541b296769d538ea117b8' 4 | -------------------------------------------------------------------------------- /data/qa_question_augmentation.pickle: -------------------------------------------------------------------------------- 1 | # xet version 0 2 | filesize = 5643367 3 | hash = 'f5d28621236f2e6cbe606930f009cab018ac674a8437bc9b4c403452e883f89a' 4 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | matplotlib==3.8.2 2 | pandas==2.0.0 3 | openai==1.3.5 4 | numpy==1.25.1 5 | scikit-learn==1.3.0 6 | rank-bm25==0.2.2 7 | spacy==3.7.2 8 | -------------------------------------------------------------------------------- /data/openai_paragraphs_embeddings.npy: -------------------------------------------------------------------------------- 1 | # xet version 0 2 | filesize = 233902208 3 | hash = '7a93cdf8bc2f115d0511381365ab8d7bf826d5b0d73e1fe72457079bac85ef2e' 4 | -------------------------------------------------------------------------------- /data/sub_qa_question_augmentation.pickle: -------------------------------------------------------------------------------- 1 | # xet version 0 2 | filesize = 562682 3 | hash = 'dc0c05932d04b3d90326a7bdbe0cc71f6918050181e32ec5b150ac6739a02343' 4 | -------------------------------------------------------------------------------- /data/bm25_knn_qn_to_paragraph_augmented.npy: -------------------------------------------------------------------------------- 1 | # xet version 0 2 | filesize = 6945808 3 | hash = 'b19d1319b049a9db1166aeef2011319d1b20497f4eccf0d07a598dff317afb8e' 4 | -------------------------------------------------------------------------------- /xmemo/558ea79e9db37829c5bd21fe76b8a9643ad70d8cf792e1a39df746e271953828.pickle: -------------------------------------------------------------------------------- 1 | # xet version 0 2 | filesize = 750158 3 | hash = '9cfa0f90d1a5f16b820809d19baea5a52dcfd45cc4cfa17d69fafa4147863d5b' 4 | -------------------------------------------------------------------------------- /xmemo/77fd21df8c8e7900f005091fa11c661fd69c29ddcda6c2ef56266297123ae245.pickle: -------------------------------------------------------------------------------- 1 | # xet version 0 2 | filesize = 18088 3 | hash = '830081585ede34a34c2458c063c6e3cdb58605af77d43befc2574bbeaeca7160' 4 | -------------------------------------------------------------------------------- /xmemo/781376466a87dec662b0367cac19fd838c7be795daecf537e03a878514f28af7.pickle: -------------------------------------------------------------------------------- 1 | # xet version 0 2 | filesize = 7884363 3 | hash = '6fd1aa879056b04200ff0627cc0d6bdba4bb7fee2d4f1e6c3ad35873fd37b275' 4 | -------------------------------------------------------------------------------- /xmemo/d6b734089137bc13e1286c07142dd652ce6226acec3f9065da6c645ef9d7deb1.pickle: -------------------------------------------------------------------------------- 1 | # xet version 0 2 | filesize = 1858 3 | hash = '6ca074a7dfe60de61fe28895f7d8e96d6d8f75da00964709cab02547d2ab5503' 4 | -------------------------------------------------------------------------------- /xmemo/e06196685b0c2069ecd0b9336662b29b395d8b8fc7c1b9eb2117f1c1f2804e7a.pickle: -------------------------------------------------------------------------------- 1 | # xet version 0 2 | filesize = 7884363 3 | hash = '6fd1aa879056b04200ff0627cc0d6bdba4bb7fee2d4f1e6c3ad35873fd37b275' 4 | -------------------------------------------------------------------------------- /xmemo/e270d13c76177f1521788e24c7bcd8e73996f7f68764719b8e878262b0c9f344.pickle: -------------------------------------------------------------------------------- 1 | # xet version 0 2 | filesize = 9780068 3 | hash = '17376ffb99ac62d3194a0ab71c9417213c9c2c628f93a54e41fc86a63d8d0c2f' 4 | -------------------------------------------------------------------------------- /xmemo/ee19726183938849020ea796eef0e469f0723582925a26cba0095c33616b3578.pickle: -------------------------------------------------------------------------------- 1 | # xet version 0 2 | filesize = 9780068 3 | hash = '19c5dde7716019677df887f47cf29d5d18ffe271927159bd2e7ca3fb6e4bd88e' 4 | -------------------------------------------------------------------------------- /xmemo/13874af01dcac59b9b8ce9a31aa3a55f77b8b193df520e672084250e96b4f062.pickle: -------------------------------------------------------------------------------- 1 | # xet version 0 2 | filesize = 37827076 3 | hash = 'e2cd9f0b62115368744dbd9462a5c6c8943f7537fed61a24a5fef749a87a29fc' 4 | -------------------------------------------------------------------------------- /xmemo/2943cba8dd9262e61ddb52e4f10a7dfb33f46e3d7c18bf5e796fb0cec11fc0e4.pickle: -------------------------------------------------------------------------------- 1 | # xet version 0 2 | filesize = 18991186 3 | hash = 'cf58daf8ddfa71eb73e373740f27598b0f62bce0e38c3aa3da258db37efe4742' 4 | -------------------------------------------------------------------------------- /xmemo/5bf1df97489e86f817f0fc32db826845e3c3db6976a0e95bccdaf62f23b3bfce.pickle: -------------------------------------------------------------------------------- 1 | # xet version 0 2 | filesize = 13891607 3 | hash = '1693c9d1d4ef01047efbf8fa4775395eefbae1e6fa34f1ed7dd967a2fee92eb2' 4 | -------------------------------------------------------------------------------- /xmemo/6eacf75df40188544016f9917529add051be3798b90cedd807fa18af519fc760.pickle: -------------------------------------------------------------------------------- 1 | # xet version 0 2 | filesize = 13891607 3 | hash = '771fc8c75c7505c897dff6476fff0e45b9fdb3382e38177e3fff1cf85c7f45de' 4 | -------------------------------------------------------------------------------- /xmemo/6f9fdedb188cbc14a74921efe44e51202f2878fd483cc3648fa869888fd39322.pickle: -------------------------------------------------------------------------------- 1 | # xet version 0 2 | filesize = 233902243 3 | hash = '06989208dcb2817f3e80ba24cf9b988537a00da44ba6fe0157bcbb958a003108' 4 | -------------------------------------------------------------------------------- /xmemo/701803f134137adbfaba992742b64186f29b1ab4fa66913876e3387749b3a382.pickle: -------------------------------------------------------------------------------- 1 | # xet version 0 2 | filesize = 233902243 3 | hash = '06989208dcb2817f3e80ba24cf9b988537a00da44ba6fe0157bcbb958a003108' 4 | -------------------------------------------------------------------------------- /xmemo/7d061a8f7ec1b8fea50a10b175722d29d1302c81dfea987a61278ee439c74e62.pickle: -------------------------------------------------------------------------------- 1 | # xet version 0 2 | filesize = 37827076 3 | hash = '1a0212ca50140facb8e28b91f2126a40413690a1e40cfaa9d7b33161707693ae' 4 | -------------------------------------------------------------------------------- /xmemo/877197d865d11dd8a0d7f8f600194670b0ece3e1a13532555d3b012f96525dbb.pickle: -------------------------------------------------------------------------------- 1 | # xet version 0 2 | filesize = 1066856613 3 | hash = '981c9833e6a4302d9a095016e1bd6f7db07f8a04382b941720bd25512290e74f' 4 | -------------------------------------------------------------------------------- /xmemo/97b541c4adf311821df1df21ad0cc2c0b8d4e3262891398739a4ee4df39d29dc.pickle: -------------------------------------------------------------------------------- 1 | # xet version 0 2 | filesize = 16726693 3 | hash = '8bc7da4a7c14dc02611f88e18cd4a5b5fb05aa33c7ce3594c3ef7708da6e73c2' 4 | -------------------------------------------------------------------------------- /xmemo/cc5bfe00d3f697777cc7ab8cde916b35aee5628c3e8d9f80005fb7e6e00ba76c.pickle: -------------------------------------------------------------------------------- 1 | # xet version 0 2 | filesize = 27782967 3 | hash = '107b8a7be98ea8f2e05a0f1b8335201a7ab69b7de3d512fa755f65ba7f42a8db' 4 | -------------------------------------------------------------------------------- /bm25_helpers.py: -------------------------------------------------------------------------------- 1 | import spacy 2 | from rank_bm25 import BM25Okapi 3 | import numpy as np 4 | nlp = spacy.load("en_core_web_sm") 5 | 6 | def tokenize(sentence): 7 | words = nlp(sentence) 8 | return [token.text for token in words] 9 | 10 | def get_bm25_top_k(bm25, sentence, k): 11 | z = bm25.get_scores(tokenize(sentence)) 12 | return np.argsort(-z)[:k].copy() 13 | def get_bm25_top_k_batch(bm25, sentence_list, k): 14 | return [get_bm25_top_k(bm25, sentence, k) for sentence in sentence_list] 15 | 16 | 17 | def get_bm25_top_10_augmented(bm25, sentence, augment): 18 | tok = tokenize(sentence) 19 | z = bm25.get_scores(tok + augment) 20 | return np.argsort(-z)[:10].copy() 21 | 22 | def get_bm25_top_10_batch_augmented(bm25, sentence_list, augment_list): 23 | return [get_bm25_top_10_augmented(bm25, sentence, augment) for sentence, augment in zip(sentence_list, augment_list)] 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2023, XetData 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | 15 | 3. Neither the name of the copyright holder nor the names of its 16 | contributors may be used to endorse or promote products derived from 17 | this software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | You Do Not Need a Vector Database 2 | ================================= 3 | RAG (Retrieval Augmented Generation) has become the primary method to add 4 | "memory" to an LLM, allowing the LLM to read and reference documents from 5 | anywhere. Vector databases have risen in popularity as the method of choice to 6 | find and retrieve these documents. 7 | 8 | In this notebook, I make the case that you do not need a vector database for RAG. 9 | The document retrieval problem for RAG is basically a case for information retrieval 10 | and there are simpler solutions to do so. Vector embeddings are *still* useful, 11 | but they should be used in a later stage of the IR pipeline and not as the 12 | first stage retrieval, for which there are simpler and more performant solutions. 13 | 14 | Full blog post [here](http://about.xethub.com/blog/you-dont-need-a-vector-database) 15 | 16 | Notebook [here](you_do_not_need_a_vector_database.ipynb) 17 | 18 | To run the notebook: 19 | Install the git-xet extension from 20 | [https://github.com/xetdata/xet-tools/releases/](https://github.com/xetdata/xet-tools/releases/) 21 | 22 | ``` 23 | git xet clone --lazy git@github.com:xetdata/RagIRBench.git 24 | ``` 25 | 26 | Or to clone everything: 27 | 28 | ``` 29 | git xet clone git@github.com:xetdata/RagIRBench.git 30 | ``` 31 | 32 | Memoization 33 | ----------- 34 | We use a custom jupyter extension to memoize costly / slow computations 35 | (like openai calls etc). This memo is stored together with the repo 36 | and makes things a lot easier to run. 37 | 38 | When used with git-xet extension, the lazy clone can be used 39 | ``` 40 | git xet clone --lazy git@github.com:xetdata/RagIRBench.git 41 | ``` 42 | 43 | this extension will selectively download what is needed so the entire collection 44 | of memos do not need to be all downloaded on clone. 45 | 46 | 47 | -------------------------------------------------------------------------------- /xetmemo_kernel_extension.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import os 3 | import hashlib 4 | import pickle 5 | import os 6 | import subprocess 7 | 8 | from IPython.core.error import UsageError 9 | from IPython.core.magic import Magics, magics_class, cell_magic 10 | 11 | memopath = os.path.join(os.getcwd(), 'xmemo') 12 | 13 | 14 | def hash_anything(x): 15 | return hashlib.sha256(pickle.dumps(x)).hexdigest() 16 | 17 | def file_is_pointer_file(x): 18 | if os.path.exists(x): 19 | with open(x, 'rb') as f: 20 | rl = f.readline() 21 | return rl.startswith(b"# xet version 0") 22 | else: 23 | return False 24 | 25 | def materialize_pointer_file(x): 26 | print(f"Materializing {x}") 27 | try: 28 | subprocess.run(["git-xet", "materialize", x], check=True) 29 | return True 30 | except: 31 | print(f"A memorized file exists at {x}, but we are unable to materialize it. Falling back to executing the cell normally") 32 | return False 33 | 34 | @magics_class 35 | class XMemoMagics(Magics): 36 | """Memoization for python variables. 37 | 38 | Provides the %xmemo magic.""" 39 | 40 | @cell_magic 41 | def xetmemo(self, line, cell): 42 | ''' 43 | putting 44 | 45 | %%xmemo input=v1,v2 output=v3,v4 46 | 47 | will pickle/memoize the output variables at the end of execution. 48 | Any content changes to the inputs, or cell code will force reevaluation 49 | of the cell. Otherwise the outputs will simply be unpickled from the memo. 50 | 51 | Note the python hash is used to identify changes. This may not be completely 52 | reliable for all purposes. The memo is stored in the xmemo/ directory 53 | ''' 54 | # parse the argument list 55 | args = line.strip().split(' ') 56 | inputvars = [] 57 | outputvars = [] 58 | ip = self.shell 59 | 60 | for arg in args: 61 | k,v = arg.split('=') 62 | if k == 'input': 63 | inputvars = [x.strip() for x in v.split(',')] 64 | elif k == 'output': 65 | outputvars = [x.strip() for x in v.split(',')] 66 | else: 67 | raise RuntimeError(f'Unexpected xmemo key type {k}') 68 | 69 | inputhashes = [hash_anything(line), hash_anything(cell)] + [hash_anything(ip.ev(i)) for i in inputvars] 70 | inputhashstr = hash_anything(inputhashes) 71 | memo_file = os.path.join(memopath, inputhashstr + '.pickle') 72 | try: 73 | if os.path.exists(memo_file): 74 | if file_is_pointer_file(memo_file): 75 | materialize_pointer_file(memo_file) 76 | with open(memo_file, 'rb') as f: 77 | print(f"Loading from {inputhashstr}.pickle") 78 | ovars = {v:pickle.load(f) for v in outputvars} 79 | for k,v in ovars.items(): 80 | ip.user_ns[k] = v 81 | return 82 | except: 83 | pass 84 | 85 | ret = ip.run_cell(cell) 86 | if ret.success: 87 | os.makedirs(memopath, exist_ok=True) 88 | with open(memo_file, 'wb') as f: 89 | for v in outputvars: 90 | pickle.dump(ip.user_ns[v], f) 91 | 92 | 93 | def load_ipython_extension(ip): 94 | """Load the extension in IPython.""" 95 | ip.register_magics(XMemoMagics) 96 | 97 | #def load_ipython_extension(shell): 98 | # '''Registers the skip magic when the extension loads.''' 99 | # shell.register_magic_function(xmemo, 'line_cell') 100 | 101 | #def unload_ipython_extension(shell): 102 | # '''Unregisters the skip magic when the extension unloads.''' 103 | # del shell.magics_manager.magics['cell']['xmemo'] 104 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | share/python-wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | MANIFEST 28 | 29 | # PyInstaller 30 | # Usually these files are written by a python script from a template 31 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 32 | *.manifest 33 | *.spec 34 | 35 | # Installer logs 36 | pip-log.txt 37 | pip-delete-this-directory.txt 38 | 39 | # Unit test / coverage reports 40 | htmlcov/ 41 | .tox/ 42 | .nox/ 43 | .coverage 44 | .coverage.* 45 | .cache 46 | nosetests.xml 47 | coverage.xml 48 | *.cover 49 | *.py,cover 50 | .hypothesis/ 51 | .pytest_cache/ 52 | cover/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | .pybuilder/ 76 | target/ 77 | 78 | # Jupyter Notebook 79 | .ipynb_checkpoints 80 | 81 | # IPython 82 | profile_default/ 83 | ipython_config.py 84 | 85 | # pyenv 86 | # For a library or package, you might want to ignore these files since the code is 87 | # intended to run in multiple environments; otherwise, check them in: 88 | # .python-version 89 | 90 | # pipenv 91 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 92 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 93 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 94 | # install all needed dependencies. 95 | #Pipfile.lock 96 | 97 | # poetry 98 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. 99 | # This is especially recommended for binary packages to ensure reproducibility, and is more 100 | # commonly ignored for libraries. 101 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control 102 | #poetry.lock 103 | 104 | # pdm 105 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. 106 | #pdm.lock 107 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it 108 | # in version control. 109 | # https://pdm.fming.dev/#use-with-ide 110 | .pdm.toml 111 | 112 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm 113 | __pypackages__/ 114 | 115 | # Celery stuff 116 | celerybeat-schedule 117 | celerybeat.pid 118 | 119 | # SageMath parsed files 120 | *.sage.py 121 | 122 | # Environments 123 | .env 124 | .venv 125 | env/ 126 | venv/ 127 | ENV/ 128 | env.bak/ 129 | venv.bak/ 130 | 131 | # Spyder project settings 132 | .spyderproject 133 | .spyproject 134 | 135 | # Rope project settings 136 | .ropeproject 137 | 138 | # mkdocs documentation 139 | /site 140 | 141 | # mypy 142 | .mypy_cache/ 143 | .dmypy.json 144 | dmypy.json 145 | 146 | # Pyre type checker 147 | .pyre/ 148 | 149 | # pytype static type analyzer 150 | .pytype/ 151 | 152 | # Cython debug symbols 153 | cython_debug/ 154 | 155 | # PyCharm 156 | # JetBrains specific template is maintained in a separate JetBrains.gitignore that can 157 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore 158 | # and can be added to the global gitignore or merged into this file. For a more nuclear 159 | # option (not recommended) you can uncomment the following to ignore the entire idea folder. 160 | #.idea/ 161 | --------------------------------------------------------------------------------