MLE-22708 - Adds vector encoding/decoding utilities#111
Merged
BillFarber merged 1 commit intomarklogic:developfrom Jul 11, 2025
Merged
MLE-22708 - Adds vector encoding/decoding utilities#111BillFarber merged 1 commit intomarklogic:developfrom
BillFarber merged 1 commit intomarklogic:developfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
Implements Python utilities to encode/decode float vectors as base64 strings compatible with MarkLogic’s vec:base64 functions, adds corresponding unit and integration tests, and updates the test environment Docker Compose configuration.
- Introduces
VectorUtilwithbase64_encode/base64_decodemethods inmarklogic/vector_util.py - Adds Python and server-backed tests in
tests/test_vector_util.py - Updates
test-app/docker-compose.ymlto rename the test service and use the MarkLogic 12 image
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/test_vector_util.py | New tests for encoding/decoding vectors in Python and via server |
| test-app/docker-compose.yml | Renamed test service and updated MarkLogic image reference |
| marklogic/vector_util.py | Added base64 encoding/decoding utility for float vectors |
Comments suppressed due to low confidence (2)
tests/test_vector_util.py:24
- Consider adding a test case that passes a base64 string with a non-zero version header to
base64_decodeand asserts that aValueErroris raised, to cover the unsupported version path.
for a, b in zip(decoded, VECTOR):
test-app/docker-compose.yml:1
- [nitpick] The commented-out original service name is no longer needed—removing it will reduce confusion and clean up the configuration.
# name: docker-tests-marklogic_python
df422b6 to
dba9788
Compare
rjrudin
approved these changes
Jul 11, 2025
Contributor
rjrudin
left a comment
There was a problem hiding this comment.
Looks good, just a couple renaming things and then merge away.
dba9788 to
0d9c324
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements utilities for encoding and decoding vectors to/from base64 strings, mirroring MarkLogic's
vec:base64-encodeandvec:base64-decodefunctions.80% Copilot generated. I just had to fix the tests that send requests to MarkLogic.