2023-05-02 03:37:24 +00:00
|
|
|
.vs/
|
2022-11-09 21:23:17 +00:00
|
|
|
.vscode/
|
2022-12-13 13:20:22 +00:00
|
|
|
.idea/
|
2022-10-24 21:51:15 +00:00
|
|
|
# Byte-compiled / optimized / DLL files
|
|
|
|
__pycache__/
|
|
|
|
*.py[cod]
|
|
|
|
*$py.class
|
|
|
|
|
|
|
|
# C extensions
|
|
|
|
*.so
|
|
|
|
|
|
|
|
# Distribution / packaging
|
|
|
|
.Python
|
|
|
|
build/
|
|
|
|
develop-eggs/
|
|
|
|
dist/
|
|
|
|
downloads/
|
|
|
|
eggs/
|
|
|
|
.eggs/
|
|
|
|
lib/
|
|
|
|
lib64/
|
|
|
|
parts/
|
|
|
|
sdist/
|
|
|
|
var/
|
|
|
|
wheels/
|
|
|
|
pip-wheel-metadata/
|
|
|
|
share/python-wheels/
|
|
|
|
*.egg-info/
|
|
|
|
.installed.cfg
|
|
|
|
*.egg
|
|
|
|
MANIFEST
|
|
|
|
|
|
|
|
# PyInstaller
|
|
|
|
# Usually these files are written by a python script from a template
|
|
|
|
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
|
|
*.manifest
|
|
|
|
*.spec
|
|
|
|
|
|
|
|
# Installer logs
|
|
|
|
pip-log.txt
|
|
|
|
pip-delete-this-directory.txt
|
|
|
|
|
|
|
|
# Unit test / coverage reports
|
|
|
|
htmlcov/
|
|
|
|
.tox/
|
|
|
|
.nox/
|
|
|
|
.coverage
|
|
|
|
.coverage.*
|
|
|
|
.cache
|
|
|
|
nosetests.xml
|
|
|
|
coverage.xml
|
|
|
|
*.cover
|
|
|
|
*.py,cover
|
|
|
|
.hypothesis/
|
|
|
|
.pytest_cache/
|
|
|
|
|
|
|
|
# Translations
|
|
|
|
*.mo
|
|
|
|
*.pot
|
|
|
|
|
|
|
|
# Django stuff:
|
|
|
|
*.log
|
|
|
|
local_settings.py
|
|
|
|
db.sqlite3
|
|
|
|
db.sqlite3-journal
|
|
|
|
|
|
|
|
# Flask stuff:
|
|
|
|
instance/
|
|
|
|
.webassets-cache
|
|
|
|
|
|
|
|
# Scrapy stuff:
|
|
|
|
.scrapy
|
|
|
|
|
|
|
|
# Sphinx documentation
|
|
|
|
docs/_build/
|
|
|
|
|
|
|
|
# PyBuilder
|
|
|
|
target/
|
|
|
|
|
|
|
|
# Jupyter Notebook
|
|
|
|
.ipynb_checkpoints
|
|
|
|
notebooks/
|
|
|
|
|
|
|
|
# IPython
|
|
|
|
profile_default/
|
|
|
|
ipython_config.py
|
|
|
|
|
|
|
|
# pyenv
|
|
|
|
.python-version
|
|
|
|
|
|
|
|
# pipenv
|
|
|
|
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
|
|
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
|
|
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
|
|
# install all needed dependencies.
|
|
|
|
#Pipfile.lock
|
|
|
|
|
|
|
|
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
|
|
__pypackages__/
|
|
|
|
|
|
|
|
# Celery stuff
|
|
|
|
celerybeat-schedule
|
|
|
|
celerybeat.pid
|
|
|
|
|
|
|
|
# SageMath parsed files
|
|
|
|
*.sage.py
|
|
|
|
|
|
|
|
# Environments
|
|
|
|
.env
|
2023-03-02 17:04:18 +00:00
|
|
|
.envrc
|
2022-10-24 21:51:15 +00:00
|
|
|
.venv
|
2023-01-05 05:39:50 +00:00
|
|
|
.venvs
|
2022-10-24 21:51:15 +00:00
|
|
|
env/
|
|
|
|
venv/
|
|
|
|
ENV/
|
|
|
|
env.bak/
|
|
|
|
venv.bak/
|
|
|
|
|
|
|
|
# Spyder project settings
|
|
|
|
.spyderproject
|
|
|
|
.spyproject
|
|
|
|
|
|
|
|
# Rope project settings
|
|
|
|
.ropeproject
|
|
|
|
|
|
|
|
# mkdocs documentation
|
|
|
|
/site
|
|
|
|
|
|
|
|
# mypy
|
|
|
|
.mypy_cache/
|
|
|
|
.dmypy.json
|
|
|
|
dmypy.json
|
|
|
|
|
|
|
|
# Pyre type checker
|
|
|
|
.pyre/
|
2022-12-22 18:05:57 +00:00
|
|
|
|
|
|
|
# macOS display setting files
|
|
|
|
.DS_Store
|
2023-03-15 06:06:17 +00:00
|
|
|
|
2023-03-20 14:52:27 +00:00
|
|
|
# Wandb directory
|
|
|
|
wandb/
|
|
|
|
|
2023-03-15 06:06:17 +00:00
|
|
|
# asdf tool versions
|
2023-03-20 14:52:27 +00:00
|
|
|
.tool-versions
|
2023-04-05 13:51:32 +00:00
|
|
|
/.ruff_cache/
|
Fix notebook example (#3142)
The following calls were throwing an exception:
https://github.com/hwchase17/langchain/blob/575b717d108984676e25afd0910ccccfdaf9693d/docs/use_cases/evaluation/agent_vectordb_sota_pg.ipynb?short_path=4b3386c#L192
https://github.com/hwchase17/langchain/blob/575b717d108984676e25afd0910ccccfdaf9693d/docs/use_cases/evaluation/agent_vectordb_sota_pg.ipynb?short_path=4b3386c#L239
Exception:
```
---------------------------------------------------------------------------
ValidationError Traceback (most recent call last)
Cell In[14], line 1
----> 1 chain_sota = RetrievalQA.from_chain_type(llm=OpenAI(temperature=0), chain_type="stuff", retriever=vectorstore_sota, input_key="question")
File ~/github/langchain/venv/lib/python3.9/site-packages/langchain/chains/retrieval_qa/base.py:89, in BaseRetrievalQA.from_chain_type(cls, llm, chain_type, chain_type_kwargs, **kwargs)
85 _chain_type_kwargs = chain_type_kwargs or {}
86 combine_documents_chain = load_qa_chain(
87 llm, chain_type=chain_type, **_chain_type_kwargs
88 )
---> 89 return cls(combine_documents_chain=combine_documents_chain, **kwargs)
File ~/github/langchain/venv/lib/python3.9/site-packages/pydantic/main.py:341, in pydantic.main.BaseModel.__init__()
ValidationError: 1 validation error for RetrievalQA
retriever
instance of BaseRetriever expected (type=type_error.arbitrary_type; expected_arbitrary_type=BaseRetriever)
```
The vectorstores had to be converted to retrievers:
`vectorstore_sota.as_retriever()` and `vectorstore_pg.as_retriever()`.
The PR also:
- adds the file `paul_graham_essay.txt` referenced by this notebook
- adds to gitignore *.pkl and *.bin files that are generated by this
notebook
Interestingly enough, the performance of the prediction greatly
increased (new version of langchain or ne version of OpenAI models since
the last run of the notebook): from 19/33 correct to 28/33 correct!
2023-04-19 15:55:06 +00:00
|
|
|
|
|
|
|
*.pkl
|
2023-04-27 05:03:50 +00:00
|
|
|
*.bin
|
|
|
|
|
|
|
|
# integration test artifacts
|
|
|
|
data_map*
|
|
|
|
\[('_type', 'fake'), ('stop', None)]
|