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

Questions about new jQuery plugin architecture #2821

Closed
ceevee830 opened this issue Oct 23, 2019 · 4 comments
Closed

Questions about new jQuery plugin architecture #2821

ceevee830 opened this issue Oct 23, 2019 · 4 comments

Comments

@ceevee830
Copy link

So I'm working on getting our business data from the back-end into the UI using the new jQuery support.

  1. The back-end to my plugin was modeled after the GRAPHs plugin whereby it delivers business data via protobuf format. return (str(gpu_summary), 'text/x-protobuf') # pbtxt
    But the example index.js here accepts json-formatted payload. Question: How can I update my index.js to parse incoming data as protobuf?

  2. Also, do you have a design document or something that describes how export async function render() is called in the index.js?

Thanks,
-Chris

@rmothukuru
Copy link

This issue doesn't seemed to be related to Tensorboard. If so, please raise the issue in the respective Repository of Github.

If you feel this issue is related to Tensorboard, Please provide details about what platform you are using (operating system, architecture). Also include your TensorFlow version.

Make sure you also include the exact command if possible to produce the output included in your test case. If you are unclear what to include see the issue template displayed in the Github new issue template.

We ask for this in the issue submission template, because it is really difficult to help without that information. Thanks!

@psybuzz
Copy link
Contributor

psybuzz commented Oct 24, 2019

Thanks for the question! I'm not familiar with "new jQuery support", but the rest of the question is TB related.

The Graph dashboard has its own frontend logic to parse protobuf txt from the backend. parser.ts will fetch a response and call res.arrayBuffer() and transform it into a usable form via parsePbtxtFile, instead of res.json(). If you wish to roll your own solution, this implementation could be a reference.

There are also 3rd party protobuf libraries to investigate, which might also address your needs, e.g.
https://github.com/protobufjs/protobuf.js

Although the plugin example repo shows how to define it, I can look into making the documentation better. Right now, TensorBoard simply imports the plugin's entry point as a module and calls render().

Sidenote: if you have more ideas, questions, feedback on how the dynamic plugin authoring experience could be better, please add comments to #2357 !

@rmothukuru
Copy link

@ceevee830,
Can you please let us know if @psybuzz's comment has clarified your query, so that we can work towards Closure of this issue. Thanks!

@ceevee830
Copy link
Author

Thanks, Team. I am able to read the back-end payload in JSON format.

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

No branches or pull requests

3 participants