Migrate the tf_graph_loader component to use webfiles.
Change: 155334410
This commit is contained in:
parent
60adca7bce
commit
f7935b8f8e
@ -334,6 +334,7 @@ filegroup(
|
|||||||
"//tensorflow/tensorboard/components/tf_globals:all_files",
|
"//tensorflow/tensorboard/components/tf_globals:all_files",
|
||||||
"//tensorflow/tensorboard/components/tf_globals_d3v4:all_files",
|
"//tensorflow/tensorboard/components/tf_globals_d3v4:all_files",
|
||||||
"//tensorflow/tensorboard/components/tf_graph_common:all_files",
|
"//tensorflow/tensorboard/components/tf_graph_common:all_files",
|
||||||
|
"//tensorflow/tensorboard/components/tf_graph_loader:all_files",
|
||||||
"//tensorflow/tensorboard/components/tf_histogram_dashboard:all_files",
|
"//tensorflow/tensorboard/components/tf_histogram_dashboard:all_files",
|
||||||
"//tensorflow/tensorboard/components/tf_histogram_dashboard/demo:all_files",
|
"//tensorflow/tensorboard/components/tf_histogram_dashboard/demo:all_files",
|
||||||
"//tensorflow/tensorboard/components/tf_image_dashboard:all_files",
|
"//tensorflow/tensorboard/components/tf_image_dashboard:all_files",
|
||||||
|
46
tensorflow/tensorboard/components/tf_graph_loader/BUILD
Normal file
46
tensorflow/tensorboard/components/tf_graph_loader/BUILD
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
package(default_visibility = ["//tensorflow:internal"])
|
||||||
|
|
||||||
|
load("@io_bazel_rules_closure//closure:defs.bzl", "webfiles")
|
||||||
|
load("//tensorflow/tensorboard:defs.bzl", "tensorboard_ts_library")
|
||||||
|
load("//tensorflow/tensorboard:defs.bzl", "tensorboard_webcomponent_library")
|
||||||
|
|
||||||
|
licenses(["notice"]) # Apache 2.0
|
||||||
|
|
||||||
|
webfiles(
|
||||||
|
name = "tf_graph_loader",
|
||||||
|
srcs = [
|
||||||
|
"tf-graph-loader.html",
|
||||||
|
],
|
||||||
|
path = "/tf-graph-loader",
|
||||||
|
deps = [
|
||||||
|
"//tensorflow/tensorboard/components/tf_graph_common",
|
||||||
|
"@org_polymer",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "all_files",
|
||||||
|
srcs = glob(["**"]),
|
||||||
|
tags = ["notsan"],
|
||||||
|
)
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# MARKED FOR DELETION
|
||||||
|
|
||||||
|
tensorboard_webcomponent_library(
|
||||||
|
name = "legacy",
|
||||||
|
srcs = [
|
||||||
|
"tf-graph-loader.html",
|
||||||
|
],
|
||||||
|
destdir = "tf-graph-loader",
|
||||||
|
deps = [
|
||||||
|
"//tensorflow/tensorboard/components/tf_graph_common:legacy",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
# This is needed despite how this component lacks TypeScript files because
|
||||||
|
# components/BUILD seeks a legacy_ts rule in this package.
|
||||||
|
tensorboard_ts_library(
|
||||||
|
name = "legacy_ts",
|
||||||
|
srcs = [],
|
||||||
|
)
|
24
tensorflow/tensorboard/components/tf_graph_loader/demo/BUILD
Normal file
24
tensorflow/tensorboard/components/tf_graph_loader/demo/BUILD
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
package(default_visibility = ["//tensorflow:internal"])
|
||||||
|
|
||||||
|
load("@io_bazel_rules_closure//closure:defs.bzl", "webfiles")
|
||||||
|
|
||||||
|
licenses(["notice"]) # Apache 2.0
|
||||||
|
|
||||||
|
# bazel run //third_party/tensorflow/tensorboard/components/tf_graph_loader/demo
|
||||||
|
webfiles(
|
||||||
|
name = "demo",
|
||||||
|
srcs = ["index.html"] + glob(["data/**"]),
|
||||||
|
path = "/tf-graph-loader/demo",
|
||||||
|
deps = [
|
||||||
|
"//tensorflow/tensorboard/components/tf_graph_loader",
|
||||||
|
"@org_polymer_iron_demo_helpers",
|
||||||
|
"@org_polymer_paper_styles",
|
||||||
|
"@org_polymer_webcomponentsjs",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "all_files",
|
||||||
|
srcs = glob(["**"]),
|
||||||
|
tags = ["notsan"],
|
||||||
|
)
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,78 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<!--
|
||||||
|
@license
|
||||||
|
Copyright 2016 The TensorFlow Authors. All Rights Reserved.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<script src="../../webcomponentsjs/webcomponents-lite.min.js"></script>
|
||||||
|
<link rel="import" href="../tf-graph-loader.html">
|
||||||
|
<link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
|
||||||
|
<title>TF Graph Loader Demo</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<demo-snippet>
|
||||||
|
<template>
|
||||||
|
<dom-module id="tf-graph-loader-demo">
|
||||||
|
<template>
|
||||||
|
<tf-graph-loader id="loader"
|
||||||
|
datasets="[[_datasets]]"
|
||||||
|
selected-dataset="[[_selectedDataset]]"
|
||||||
|
progress="{{_progress}}"></tf-graph-loader>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
Polymer({
|
||||||
|
is: "tf-graph-loader-demo",
|
||||||
|
properties: {
|
||||||
|
// We tell the graph loader to load a specific pbtxt file.
|
||||||
|
_datasets: {
|
||||||
|
type: Array,
|
||||||
|
value: [{
|
||||||
|
"name": "Graph with XLA Clusters Specified",
|
||||||
|
"path": "data/graph.pbtxt"
|
||||||
|
}],
|
||||||
|
},
|
||||||
|
_selectedDataset: {
|
||||||
|
type: Number,
|
||||||
|
value: 0,
|
||||||
|
},
|
||||||
|
|
||||||
|
// This property will be updated by the graph loader.
|
||||||
|
_progress: {
|
||||||
|
type: Object,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
observers: [
|
||||||
|
'_progressUpdated(_progress)',
|
||||||
|
],
|
||||||
|
_progressUpdated(progress) {
|
||||||
|
// console.log the progress.
|
||||||
|
console.log('Progress updated.', progress);
|
||||||
|
|
||||||
|
// The graph has loaded. console.log it.
|
||||||
|
if (progress.value == 100) {
|
||||||
|
console.log('graph', this.$.loader.outGraph);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</dom-module>
|
||||||
|
<!-- The graph loader lacks visual elements. -->
|
||||||
|
<tf-graph-loader-demo></tf-graph-loader-demo>
|
||||||
|
</template>
|
||||||
|
</demo-snippet>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -16,6 +16,7 @@ limitations under the License.
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<link rel="import" href="../polymer/polymer.html">
|
<link rel="import" href="../polymer/polymer.html">
|
||||||
|
<link rel="import" href="../tf-graph-common/tf-graph-common.html">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
An element which provides a filter parsing for pbtxt to graph output.
|
An element which provides a filter parsing for pbtxt to graph output.
|
||||||
|
Loading…
Reference in New Issue
Block a user