I am building a dashboard using panel and trying to figure out how to have a change of a control ("threshold" in the below class) fire a process that updates an attribute of the class before any other functions are called that will use that attribute. Basically, a change in the threshold widget should change an attribute self.table and then more than 1 functions will reference it to create tables and plots for the dashboard. How to make this happen? This is the start of the class where the widgets are declared and the class initialized....
class BinaryPerformDashComponents(param.Parameterized):
bins = param.ObjectSelector(default=10, objects=[], label='Number of Bins')
threshold = param.Number(default=0.5, step=0.01, bounds=(0, 1), allow_None=False)
def __init__(self, actual, pred, df, *args, **kwargs):
super(type(self), self).__init__(*args, **kwargs)
self.param.bins.objects =[5,10,20,50,100] # set the list of objects to select from in the widget
self.df = self.create_df(actual,pred,df)
question from:
https://stackoverflow.com/questions/65644242/panel-in-python-how-to-set-the-order-that-events-are-called 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…