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

visualizer in google colab #255

Open
erick-xanadu opened this issue Jan 30, 2025 · 3 comments
Open

visualizer in google colab #255

erick-xanadu opened this issue Jan 30, 2025 · 3 comments

Comments

@erick-xanadu
Copy link

Hello, I am having some issues trying egglog in google's colab.

egraph.saturate()
[/usr/local/lib/python3.11/dist-packages/egglog/visualizer_widget.py](https://localhost:8080/#) in VisualizerWidget()
     21     _esm = CURRENT_DIR / "visualizer.js"
     22     _css = CURRENT_DIR / "visualizer.css"
---> 23     egraphs = traitlets.List[str]().tag(sync=True)
     24 
     25     def display_or_open(self) -> None:

TypeError: type 'List' is not subscriptable
  foo = e.extract(bar)
  print(foo)
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/google/colab/_variable_inspector.py", line 27, in run
RuntimeError: egglog::egraph::EGraph is unsendable, but is being dropped on another thread
@orenht
Copy link

orenht commented Jan 30, 2025

Although not a direct solution, but I think the PR I just opened yesterday would prevent this problem :)
#254

@erick-xanadu
Copy link
Author

Thank you @orenht ! I had not seen it :)

@saulshanabrook
Copy link
Member

You can also do egraph.run(run().saturate()) (i believe) which will be more efficient if you don't want the visualization.

however whatever this bug is should be fixed too, not sure why traitlets is having that issue in collab. maybe some version incompatibility?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants