Skip to content
This repository has been archived by the owner on Nov 29, 2019. It is now read-only.

Multi-level dynamic parameters? #42

Open
yerfdogyrag opened this issue Feb 27, 2018 · 6 comments
Open

Multi-level dynamic parameters? #42

yerfdogyrag opened this issue Feb 27, 2018 · 6 comments

Comments

@yerfdogyrag
Copy link

I was trying to do this with DynamicMap, but kept getting errors when I tried instantiating a DynamicMap inside a DynamicMap callback. I have some data that looks (roughly) like:

{ project1: { step1: [1,2,3], step2: [10,11,12]},
  project2: {step2: [15,16,17], step3: [20,21,22]} }

Basically, the first pull-down should have Select between project1 and project2. If I select project1, then my step pull-down should be step1, step2. If I select project2, the step pull-down should be step2, step3.

Will parambokeh do this? I'm also not quite sure how to fit this into holoviews.

Thanks!

@yerfdogyrag
Copy link
Author

Hmm... I just looked through enough other issues and it sounds like there's no way to do this right now.

@philippjfr
Copy link
Member

Correct currently not possible but parambokeh should absolutely be able to handle this kind of scenario eventually. We'll probably revisit this after holoviews 1.10 is released.

@jbednar
Copy link
Member

jbednar commented Feb 27, 2018

Note that hierarchical object parameter setting works in paramnb already, if paramnb will meet your needs for now; it's just a limitation of parambokeh that we desperately need to address soon. Unfortunately for you :-), we found a workaround when we needed this capability last month, which was to show the parameters for all of the possible sub-objects in a separate area off to the right from the top-level selection. But that's an obviously bad long-term solution, and only works for a single hierarchical level with a small number of possibilities, which is what we were doing, and is really not tenable in the long term.

@yerfdogyrag
Copy link
Author

Ya, I really can't pre-populate this. The first level selector allows me to do a query against a database which reduces my count down to ~60k or so. Without that, I have to do 1M which is a little much.

Do you have any suggestions how this can be done at all under the holoviews/bokeh/bokeh server umbrella? A hierarchical DynamicMap would also work for me, but I'm not sure if it's "easy" to make that work or not.

Thanks!

@philippjfr
Copy link
Member

I spent an hour yesterday prototyping an idea I had which allows attaching arbitrary widgets to a plot and syncing them bidirectionally without the use of parambokeh. This is where we want to take the internal HoloViews widget system eventually:

widget_streams

The implementation is very hacky (you can see it here: https://anaconda.org/philippjfr/widget_streams/notebook), but this should eventually allow independently updating widgets, so you don't necessarily need hierarchical nesting as @jbednar describes. Hierarchical nesting is a good approach in some cases but if you just want to update the selection for one widget depending on another it seems overly complex.

@yerfdogyrag
Copy link
Author

Cool - thanks! I gave it a try and hit an error. Is that a newer version of bokeh? I'm running 0.12.14 release right now and I'm getting:

AttributeError: 'BokehRenderer' object has no attribute 'components'

during render_widgets - let me know if you want a full traceback. Also let me know if you're just proof-of-concepting and having a user in the middle is mucking things up ;-).

@yerfdogyrag yerfdogyrag reopened this Feb 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants