Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Round trip Layout to_spec and from_spec #486

Closed
ahuang11 opened this issue Sep 8, 2023 · 1 comment · Fixed by #495
Closed

Round trip Layout to_spec and from_spec #486

ahuang11 opened this issue Sep 8, 2023 · 1 comment · Fixed by #495
Milestone

Comments

@ahuang11
Copy link
Contributor

ahuang11 commented Sep 8, 2023

{'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'
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant