-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
Test with the latest version of dask #1499
Conversation
Failing test(s) looks like an ordering issue: import dask.dataframe as dd
import holoviews as hv
import pandas as pd
import hvplot.dask
class S: ...
self = S()
self.df = pd.DataFrame([[1, 2], [3, 4], [5, 6]], columns=['x', 'y'])
self.df = dd.from_pandas(self.df, npartitions=2)
kind = 'scatter'
element = hv.Scatter
plot = self.df.hvplot(x='index', y='y', by='x', kind=kind)
obj = hv.NdOverlay(
{
1: element(self.df[self.df.x == 1], 'index', 'y'),
3: element(self.df[self.df.x == 3], 'index', 'y'),
5: element(self.df[self.df.x == 5], 'index', 'y'),
},
'x',
) |
Changing Line 2077 in 9700bec
|
I think something changed in HoloViews. This script runs fine with from packaging.version import Version
import dask
if Version(dask.__version__).release < (2025, 1, 0):
# Important that this is done before before other imports
dask.config.set({"dataframe.query-planning": False})
import pandas as pd
import dask.dataframe as dd
import holoviews as hv
hv.extension('bokeh')
df = pd.DataFrame([[1, 2], [3, 4], [5, 6]], columns=['x', 'y'])
ddf = dd.from_pandas(df, npartitions=2)
print(ddf.compute())
expected_ddf = hv.NdOverlay(
{
1: hv.Scatter(ddf[ddf.x == 1], 'index', 'y'),
3: hv.Scatter(ddf[ddf.x == 3], 'index', 'y'),
5: hv.Scatter(ddf[ddf.x == 5], 'index', 'y'),
},
'x',
)
actual_ddf = hv.Dataset(ddf, ['x', 'index'], ['y']).to(hv.Scatter, ['index'], ['y'], ['x']).overlay(sort=False)
print(f'{expected_ddf=}')
print(f'{expected_ddf.keys()=}')
print(f'{actual_ddf=}')
print(f'{actual_ddf.keys()=}')
from holoviews.element.comparison import Comparison
Comparison().compare_ndoverlays(expected_ddf, actual_ddf) |
A better comparison would be with query-planning enabled. Otherwise, the difference could be from the different dask implementations. |
What changed between the different dask dataframe implementations is the output of |
No description provided.