TensorBoard: Migrate vz_{sorting,line_chart} to webfiles
Change: 146535501
This commit is contained in:
parent
d08b6eb365
commit
02f276c631
WORKSPACE
tensorflow
BUILD
tensorboard
workspace.bzl
16
WORKSPACE
16
WORKSPACE
@ -1,5 +1,19 @@
|
||||
workspace(name = "org_tensorflow")
|
||||
|
||||
http_archive(
|
||||
name = "io_bazel_rules_closure",
|
||||
sha256 = "60fc6977908f999b23ca65698c2bb70213403824a84f7904310b6000d78be9ce",
|
||||
strip_prefix = "rules_closure-5ca1dab6df9ad02050f7ba4e816407f88690cf7d",
|
||||
urls = [
|
||||
"http://bazel-mirror.storage.googleapis.com/github.com/bazelbuild/rules_closure/archive/5ca1dab6df9ad02050f7ba4e816407f88690cf7d.tar.gz", # 2017-02-03
|
||||
"https://github.com/bazelbuild/rules_closure/archive/5ca1dab6df9ad02050f7ba4e816407f88690cf7d.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_repositories")
|
||||
|
||||
closure_repositories()
|
||||
|
||||
load("//tensorflow:workspace.bzl", "check_version", "tf_workspace")
|
||||
|
||||
# We must check the bazel version before trying to parse any other BUILD files,
|
||||
@ -466,7 +480,7 @@ new_http_archive(
|
||||
)
|
||||
|
||||
new_http_archive(
|
||||
name = "polymer",
|
||||
name = "polymer_archive",
|
||||
build_file = "bower.BUILD",
|
||||
url = "https://github.com/polymer/polymer/archive/v1.7.0.tar.gz",
|
||||
strip_prefix = "polymer-1.7.0",
|
||||
|
@ -218,7 +218,11 @@ filegroup(
|
||||
"//tensorflow/tensorboard/backend:all_files",
|
||||
"//tensorflow/tensorboard/components:all_files",
|
||||
"//tensorflow/tensorboard/components/vz_data_summary:all_files",
|
||||
"//tensorflow/tensorboard/components/vz_line_chart:all_files",
|
||||
"//tensorflow/tensorboard/components/vz_line_chart/demo:all_files",
|
||||
"//tensorflow/tensorboard/components/vz_projector:all_files",
|
||||
"//tensorflow/tensorboard/components/vz_sorting:all_files",
|
||||
"//tensorflow/tensorboard/components/vz_sorting/test:all_files",
|
||||
"//tensorflow/tensorboard/lib:all_files",
|
||||
"//tensorflow/tensorboard/lib/python:all_files",
|
||||
"//tensorflow/tensorboard/scripts:all_files",
|
||||
|
@ -65,7 +65,7 @@ filegroup(
|
||||
"@paper_toolbar//:paper_toolbar",
|
||||
"@paper_tooltip//:paper_tooltip",
|
||||
"@plottable//:plottable",
|
||||
"@polymer//:polymer",
|
||||
"@polymer_archive//:polymer",
|
||||
"@promise_polyfill//:promise_polyfill",
|
||||
"@three_js_orbitcontrols_js//file",
|
||||
"@three_js_three_min_js//file",
|
||||
|
57
tensorflow/tensorboard/components/tf_imports/BUILD
Normal file
57
tensorflow/tensorboard/components/tf_imports/BUILD
Normal file
@ -0,0 +1,57 @@
|
||||
package(default_visibility = ["//tensorflow:internal"])
|
||||
|
||||
load("@io_bazel_rules_closure//closure:defs.bzl", "webfiles")
|
||||
|
||||
licenses(["notice"]) # Apache 2.0
|
||||
|
||||
webfiles(
|
||||
name = "d3",
|
||||
srcs = [
|
||||
"d3.html",
|
||||
"@org_d3js",
|
||||
],
|
||||
path = "/tf-imports",
|
||||
)
|
||||
|
||||
webfiles(
|
||||
name = "lodash",
|
||||
srcs = [
|
||||
"lodash.html",
|
||||
"@com_lodash",
|
||||
],
|
||||
path = "/tf-imports",
|
||||
)
|
||||
|
||||
webfiles(
|
||||
name = "graphlib",
|
||||
srcs = [
|
||||
"graphlib.html",
|
||||
"@io_github_cpettitt_graphlib",
|
||||
],
|
||||
path = "/tf-imports",
|
||||
deps = [":lodash"],
|
||||
)
|
||||
|
||||
webfiles(
|
||||
name = "dagre",
|
||||
srcs = [
|
||||
"dagre.html",
|
||||
"@io_github_cpettitt_dagre",
|
||||
],
|
||||
path = "/tf-imports",
|
||||
deps = [
|
||||
":graphlib",
|
||||
":lodash",
|
||||
],
|
||||
)
|
||||
|
||||
webfiles(
|
||||
name = "plottable",
|
||||
srcs = [
|
||||
"plottable.html",
|
||||
"@com_palantir_plottable//:plottable.css",
|
||||
"@com_palantir_plottable//:plottable.js",
|
||||
],
|
||||
path = "/tf-imports",
|
||||
deps = [":d3"],
|
||||
)
|
@ -15,4 +15,4 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<script src="../d3/d3.js"></script>
|
||||
<script src="d3.js"></script>
|
||||
|
@ -19,6 +19,6 @@ limitations under the License.
|
||||
HTML imports are non-blocking thus getting the dependency 'graphlib'
|
||||
and 'lodash' via script imports instead.
|
||||
-->
|
||||
<script src="../lodash/lodash.min.js"></script>
|
||||
<script src="../graphlib/dist/graphlib.core.js"></script>
|
||||
<script src="../dagre/dist/dagre.core.js"></script>
|
||||
<script src="lodash.js"></script>
|
||||
<script src="graphlib.core.js"></script>
|
||||
<script src="dagre.core.js"></script>
|
||||
|
@ -15,5 +15,5 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<script src="../lodash/lodash.min.js"></script>
|
||||
<script src="../graphlib/dist/graphlib.core.js"></script>
|
||||
<script src="lodash.js"></script>
|
||||
<script src="graphlib.core.js"></script>
|
||||
|
@ -15,4 +15,4 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<script src="../lodash/lodash.min.js"></script>
|
||||
<script src="lodash.js"></script>
|
||||
|
@ -16,5 +16,5 @@ limitations under the License.
|
||||
-->
|
||||
|
||||
<link rel="import" href="d3.html">
|
||||
<script src="../plottable/plottable.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="../plottable/plottable.css">
|
||||
<script src="plottable.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="plottable.css">
|
||||
|
@ -0,0 +1,3 @@
|
||||
This file acts as import routers for third party javascript libraries,
|
||||
e.g. Plottable and D3 from `g3/third_party`; it exists to facilitate development
|
||||
inside google.
|
18
tensorflow/tensorboard/components/tf_imports_google/d3.html
Normal file
18
tensorflow/tensorboard/components/tf_imports_google/d3.html
Normal file
@ -0,0 +1,18 @@
|
||||
<!--
|
||||
@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.
|
||||
-->
|
||||
|
||||
<script src="../d3-library/d3.js"></script>
|
@ -0,0 +1,18 @@
|
||||
<!--
|
||||
@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.
|
||||
-->
|
||||
|
||||
<link rel="import" href="../dagre-library/dagre.html">
|
@ -0,0 +1,18 @@
|
||||
<!--
|
||||
@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.
|
||||
-->
|
||||
|
||||
<link rel="import" href="../graphlib-library/graphlib.html">
|
@ -0,0 +1,18 @@
|
||||
<!--
|
||||
@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.
|
||||
-->
|
||||
|
||||
<link rel="import" href="../lodash-library/lodash-library.html">
|
@ -0,0 +1,19 @@
|
||||
<!--
|
||||
@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.
|
||||
-->
|
||||
|
||||
<link rel="import" href="d3.html">
|
||||
<link rel="import" href="../plottable-library/plottable.html">
|
71
tensorflow/tensorboard/components/vz_line_chart/BUILD
Normal file
71
tensorflow/tensorboard/components/vz_line_chart/BUILD
Normal file
@ -0,0 +1,71 @@
|
||||
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_typescript_genrule")
|
||||
load("//tensorflow/tensorboard:defs.bzl", "tensorboard_webcomponent_library")
|
||||
|
||||
licenses(["notice"]) # Apache 2.0
|
||||
|
||||
webfiles(
|
||||
name = "vz_line_chart",
|
||||
srcs = [
|
||||
"vz-line-chart.html",
|
||||
":ts",
|
||||
],
|
||||
path = "/vz-line-chart",
|
||||
deps = [
|
||||
"//tensorflow/tensorboard/components/tf_imports:lodash",
|
||||
"//tensorflow/tensorboard/components/tf_imports:plottable",
|
||||
"@org_polymer",
|
||||
],
|
||||
)
|
||||
|
||||
tensorboard_typescript_genrule(
|
||||
name = "ts",
|
||||
srcs = [
|
||||
"dragZoomInteraction.ts",
|
||||
"vz-chart-helpers.ts",
|
||||
"vz-line-chart.ts",
|
||||
],
|
||||
typings = [
|
||||
"@org_definitelytyped//:d3.d.ts",
|
||||
"@com_palantir_plottable//:plottable.d.ts",
|
||||
"@org_definitelytyped//:lodash.d.ts",
|
||||
],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "all_files",
|
||||
srcs = glob(["**"]),
|
||||
tags = ["notsan"],
|
||||
)
|
||||
|
||||
################################################################################
|
||||
# MARKED FOR DELETION
|
||||
|
||||
tensorboard_webcomponent_library(
|
||||
name = "legacy",
|
||||
srcs = [
|
||||
"index.html",
|
||||
"vz-line-chart.html",
|
||||
":legacy_ts",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
destdir = "vz-line-chart",
|
||||
deps = [
|
||||
"//tensorflow/tensorboard/components:tf_imports",
|
||||
"//tensorflow/tensorboard/components/vz_sorting:legacy",
|
||||
"//third_party/javascript/polymer/v1/polymer:lib",
|
||||
],
|
||||
)
|
||||
|
||||
tensorboard_ts_library(
|
||||
name = "legacy_ts",
|
||||
srcs = [
|
||||
"dragZoomInteraction.ts",
|
||||
"vz-chart-helpers.ts",
|
||||
"vz-line-chart.ts",
|
||||
],
|
||||
deps = ["//tensorflow/tensorboard/components:common_deps"],
|
||||
)
|
24
tensorflow/tensorboard/components/vz_line_chart/demo/BUILD
Normal file
24
tensorflow/tensorboard/components/vz_line_chart/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/vz_line_chart/demo
|
||||
webfiles(
|
||||
name = "demo",
|
||||
srcs = ["index.html"],
|
||||
path = "/vz-line-chart/demo",
|
||||
deps = [
|
||||
"//tensorflow/tensorboard/components/vz_line_chart",
|
||||
"@org_polymer_iron_demo_helpers",
|
||||
"@org_polymer_paper_styles",
|
||||
"@org_polymer_webcomponentsjs",
|
||||
],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "all_files",
|
||||
srcs = glob(["**"]),
|
||||
tags = ["notsan"],
|
||||
)
|
48
tensorflow/tensorboard/components/vz_sorting/BUILD
Normal file
48
tensorflow/tensorboard/components/vz_sorting/BUILD
Normal file
@ -0,0 +1,48 @@
|
||||
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_typescript_genrule")
|
||||
load("//tensorflow/tensorboard:defs.bzl", "tensorboard_webcomponent_library")
|
||||
|
||||
licenses(["notice"]) # Apache 2.0
|
||||
|
||||
webfiles(
|
||||
name = "vz_sorting",
|
||||
srcs = [
|
||||
"vz-sorting.html",
|
||||
":ts",
|
||||
],
|
||||
path = "/vz-sorting",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
tensorboard_typescript_genrule(
|
||||
name = "ts",
|
||||
srcs = ["sorting.ts"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "all_files",
|
||||
srcs = glob(["**"]),
|
||||
tags = ["notsan"],
|
||||
)
|
||||
|
||||
################################################################################
|
||||
# MARKED FOR DELETION
|
||||
|
||||
tensorboard_webcomponent_library(
|
||||
name = "legacy",
|
||||
srcs = [
|
||||
"vz-sorting.html",
|
||||
":legacy_ts",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
destdir = "vz-sorting",
|
||||
)
|
||||
|
||||
tensorboard_ts_library(
|
||||
name = "legacy_ts",
|
||||
srcs = ["sorting.ts"],
|
||||
deps = ["//tensorflow/tensorboard/components:common_deps"],
|
||||
)
|
35
tensorflow/tensorboard/components/vz_sorting/test/BUILD
Normal file
35
tensorflow/tensorboard/components/vz_sorting/test/BUILD
Normal file
@ -0,0 +1,35 @@
|
||||
package(default_visibility = ["//tensorflow:internal"])
|
||||
|
||||
load("//tensorflow/tensorboard:defs.bzl", "tensorboard_ts_library")
|
||||
load("//tensorflow/tensorboard:defs.bzl", "tensorboard_wct_test_suite")
|
||||
|
||||
licenses(["notice"]) # Apache 2.0
|
||||
|
||||
filegroup(
|
||||
name = "all_files",
|
||||
srcs = glob(["**"]),
|
||||
tags = ["notsan"],
|
||||
)
|
||||
|
||||
################################################################################
|
||||
# MARKED FOR DELETION
|
||||
|
||||
tensorboard_wct_test_suite(
|
||||
name = "legacy_test",
|
||||
size = "medium",
|
||||
srcs = ["index.html"],
|
||||
deps = [
|
||||
"//tensorflow/tensorboard/components/vz_sorting:legacy",
|
||||
"//third_party/javascript/polymer/v1/webcomponentsjs:lib",
|
||||
],
|
||||
)
|
||||
|
||||
tensorboard_ts_library(
|
||||
name = "legacy_ts",
|
||||
testonly = 1,
|
||||
srcs = ["sortingTests.ts"],
|
||||
deps = [
|
||||
"//tensorflow/tensorboard/components:common_deps",
|
||||
"//tensorflow/tensorboard/components/vz_sorting:legacy_ts",
|
||||
],
|
||||
)
|
55
tensorflow/tensorboard/defs.bzl
Normal file
55
tensorflow/tensorboard/defs.bzl
Normal file
@ -0,0 +1,55 @@
|
||||
# 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.
|
||||
|
||||
_DEFAULT_TYPINGS = [
|
||||
"@com_microsoft_typescript//:lib.es6.d.ts",
|
||||
]
|
||||
|
||||
def tensorboard_typescript_genrule(name, srcs, typings=[], **kwargs):
|
||||
"""Filegroup of compiled TypeScript sources.
|
||||
|
||||
This is a very unsophisticated TypeScript rule where the user is responsible
|
||||
for passing all typings and sources via srcs. It's meant as a stopgap because
|
||||
TypeScript rules currently don't exist for Bazel. The definition of this rule
|
||||
will need to evolve as more ts_library rules are migrated.
|
||||
"""
|
||||
for src in srcs:
|
||||
if (src.startswith("/") or
|
||||
src.endswith(".d.ts") or
|
||||
not src.endswith(".ts")):
|
||||
fail("srcs must be typescript sources in same package")
|
||||
native.genrule(
|
||||
name = name,
|
||||
srcs = _DEFAULT_TYPINGS + typings + srcs,
|
||||
outs = [src[:-3] + ".js" for src in srcs],
|
||||
cmd = "$(location @com_microsoft_typescript//:tsc)" +
|
||||
" --inlineSourceMap" +
|
||||
" --inlineSources" +
|
||||
" --outDir $(@D)" +
|
||||
" $(SRCS)",
|
||||
tools = ["@com_microsoft_typescript//:tsc"],
|
||||
**kwargs
|
||||
)
|
||||
|
||||
def tensorboard_ts_library(**kwargs):
|
||||
"""Rules referencing this will be deleted from the codebase soon."""
|
||||
pass
|
||||
|
||||
def tensorboard_webcomponent_library(**kwargs):
|
||||
"""Rules referencing this will be deleted from the codebase soon."""
|
||||
pass
|
||||
|
||||
def tensorboard_wct_test_suite(**kwargs):
|
||||
"""Rules referencing this will be deleted from the codebase soon."""
|
||||
pass
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user