Skip to content
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 2 commits into from
Sep 29, 2022

Conversation

changhiskhan
Copy link
Contributor

@changhiskhan changhiskhan commented Sep 27, 2022

  1. split bench_utils up into suite.py and converter.py. And move download_uris into lance.io
  2. Add GH action to automatically run data generation (for 20 rows) and analytics (just for lance)
  3. Convert nested labels from dictionary -> string (duckdb#4812)

@changhiskhan changhiskhan requested a review from eddyxu September 27, 2022 16:38
@changhiskhan changhiskhan force-pushed the changhiskhan/benchmark-fixes branch 2 times, most recently from a1548ea to cb054c8 Compare September 27, 2022 21:18
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,
Copy link
Contributor Author

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 changhiskhan force-pushed the changhiskhan/benchmark-fixes branch from cb054c8 to 694e3b6 Compare September 29, 2022 17:09
@changhiskhan changhiskhan marked this pull request as ready for review September 29, 2022 19:47
@changhiskhan changhiskhan changed the title fix up benchmark and datagen code Refactor benchmark and dataset generation Sep 29, 2022
@changhiskhan changhiskhan merged commit 2505efa into main Sep 29, 2022
@changhiskhan changhiskhan deleted the changhiskhan/benchmark-fixes branch September 29, 2022 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants