-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor benchmark and dataset generation #205
Merged
Merged
Conversation
This file contains 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
changhiskhan
force-pushed
the
changhiskhan/benchmark-fixes
branch
2 times, most recently
from
September 27, 2022 21:18
a1548ea
to
cb054c8
Compare
changhiskhan
commented
Sep 27, 2022
Comment on lines
+76
to
91
# TODO restore after projection bug | ||
index_scanner = lance.dataset(uri) | ||
# index_scanner = index_scanner.scanner(columns=["image_id", "annotations.name"]) | ||
query = ( | ||
f"SELECT distinct image_id FROM (" | ||
f" SELECT image_id, UNNEST(annotations) as ann FROM index_scanner" | ||
f") WHERE ann.name == '{klass}'" | ||
f" SELECT image_id, UNNEST(annotations.name) as name FROM index_scanner" | ||
f") WHERE name = '{klass}'" | ||
) | ||
filtered_ids = duckdb.query(query).arrow().column("image_id").combine_chunks() | ||
scanner = lance.scanner( | ||
uri, | ||
["image_id", "image", "annotations.name"], | ||
# filter=pc.field("image_id").isin(filtered_ids), | ||
scanner = lance.dataset(uri).scanner( | ||
# TODO restore after projection bug | ||
# columns=["image_id", "image", "annotations.name"], | ||
columns=["image_id", "image", "annotations"], | ||
filter=pc.field("image_id").isin(filtered_ids), | ||
limit=50, | ||
offset=20, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eddyxu this is the workaround the projection issue ^
changhiskhan
force-pushed
the
changhiskhan/benchmark-fixes
branch
from
September 29, 2022 17:09
cb054c8
to
694e3b6
Compare
changhiskhan
changed the title
fix up benchmark and datagen code
Refactor benchmark and dataset generation
Sep 29, 2022
eddyxu
approved these changes
Sep 29, 2022
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.
suite.py
andconverter.py
. And move download_uris into lance.io