-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[Dynamic plugin] tracking bug #2357
Comments
I'm eagerly awaiting the completion of the dynamic plugin system. @stephanwlee and @wchargin it looks like you guys have been focused elsewhere recently. Is there a timeline on when the last two items here will be wrapped up? |
What is the status of
from https://github.com/tensorflow/tensorboard/blob/javascript/ADDING_A_PLUGIN.md |
@jeremysalwen, sorry for a late reply. It was lost in my sea of emails. I would say it has not progressed much due to lack of requests (this issue is the one you should post to for such requests). Now, I will say share that we now have possibilities to provide the run selector, but (1) it will pollute your JS context with global Polymer symbol (you can not use Polymer in your plugin if this happens) (2) it relies on an experimental API which we are not sure whether we should commit to, and (3) it may not get all the Angular+Redux based features that we are currently making. What kind of library support would you need? |
I was just curious about the option. Based on what you said I would probably be better off implementing a custom version. |
I am currently writing a plugin and the most important interface, I would like to have, is the opportunity to retrieve the reload triggers from the main frontend. Is there any chance to get these? |
I have written a plugin, and I also would very much like to get the reload triggers from the main frontend. I also am interested in getting the selection state that is saved between tabs. I am implementing my own UI widgets as suggested, but I need a way to fetch that data from tensorboard in order to implement it properly. |
I've found a little workaround. It seems that one can access the surrounding of the iframe by js:
To track the updates I use: setInterval(() => {
const reload_button = window.parent.document.getElementsByClassName('reload-button')[0] as HTMLButtonElement;
if (this._last_reload !== reload_button.title) {
this._last_reload = reload_button.title;
this.reload();
}
}, 1000); or by using the store: document.getElementsByClassName('reload-button')[0].__ngContext__.find(val => !!val && !!val.isReloading$).isReloading$.subscribe(isLoading => {
if (isLoading) {
// do update
}
}) |
Though clever, it is quite unfortunate to have to resort to the workaround mentioned. TensorBoard's element positions, classnames, visibility, property names, etc are all non-public interfaces that are not guaranteed to be stable. Plugins that rely on these for any duration may break. We have heard feedback from internal teams as well, who might also benefit from a "reload trigger" in a dynamic plugin. Would some API method signature like the following suit your use case? async function setOnReloadFired(callback: () => any) ? |
This would be completely sufficient! If there is such a way implemented, would be so kind and document how to use this lib? |
We are building the dynamic loadable plugin system as per described in tensorflow/community#90. This is a task tracking bug for those who are interested in following the status.
plugin_metadata
#2304, infra: use base.setAttribute instead .href #2334, Set base URI for plugin iframe #2329, core: move ES module path intoFrontendMetadata
#2317, frontend: reinstate registration for conditional plugins #2340,The text was updated successfully, but these errors were encountered: