Hello,
im trying to build a data pipeline with .interactive and a function as a pipeline start as described in Interactive — hvPlot 0.8.0 documentation
I was assuming that an interactive pipeline is only run once at the end and that it updates only
at the steps where the parameters are changing.
But apparently it runs the pipeline for each added step multiple times?
Can anyone explain my the following output of the code?
import panel as pn
import pandas as pd
import hvplot
dataconfig = pn.widgets.Select(options=["Conf1", "Conf2"])
def load_data(dataconfig):
print("Load Data")
return pd.DataFrame([{"config": dataconfig}])
def transform_data(df, transform):
print(f"Transforming {transform}")
return df
print("-------------")
bound_loader = hvplot.bind(load_data, dataconfig)
print("-------------")
interactive_loader = bound_loader.interactive()
print("-------------")
transformed_loader = interactive_loader.pipe(transform_data, transform="Step 1")
print("-------------")
transformed_loader = transformed_loader.pipe(transform_data, transform="Step 2")
print("-------------")
transformed_loader = transformed_loader.pipe(transform_data, transform="Step 3")
The output of this is
-------------
-------------
Load Data
Load Data
-------------
Transforming Step 1
-------------
Transforming Step 1
Transforming Step 1
Transforming Step 1
Transforming Step 2
-------------
Transforming Step 1
Transforming Step 2
Transforming Step 1
Transforming Step 2
Transforming Step 1
Transforming Step 2
Transforming Step 3
And i dont unterstand why the functions get called so many times?