-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add colab implementation of WitWidget #1745
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
Conversation
|
@tolga-b Please take a look, thanks! |
|
Thanks James, it looks great. You may want to add a direct link to colab in the readme as we discussed: https://colab.sandbox.google.com/github/jameswex/tensorboard/blob/colab/tensorboard/plugins/interactive_inference/WIT_in_colab.ipynb. Format is github/[repo-link]/blob/[branch-name]/[path-within-repo-to-file]. |
| def infer_examples(): | ||
| WitWidget.widget.infer() | ||
| output.register_callback('notebook.InferExamples', infer_examples) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think its suggested to have two spaces between module functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
thanks tolga, added that direct link in the spot at the bottom and also another spot near the top of the readme where i mention colab. also updated widget to be able to handle multiple witwidgets in a single colab and tested it with two witwidgets. |
stephanwlee
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything else look good
|
|
||
|
|
||
| # HTML/javascript for the WIT frontend. | ||
| WIT_HTML = """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be wonderful if this is created/went through compilation/Vulcanization and read as a string. Would it be possible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it might be possible. I have a what-if tool tutorial I'm giving at a conference later this month and was hoping to have this mode up and running for it, and our team is just starting a two-week sprint on other ideas so I don't have much time to investigate right now.
Is it possible to commit this with the code in-line and create an issue to track moving it to a string read from a compiled html/js file in the future?
tolga-b
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks James, everything looks good to me.
Adds colab implementation of WitWidget to enable use of What-If Tool directly in colab notebooks. This implementation differs by necessity from the Jupyter notebook widget.
Added Colab implemenation of WitWidget, which uses the colab-recommended way of passing information from python to JS and passing information from JS to python.
Added example colab notebook showing its use.
Run the colab notebook that is part of the PR and verify all What-If Tool features work correctly.
N/A