You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following @philippjfr's comment in #766 (comment), we have identified the need to provide an API to access watchers.
More precisely, it seems like we do not have an API to access watchers on an instance, which are currently available through the private attribute _param_watchers:
start []
start cm []
end cm [Watcher(inst=P(name='P00005', x=3), cls=<class '__main__.P'>, fn=<function _m_caller.<locals>.caller at 0x118fa5c10>, mode='args', onlychanged=True, parameter_names=('x',), what='value', queued=False, precedence=-1)]
end []
Do you have any opinion on this @philippjfr ? It seems it's unfortunate that .param.watchers is already used, as it seems more like an internal API made public.
Following @philippjfr's comment in #766 (comment), we have identified the need to provide an API to access watchers.
More precisely, it seems like we do not have an API to access watchers on an instance, which are currently available through the private attribute
_param_watchers
:There is a sort of public API to access the watchers set on class Parameters:
There is the public
.param.watchers
that under the hood returns the watchers queue defined on_parameters_state
, that holds transient data:Output:
Among those
_param_watchers
is likely the one the most required by users. It's accessed in Panel and Lumen, I've found one other usage on Github https://github.com/grepler/sqlmodel-panel-poc/blob/bf8b3ab1b3e31476f6fcbb451a7dc78fb555d29d/helpers.py#L215.The text was updated successfully, but these errors were encountered: