hvplot icon indicating copy to clipboard operation
hvplot copied to clipboard

Optimize handling of wide datasets

Open maximlt opened this issue 1 year ago • 6 comments

By avoiding calling redim on each element of an NdOverlay which meant that every element had its own copy of the data.

maximlt avatar Jun 04 '24 15:06 maximlt

Codecov Report

Attention: Patch coverage is 96.40288% with 5 lines in your changes missing coverage. Please review.

Project coverage is 88.87%. Comparing base (6c96c7e) to head (7df0911). Report is 10 commits behind head on main.

Files Patch % Lines
hvplot/converter.py 91.83% 4 Missing :warning:
hvplot/util.py 94.11% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1350      +/-   ##
==========================================
+ Coverage   87.39%   88.87%   +1.47%     
==========================================
  Files          50       51       +1     
  Lines        7490     7479      -11     
==========================================
+ Hits         6546     6647     +101     
+ Misses        944      832     -112     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jun 04 '24 15:06 codecov[bot]

Relevant to many things, but especially https://github.com/holoviz/hvplot/issues/1160

droumis avatar Jun 05 '24 07:06 droumis

issue noted in meeting: "When printing the ndoverlay, the vdim is not a value label.. it's the label of the last element in the ndoverlay"

droumis avatar Jun 05 '24 07:06 droumis

With https://github.com/holoviz/holoviews/pull/6262 this should now behave well.

philippjfr avatar Jun 09 '24 08:06 philippjfr

When printing the ndoverlay, the vdim is not a value label.. it's the label of the last element in the ndoverlay

I confirm this is fixed, i.e. printing out from the code below:

import numpy as np
import pandas as pd
import holoviews as hv
hv.extension('bokeh')

df = pd.DataFrame(np.random.random((5, 4)), columns=list('ABCD'))

value_label = 'value'
group_label = 'Variable'

charts = []
for column in df.columns:
    kdims = ['index']
    vdims = hv.Dimension(column, label=value_label)
    chart = hv.Curve(df, kdims, vdims)
    charts.append((column, chart))

out = hv.NdOverlay(charts, group_label, sort=False)
out

now displays:

:NdOverlay   [Variable]
   :Curve   [index]   (value)

maximlt avatar Jun 10 '24 12:06 maximlt

The test suite ran fine (https://github.com/holoviz/hvplot/actions/runs/9448341262) with the latest dev version of HoloViews that includes https://github.com/holoviz/holoviews/pull/6262.

maximlt avatar Jun 10 '24 15:06 maximlt

ready to merge?

droumis avatar Jul 09 '24 14:07 droumis

OP updated with a description of the changes made https://github.com/holoviz/hvplot/pull/1350#issue-2333794995. This is ready for review.

maximlt avatar Jul 22 '24 06:07 maximlt

Great work, all looked good to me and thanks for the new tests! Let's test this as much as possible, would love to see a new alpha release for that purpose.

philippjfr avatar Jul 23 '24 10:07 philippjfr