-
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
Graph info panel is broken #3557
Comments
I think I understand the issue better now, @bmd3k. When we are iterating and flattening HTML, we put the document in place of the link elements: https://github.com/tensorflow/tensorboard/blob/master/tensorboard/java/org/tensorflow/tensorboard/vulcanize/Vulcanize.java#L324 This results in a document like:
Of course, I tried to see if we can not replace with the tensorboard/tensorboard/java/org/tensorflow/tensorboard/vulcanize/Vulcanize.java Lines 308 to 309 in e6c4355
Ideas that I have right now is a post-process step on the resulting document to remove all the intermediate documents before writing it out since we cannot pass our own traverser onto the printer (https://github.com/jhy/jsoup/blob/89580cc3d25d0d89ac1f46b349e5cd315883dc79/src/main/java/org/jsoup/nodes/Node.java#L606) |
The issue is better described in tensorflow#3557. Please refer to it. Our HTML module traversal relies on the `document` so we cannot create the document without nested document in one go. Instead, we do a post processing of the document to prune away all the `document` so the default jsoup's printer can print them without awkward `<#root>` elements. index.html size difference: ``` 555323 before 554749 after ```
The issue is better described in #3557. Please refer to it. Our HTML module traversal relies on the document so we cannot create the document without nested document in one go. Instead, we do a post processing of the document to prune away all the document so the default jsoup's printer can print them without awkward <#root> elements.
The issue is better described in tensorflow#3557. Please refer to it. Our HTML module traversal relies on the document so we cannot create the document without nested document in one go. Instead, we do a post processing of the document to prune away all the document so the default jsoup's printer can print them without awkward <#root> elements.
The issue is better described in #3557. Please refer to it. Our HTML module traversal relies on the document so we cannot create the document without nested document in one go. Instead, we do a post processing of the document to prune away all the document so the default jsoup's printer can print them without awkward <#root> elements.
… link importing (#3723) * Motivation for features / changes * Roll forward #3582 with change, in order to fix #3557. * The solution is primarily due to @stephanwlee. When such midway imports are found, a `RuntimeException` is thrown with an error message describing the cause and the offending element.
Symptom: after the #3476 refactor, the graph info panel is broken.
Cause:
After the change, the iron-list dom-module is missing from the document. When inspecting the elements more carefully, it appears like following:
As you can notice, the DOM is quite broken. There are multiple closing tags from tf-graph-debugger-data-card are missing.
Upon more careful debugging, I have found out that the Vulcanization is actually responsible for such structure.
For instance,
<p>foo</p>
gets compiled into<p>foo
. Similarly,When debugged further, I found that there are some heuristic on HTML5Printer of jsoup that we use which omits closing tag of certain tags when they are the last one in current level https://github.com/bazelbuild/rules_closure/blob/d1c0bb4862882e0444ee478aa2091d41a4df084e/java/org/jsoup/nodes/Html5Printer.java#L209-L214.
I think the intention was good but if you parse then print below code using jsoup, you get quite wrong code.
There are three ways to move forward:
cc @bmd3k
The text was updated successfully, but these errors were encountered: