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

Basic Support for Grouping/Aggregation #135

Open
bsowell opened this issue Oct 31, 2023 · 2 comments
Open

Basic Support for Grouping/Aggregation #135

bsowell opened this issue Oct 31, 2023 · 2 comments

Comments

@bsowell
Copy link
Contributor

bsowell commented Oct 31, 2023

We need some basic support for grouping/aggregation. One use case that has come up recently: It is sometimes easier to process documents by page. For example, you might want to to split the document by page and convert each page to an image for use with an image model. In Sycamore you might accomplish this by partitioning by page and then running explode. After processing each page, you might want to "regroup" the results by original document. You may want to be able to combine the text/binary representation of the documents, the elements, and/or the properties.

@mashah
Copy link
Contributor

mashah commented Nov 6, 2023

This sound more like map-reduce rather than group-by-agg. The regrouping is really a mapping, and the reduce may something as simple as adding to a set.

Other uses of this is for clustering, where similar documents are clustered to then pass to AI for some amount of generation work.

@bsowell
Copy link
Contributor Author

bsowell commented Nov 6, 2023

That's fair. I'm not sure that Ray exposes a public reduce function, so it was easier to wrap their group-by aggregate, but once I finish a POC I'll take a step back and see if there is a way to generalize. Internally I believe Ray has effectively implemented MapReduce, but I just need to understand what abstractions we can use and what we want to expose.

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

No branches or pull requests

2 participants