IO optimization for loading dataset - #73
Conversation
gordonmurray
left a comment
There was a problem hiding this comment.
Thanks for the performance work. The synchronous FastAPI handlers and combined metadata request are a good fit for this application, and the existing matrix checks are useful.
I’m requesting a few changes before merge:
-
Add coverage for the new
GET /datasets/{dataset_name}/metadataresponse when the Arrow schema has metadata, including non-ASCII and non-UTF-8 byte values. The endpoint currently returnsschema.metadatadirectly, while the existing API contract is JSON; this should be deliberately serialized and tested rather than relying on FastAPI’s encoder. -
Add/adjust the behavioral specification in
docs/spec.mdfor the new endpoint and the metadata-loading behavior. The frontend now depends on/metadatainstead of the separate schema/columns requests. -
Add the required
CHANGELOG.mdentry under[Unreleased], referencing the relevant issue (or open/link an issue for this optimization if one does not exist). -
Please run the full workspace matrix after the final changes, since this alters all dataset handlers and introduces a new endpoint used by the frontend.
Once those are addressed, I expect this to be a good candidate to merge.
Thanks for the detailed feedback! I should address them all :-) |
|
The spec request in my review was my mistake. Please remove Please ignore the same request in #71 and #72. The rest of the PR is good. The metadata serialization is correct, and the test for non-ASCII keys and non-UTF-8 bytes covers the case I asked about. It also corrects I ran the full version matrix against your branch. All 33 tests pass on the seven lancedb versions, 0.3.1 to 0.33.0. When you remove the spec file, I will merge this. |
The file is not part of this repo. Asking for it was a maintainer error.
# Conflicts: # CHANGELOG.md
|
I pushed two commits to your branch, to save you a round trip. The first commit removes Nothing else changed. I ran the full version matrix on the merged result. All 33 tests pass on the seven lancedb versions, 0.3.1 to 0.33.0. I did not force push, so your local branch will fast-forward. You do not need to do anything. |
gordonmurray
left a comment
There was a problem hiding this comment.
All four points from my earlier review are addressed.
The metadata serialization is correct, and the tests cover non-ASCII and non-UTF-8 schema metadata. The changelog entry cites #75.
I ran the full version matrix on the merged branch. All 33 tests pass on the seven lancedb versions, 0.3.1 to 0.33.0. CI is green.
Thanks for the work on this.
This PR optimizes lance dataset loading, mainly a few changes
asyncto sync, because the lance dataset API we use is sync alreadyFollowup items
AI usage disclaimer:
GPT-5.5 helped me make the code change, I deployed my own fork to k8s and verified it worked