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

Query optimization #333

Open
Tracked by #339
tomwhite opened this issue Dec 12, 2023 · 3 comments
Open
Tracked by #339

Query optimization #333

tomwhite opened this issue Dec 12, 2023 · 3 comments
Labels

Comments

@tomwhite
Copy link
Member

There are a couple of possibilities for doing query optimization that have come up recently.

Dask-expr will support arrays soon (dask/dask-expr#446). It would be interesting to see if the expression system can be used in Cubed, and if there are any changes we'd need to contribute back.

egglog "is a Python package that provides bindings to the Rust library egglog, allowing you to use e-graphs in Python for optimization". Interestingly, it has a prototype of the Array API, which might make it a good candidate for providing query optimization for Cubed. This tutorial has an example of using the Array API implementation to optimize a scikit-learn function. (@saulshanabrook told us about egglog at yesterday's Pangeo Distributed Computing Working Group.)

@tomwhite tomwhite added help wanted Extra attention is needed array api optimization labels Dec 12, 2023
@dcherian
Copy link

Ah wish I could've made the discussion. egglog looks cool!

@saulshanabrook
Copy link

saulshanabrook commented Dec 17, 2023

I would be happy to do another call to get into more specifics of trying to implement the types of rewrites cubed needs with egglog. I did something similar a few weeks ago around the PyTensor project, using a concrete example to drive some exploration of how it could be implemented: https://egglog-python.readthedocs.io/latest/explanation/2023_11_17_pytensor.html

EDIT: Both the python bindings and the upstream rust library are in active development, so it's definitely useful to see if anything can be improved to support this kind of use case.

@tomwhite
Copy link
Member Author

@saulshanabrook that would be awesome - thanks for the offer!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants