Skip to content

Commit 1d0f046

Browse files
authored
Upgrade protobuf from v4 to v5: 5x Upsert throughput (#393)
Upgrade the protobuf dependancy from v4 (4.25) to v5 (5.28). This appears to have significantly faster protobuf encoding - I see a 4.5x - 5x inprovement in Upsert throughput on a given EC2 machine (i3.xlarge) for large batches (~300) of high dimensionality vectors (1536): Before: Performing Populate phase 1675770/138364198 ╸━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1% 0:35:34 44:17:17 Records/sec: 785.2 After: Performing Populate phase 1531830/138364198 ╸━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1% 0:07:07 10:35:48 Records/sec: 3584.4 I haven't dug into the exact details, but the profile is quite different - the python frames performing type checking are no longer present, so I assume they have been optimised, perhaps pushed to native code? Before profile: ![protobuf_v4](https://github.com/user-attachments/assets/2c201489-c3f0-489b-8db1-e393c8953747) After profile: ![protobuf_v5](https://github.com/user-attachments/assets/608ed8a0-9140-469f-88cc-d5546195050c) ## Type of Change - [x] None of the above: Dependency upgrade. ## Test Plan Describe specific steps for validating this change.
1 parent 587a5d5 commit 1d0f046

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

poetry.lock

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ grpcio = [
4949
]
5050
googleapis-common-protos = { version = ">=1.53.0", optional = true }
5151
lz4 = { version = ">=3.1.3", optional = true }
52-
protobuf = { version = "^4.25", optional = true }
52+
protobuf = { version = "^5.28", optional = true }
5353
protoc-gen-openapiv2 = {version = "^0.0.1", optional = true }
5454
pinecone-plugin-interface = "^0.0.7"
5555
pinecone-plugin-inference = "^1.1.0"

0 commit comments

Comments
 (0)