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

Turning on Dask-Expr #28

Merged
merged 4 commits into from
Mar 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
415 changes: 415 additions & 0 deletions perf_tests/compute_air.py-2024-03-03T07:42:36+05:30.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
415 changes: 415 additions & 0 deletions perf_tests/compute_air.py-2024-03-03T07:50:18+05:30.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
415 changes: 415 additions & 0 deletions perf_tests/groupby_air.py-2024-03-03T07:43:22+05:30.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
415 changes: 415 additions & 0 deletions perf_tests/groupby_air.py-2024-03-03T07:50:06+05:30.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
415 changes: 415 additions & 0 deletions perf_tests/groupby_air_full.py-2024-03-03T07:44:17+05:30.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
415 changes: 415 additions & 0 deletions perf_tests/groupby_air_full.py-2024-03-03T07:49:53+05:30.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
415 changes: 415 additions & 0 deletions perf_tests/sanity.py-2024-03-03T07:45:47+05:30.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
415 changes: 415 additions & 0 deletions perf_tests/sanity.py-2024-03-03T07:49:44+05:30.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 7 additions & 3 deletions qarray/df.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import itertools
import typing as t

import dask
import dask.dataframe as dd
import numpy as np
import pandas as pd
Expand All @@ -12,6 +13,12 @@
Block = t.Dict[str, slice]
Chunks = t.Dict[str, int]

# Turn on Dask-Expr
dask.config.set({'dataframe.query-planning-warning': False})
dask.config.set({"dataframe.query-planning": True})
# Turn on Copy-On-Write (needs Pandas 2.0).
pd.options.mode.copy_on_write = True


# Borrowed from Xarray
def _get_chunk_slicer(dim: t.Hashable, chunk_index: t.Mapping,
Expand Down Expand Up @@ -123,6 +130,3 @@ def f(b: Block) -> pd.DataFrame:
divisions=divisions,
token=token,
)

# TODO(alxmrs): Try dask expressions dataframe:
# https://github.com/dask-contrib/dask-expr