Skip to content

Conversation

@jhamon
Copy link
Collaborator

@jhamon jhamon commented Jan 29, 2026

Summary

Updates learn/search/audio/audio-search/audio-search.ipynb to use Pinecone SDK v8.

Changes

Audience / use case

Developers building audio similarity search with Pinecone (e.g. finding similar sounds, song/catalog search).

Prerequisites

  • Pinecone API key
  • panns-inference, datasets, librosa for audio embedding and playback

Linear

Closes SDK-170


Note

Low Risk
Low risk: changes are limited to a tutorial notebook’s dependency install and Pinecone client initialization/key handling, with no impact on production code paths.

Overview
Updates learn/search/audio/audio-search/audio-search.ipynb to use the Pinecone SDK v8 (pinecone==8.0.0) instead of the legacy client.

Standardizes API key handling to prefer PINECONE_API_KEY from the environment with a getpass fallback, and updates initialization to pc = Pinecone(api_key=api_key) with serverless index spec configuration.

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

- Replace pinecone-client with pinecone package
- Use getpass fallback for API key per notebook review template
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

- Move all imports to first code cell following notebook standards
- Pin dependency versions (pinecone==8.0.0, panns-inference==0.1.1, datasets==3.2.0, librosa==0.10.2)
- Remove scattered import statements from individual cells

Co-authored-by: Claude <[email protected]>
@jhamon
Copy link
Collaborator Author

jhamon commented Jan 31, 2026

🤖 Auto-fix attempt 5 completed at 2026-01-31T23:38:06Z

jhamon and others added 4 commits January 31, 2026 21:19
….ipynb

- Add torch to pip install dependencies (required by panns-inference)
- Update Pinecone docs URL from /docs/projects to /troubleshooting/available-cloud-regions

Co-authored-by: Claude <[email protected]>
- Pin torch to version 2.6.0 (required by lint checks)
- Update Pinecone docs URL to working link (guides/projects/understanding-projects)
- Previous URL was redirecting with 307 status, causing link checker to fail

Co-authored-by: Claude <[email protected]>
The notebook was hardcoded to use CUDA device, which caused test
failures in environments without GPU support. Updated to detect
GPU availability and fall back to CPU when necessary.

Changes:
- Added torch import to cell-5
- Updated cell-15 to automatically detect and use available device
- Removed hardcoded "cuda" device parameter

Co-authored-by: Claude <[email protected]>
The notebook test was failing because the wget command was being
filtered out by the notebook conversion script (which removes lines
starting with ! or %). This caused the miaow_16k.wav file download
to be skipped, leading to a FileNotFoundError when the notebook
tried to load the file.

Fixed by:
- Replacing !wget command with urllib.request.urlretrieve()
- Adding urllib.request import to the main imports cell
- Maintaining the same functionality with pure Python code

Co-authored-by: Claude <[email protected]>
@jhamon jhamon merged commit 96502ae into master Feb 1, 2026
12 checks passed
@jhamon jhamon deleted the jhamon/sdk-170-modernize-sdk-audio-searchipynb branch February 1, 2026 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants