Skip to content

Commit

Permalink
monorepo: add script for updating notebook cassettes (langchain-ai#27399
Browse files Browse the repository at this point in the history
)

1. Move dependencies for running notebooks into monorepo poetry test
deps;
2. Add script to update cassettes for a single notebook;
3. Add cassettes for some how-to guides.

---

To update cassettes for a single notebook, run
`docs/scripts/update_cassettes.sh`. For example:
```
./docs/scripts/update_cassettes.sh docs/docs/how_to/binding.ipynb
```
Requires:
1. monorepo dev and test dependencies installed;
2. env vars required by notebook are set.

Note: How-to guides are not currently run in [scheduled
job](https://github.com/langchain-ai/langchain/actions/workflows/run_notebooks.yml).
Will add cassettes for more how-to guides in subsequent PRs before
adding them to scheduled job.
  • Loading branch information
ccurme authored Oct 16, 2024
1 parent 88d71f6 commit fdb7f95
Show file tree
Hide file tree
Showing 23 changed files with 2,827 additions and 64 deletions.
14 changes: 3 additions & 11 deletions .github/workflows/run_notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,15 @@ jobs:

- name: Install dependencies
run: |
pip install -e libs/core
pip install -e libs/langchain
pip install -e libs/community
pip install --upgrade langchain-experimental
pip install -e libs//partners/anthropic
pip install -e libs//partners/chroma
pip install -e libs//partners/openai
pip install -e libs//partners/mistralai
pip install jupyter langgraph click pypdf vcrpy
poetry install --with dev,test
- name: Pre-download tiktoken files
run: |
python docs/scripts/download_tiktoken.py
poetry run python docs/scripts/download_tiktoken.py
- name: Prepare notebooks
run: |
python docs/scripts/prepare_notebooks_for_ci.py --comment-install-cells
poetry run python docs/scripts/prepare_notebooks_for_ci.py --comment-install-cells --working-directory ${{ github.event.inputs.working-directory || 'all' }}
- name: Run notebooks
env:
Expand Down
1 change: 1 addition & 0 deletions docs/cassettes/agent_executor_114ba50d.msgpack.zlib
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
eNrlV09z28YVb6c3nXLpfY3JKUNAAAiRoDSaDkUptqJItCXFlpzRcJaLBQETwMK7C4qkR4e4/QK49dZpLZMdjeokY0+bpnXPPfQLKId+iH6CvgUhi4o8k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l6cHdIXKdtGoMN233czPpucwWBdNkg9FaJ3ep2HtDd0T1n3F4ye6mz5taOwyr/9LFnthph0FvvM9Eye87GnHhLtqubpYQ103FN9ffqMjYiqIwyyF807PqfodSlkGr0txMwmczE81OIQ/qff0/LrvKn9tZVCP/6dB1iMn+7r6q7tYTaRCLbtB1kucuOvezU0d3t/fNW+cy+CsELJOlQLhbVUJ/1hxUEvYwLKlcz6evu1/scSqkPcblxmQNTEmRJn3pnrfdG/1sV/eBapQ+0J50OUyaoXoqZnx/ou7MGq2+uv56lms54DyfhuEiF/G2RBsfj4bFHMs8LBsex2Rg71bBLM+K/KVmghKhnQCA9FvkLx669Km8uA/EMlDd1y9RN69uhrvpIBK0GDFx8yy4v8tMlsP43Nwkk60Mfyl8W7vnX/D2nMcSvevkKxGk0Gv98P9ElUL3RqDvfXqcBO8+BWHYsvrlJUAKcWo1YnA8v6fXQyy8+hE0HV52GT2zXIth3rTqpOtitNahXX6Jmo+Hjv6vqSABHuTJlHFxNoRGGcpRfVGI8VCVntWotVWug6QrUWBJlHt3LuutM6SBWEDTliGHvy9bHeguTgOp7RTjm0/XDneb2ZuuvB/p8XOntdDZMTRMmktD3J3uUg1vyMxKxzIPayekEsHabh/kb16tafrVuYRfbrk/r+lp7b4ojEHJA8tdBdVVbdpyqtoJivOrWHNMsZqsvJrOS/93C7z0sseodIVR8TQ1iBMYwvbnZS+7SsajbGzsu6UdbVnjYfFLbsb1d09Mql21gxmFcjW5GEd1AQCAbpOoi7xK3VrmcrmbDlW7WrCpQzka0jg/iUJ6CVACbZFEEGAELiWpyME+FiUeH2rJZgSYXSawtPyunN21u7rsa8TTYcJhvBI5maCcVLWI9CPuuuISHF0OhRi6shq0Z1dHJwsLP1yJX6t+jUcS0W6b0ndumMLrHjm+dzgQnt07nzVun8ayq3zq14UfgrdNZMg+PbpvWv7kVCv+wjpqQLNXmtPx8vb2zcbSw8H/cixps
1 change: 1 addition & 0 deletions docs/cassettes/agent_executor_1f5932b6.msgpack.z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