holoviz/lumen

Round trip Layout to_spec and from_spec

Closed this issue · 1 comments

{'title': 'Layout01715',
 'views': [{'by': ['species'],
   'download': {'color': '#fff',
    'filename': 'scatter_plot_penguins.csv',
    'format': 'csv',
    'index': False,
    'size': 0,
    'type': 'default'},
   'field': '',
   'groupby': [],
   'kind': 'scatter',
   'limit': 100,
   'loading_indicator': False,
   'pipeline': {'filters': [{'field': 'island',
      'table': 'penguins',
      'type': 'widget'}],
    'source': {'cache_dir': '',
     'cache_per_query': False,
     'cache_with_dask': False,
     'shared': True,
     'tables': ['penguins.csv'],
     'use_dask': False,
     'type': 'file'},
    'table': 'penguins'},
   'selection_expr': {},
   'selection_group': '',
   'title': 'Body Mass vs Flipper Length Scatter Plot',
   'x': 'body_mass_g',
   'y': 'flipper_length_mm',
   'type': 'hvplot'}]}

Layout.from_spec(yaml.load(yaml.dump(layout.to_spec()), Loader=yaml.FullLoader))

Results in:

File [~/repos/lumen/lumen/layout.py:895](https://file+.vscode-resource.vscode-cdn.net/Users/ahuang/repos/lumen-llm/~/repos/lumen/lumen/layout.py:895), in Layout.from_spec(cls, spec, **kwargs)
    893 if 'pipeline' in view_spec:
    894     pname = view_spec['pipeline']
--> 895     pipelines[pname] = Pipeline.from_spec(pname)
    896     continue
    897 elif 'pipeline' in spec:

TypeError: unhashable type: 'dict'

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.