Skip to content

Commit

Permalink
add rule to build colab version and fix proto
Browse files Browse the repository at this point in the history
  • Loading branch information
jameswex committed Aug 7, 2020
1 parent 71e4888 commit 0cdc8f9
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
28 changes: 28 additions & 0 deletions facets/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,31 @@ genrule(
outs = ["facets-jupyter.html"],
cmd = "sed 's|<!doctype html>|<!doctype html><script>define=undefined</script>|' $(location :facets) > $@",
)

tf_web_library(
name = "colab",
srcs = [
"colab.html",
],
path = "/facets",
deps = [
"//facets_dive/components/facets_dive",
"//facets_overview/components/facets_overview",
"@org_tensorflow_tensorboard//tensorboard/components/tf_imports:polymer",
],
)

# Compiles standalone HTML for Facets in colab.
#
# NOTE: This runs TensorBoard Vulcanize.java to inline HTML imports and
# runs the Closure Compiler on the JavaScript outputted by the
# TypeScript Compiler, in order to remove ES6 imports, which don't
# work in web browsers. Otherwise we'd `bazel run` tf_web_library.
tensorboard_html_binary(
name = "facets_colab",
compile = True,
input_path = "/facets/colab.html",
output_path = "/all/colab.html",
deps = [":colab"],
)

13 changes: 13 additions & 0 deletions facets/colab.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<link rel="import" href="../facets-dive/components/facets-dive/facets-dive.html">
<link rel="import" href="../facets-overview/components/facets-overview/facets-overview.html">
<style>
facets-dive {
border: 1px solid #cccccc;
box-sizing: border-box;
height: 100%;
min-width: 800px;
min-height: 640px;
position: relative;
width: 100%;
}
</style>
2 changes: 1 addition & 1 deletion facets_overview/proto/feature_statistics.proto
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ message CustomStatistic {
string str = 3;
Histogram histogram = 4;
RankHistogram rank_histogram = 5;
reserved 6;
}
reserved 6;
}

// Statistics for a numeric feature in a dataset.
Expand Down

0 comments on commit 0cdc8f9

Please sign in to comment.