Repository navigation
v0.7.0: DataFusion 55, and gradients in SQL
xarray-sql 0.7.0 moves to DataFusion 55. It adds gradients in SQL with the new ml extra, and prepared queries that are planned once and run many times. xarray-sql, ddxdb (ddx's Python package) and einfold can now be installed together, on one version of DataFusion.
New
- Gradients in SQL:
pip install "xarray-sql[ml]". It installs ddx, which differentiates SQL, so a query can callgrad(),vjp()andjvp()over xarray Datasets and any DataFusion table. Two demos inbenchmarks/mltrain models this way and check their results against JAX: attention, and a nanoGPT training step (#269). Context.prepare(sql)plans a query once, and then runs it many times on new data withprepared(name=dataset). It covers queries that take gradients too, and it reuses their plans between calls (#287, #301).Context(threads=n)sets how many threads DataFusion uses. It overrides the setting on a copy of the config you pass in, and leaves your config unchanged (#301).
Faster
- Small in-memory Datasets are registered as DataFusion's native in-memory tables (#275), and registration takes less work: counting chunks for a Dataset with one-cell chunks went from 31.4 ms to 0.4 ms (#301).
- A query is split across partitions only where enough rows reach it (#289).
Changes in behavior
- DataFusion 55 is required (#274). If you pin
datafusion, move to 55.0.0. - Preparing a query that takes a gradient now runs it once, to find the tables it reads. Writing new data to a table the query doesn't read raises an error, as it already did for queries without gradients (#301).
Fixes
- Dates on a
noleapcalendar keep their calendar date in SQL (#309). - The browser demo no longer crashes on iPhone and iPad, and the docs pages' embedded demo and explainer match the site's theme.
Docs
- Learn xarray-sql in 15 minutes, with xarray operations side by side with their SQL (#277).
What's Changed
- Upgrade to DataFusion 55 by @alxmrs in #274
- Docs: Learn xarray-sql in 15 minutes by @alxmrs in #277
- Register small in-memory Datasets as native in-memory tables by @alxmrs in #275
- Split a query across partitions only where enough rows reach it by @alxmrs in #289
- Plan a query once and run it many times: Context.prepare by @alxmrs in #287
- Add an ml extra for gradients in SQL, and two ML demos by @alxmrs in #269
- Adding HN badge by @murtazayusuf in #313
- Reuse gradient plans and reduce Dataset registration overhead by @cromwellian in #301
- fix: keep noleap dates on their calendar date in SQL by @ghostiee-11 in #309
- Release 0.7.0 by @alxmrs in #315
New Contributors
- @murtazayusuf made their first contribution in #313
- @cromwellian made their first contribution in #301
Full Changelog: v0.6.0...v0.7.0