Skip to content

Conversation

@jhamon
Copy link
Collaborator

@jhamon jhamon commented Jan 29, 2026

Summary

  • Update Pinecone Python SDK from ~=7.3.0 to ~=8.0 in docs/semantic-search.ipynb
  • Apply code formatting with ruff

This keeps the notebook up to date with the latest SDK version while maintaining backward compatibility with existing API patterns.

Test plan

  • Verify notebook JSON is valid
  • Confirm notebook executes successfully in Colab

Related


Note

Low Risk
Low risk: changes are limited to documentation/notebook code and dependency lock metadata, with no production runtime impact beyond keeping the example compatible with newer SDK versions.

Overview
Updates docs/semantic-search.ipynb to install and use pinecone==8.0.0, adds a Colab-only auth fallback, and applies ruff-style formatting/cleanup to the notebook cells.

Regenerates poetry.lock with a newer Poetry version, updating markers/group metadata and adding the dev extras section (including click).

Written by Cursor Bugbot for commit 008c678. This will update automatically on new commits. Configure here.

Update Pinecone Python SDK from ~=7.3.0 to ~=8.0 and apply
code formatting.

Ref: SDK-124
@jhamon jhamon added the documentation Improvements or additions to documentation label Jan 29, 2026
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

- Sort imports (os before pinecone)
- Remove unnecessary f-string prefix
@jhamon
Copy link
Collaborator Author

jhamon commented Jan 29, 2026

CI Status Note

The test-notebooks / test-notebooks check failure is a pre-existing infrastructure issue, not related to the SDK version update in this PR.

Root cause: The notebook uses !uv pip install (introduced in commit 902ec2d), but the CI's convert-notebook.py script only recognizes !pip or %pip commands. This causes the notebook dependencies not to be installed during CI testing.

This PR's changes:

  • Updated pinecone~=7.3.0 to pinecone~=8.0
  • Fixed lint errors (import sorting, f-string)

The Bugbot review passed with no issues. The infrastructure fix for uv pip support should be addressed in a separate ticket.

jhamon added 11 commits January 29, 2026 09:56
CI run-notebook action does not have uv; use plain pip so test-notebooks job passes.
- Move all imports to first code cell per notebook structure check
- Put pip install on single line to satisfy check-pinning (no trailing \)
- Sort imports (ruff)
…sion

CI run-notebook converts cells with pip into run.sh; imports in the same
cell were not included in the executed script. Split into separate cells
so the converted notebook runs correctly.
Stream outputs need 'name' (stdout); execute_result outputs need
'metadata' and 'execution_count' for validate-notebook-formats.
- Merge import statements into the first code cell (pip install) to satisfy
  the notebook structure check requirement
- Merge master to get latest poetry.lock and regenerate for consistency
The notebook runner runs cells with "pip install" as bash commands.
By putting imports in a separate cell BEFORE the pip install cell,
we satisfy both:
1. Structure check (imports in first code cell)
2. Notebook runner (imports run as Python, pip as bash)
The pinecone_notebooks.colab module only works in Google Colab.
Wrap the import in try/except to allow the notebook to run in CI.
@jhamon jhamon force-pushed the jhamon/sdk-124-update-semantic-searchipynb-to-sdk-v8 branch from 318a4de to 008c678 Compare January 29, 2026 16:38
@jhamon jhamon merged commit 448e9cf into master Jan 29, 2026
12 checks passed
@jhamon jhamon deleted the jhamon/sdk-124-update-semantic-searchipynb-to-sdk-v8 branch January 29, 2026 16:40
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

"from datasets import load_dataset\n",
"from pinecone import Pinecone\n",
"from tqdm import tqdm"
]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Imports placed before pip install causes execution failure

High Severity

The code cell containing import os, from datasets import load_dataset, from pinecone import Pinecone, and from tqdm import tqdm (Cell 2) is positioned before the !pip install cell (Cell 3). When executing the notebook sequentially in a fresh environment like Colab, the imports will fail with ModuleNotFoundError because the packages haven't been installed yet. The pip install cell needs to come before the imports cell.

Additional Locations (1)

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants