Skip to content
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

Sync polymer2 to current master #2287

Merged
merged 97 commits into from
Jun 27, 2019
Merged

Commits on May 15, 2019

  1. graph: Fix JSE when switching node selection (tensorflow#2232)

    Repro steps:
    1. Select a run that has more than one tags
    2. Select a tag with RunMetadata
    3. Select a node
    4. Select the default tag
    5. Click nodes around and see JSEs
    
    We have nested dom-ifs to prevent `getTotalMicros` from being called.
    However, this is only effective when the DOM is not mounted but this
    assumption does not hold after first render (if=true).
    
    JSE = JavaScript Exception
    stephanwlee authored May 15, 2019
    Configuration menu
    Copy the full SHA
    38749e7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cb4b1ba View commit details
    Browse the repository at this point in the history
  3. hparams: account for proto nondeterminism in tests (tensorflow#2235)

    Summary:
    This test seems to be fine in open-source land, but failed 18/32 times
    within Google, because the wire format order for maps is undefined:
    <https://developers.google.com/protocol-buffers/docs/proto3#maps>
    
    Test Plan:
    Within google3, cherry-pick this patch onto <http://cl/247655537>, then
    run `:summary_v2_notf_test` with `--runs_per_test=128` to check for
    flakiness.
    
    wchargin-branch: hparams-test-deflake
    wchargin authored May 15, 2019
    Configuration menu
    Copy the full SHA
    97d048a View commit details
    Browse the repository at this point in the history
  4. pip: fix smoke test double-TensorBoard dependency (tensorflow#2211)

    Summary:
    The smoke test doesn’t actually catch those things that it’s supposed to
    catch, because it installs `tf-nightly` (or `tf-nightly-2.0-preview`),
    which in turn installs `tb-nightly`. We then install the just-built
    version of `tensorboard`, so the resulting virtualenv has both
    `tensorboard` and `tb-nightly`: tensorflow#1907 strikes again.
    
    When `--tf-version ""` is passed, this is not an issue, but some smoke
    checks only run when that is not passed.
    
    It just so happens that this is currently benign: each of the direct
    dependencies of `:build_pip_package` either has no smoke test, contains
    an `__init__.py` file that is required to overwrite the Bazel-generated
    empty one, because the smoke test references symbols directly in that
    file, or is not yet in `tb-nightly`. But (a) starting with tomorrow’s
    nightly, the mesh smoke test will meet none of those conditions, so its
    smoke test will cease to be effective, and (b) I’d like to add an
    hparams smoke test, which already falls into the same boat.
    
    Test Plan:
    Add an hparams smoke test, but remove the actual hparams dep:
    
    ```diff
    diff --git a/tensorboard/pip_package/BUILD b/tensorboard/pip_package/BUILD
    index c11e22e2..e63b790a 100644
    --- a/tensorboard/pip_package/BUILD
    +++ b/tensorboard/pip_package/BUILD
    @@ -21,7 +21,6 @@ sh_binary(
             "//tensorboard:lib",  # User-facing overall TensorBoard API
             "//tensorboard:version",  # Version module (read by setup.py)
             "//tensorboard/plugins/beholder",  # User-facing beholder API
    -        "//tensorboard/plugins/hparams",  # User-facing hparams API
             "//tensorboard/plugins/mesh:summary",  #  User-facing mesh summary API
             "//tensorboard/plugins/projector",  # User-facing projector API
             "//tensorboard/summary:tf_summary",  #  tf.summary API for TF 2.0
    diff --git a/tensorboard/pip_package/build_pip_package.sh b/tensorboard/pip_package/build_pip_package.sh
    index de778196..113724ef 100755
    --- a/tensorboard/pip_package/build_pip_package.sh
    +++ b/tensorboard/pip_package/build_pip_package.sh
    @@ -172,6 +172,7 @@ import tensorboard as tb
     tb.summary.scalar_pb('test', 42)
     from tensorboard.plugins.beholder import Beholder, BeholderHook
     from tensorboard.plugins.mesh import summary
    +from tensorboard.plugins.hparams.api import hparams_pb, KerasCallback
     "
       fi
    
    ```
    
    Then run
    
        bazel run //tensorboard/pip_package:build_pip_package
    
    and note that the smoke test passes (incorrectly) before this commit and
    fails (correctly) after it.
    
    Note also that the `pip freeze` output from the smoke test includes both
    `tb-nightly` and `tensorboard` before this change (e.g., on recent
    Travis logs), but only `tensorboard` after it.
    
    wchargin-branch: pip-smoke-2dep
    wchargin authored May 15, 2019
    Configuration menu
    Copy the full SHA
    2f1abca View commit details
    Browse the repository at this point in the history

Commits on May 16, 2019

  1. tools: create diagnose_tensorboard (tensorflow#2237)

    Summary:
    Users often report problems that depend on environment-specific
    configuration. Rather than asking them to find all this information and
    enter it into an issue template manually, we can ask them to run a
    script and paste its output verbatim into the issue. Furthermore, we can
    detect and suggest fixes to common problems, such as tensorflow#1907 and tensorflow#2010.
    The script can grow as we see fit to add new diagnoses and suggestions.
    
    Test Plan:
    The script is designed to be robust to errors in each individual
    diagnosis: in the worst case, it prints a stack trace and continues to
    the next one. I’ve manually tested that the main framework works in
    Python 2 and 3 on Linux and in Python 3 on Windows.
    
    Automated testing of this script is possible, but would take a fair
    number of CPU cycles to run tests (setting up virtualenvs and Conda,
    installing and importing TensorFlow many times). Given that this script
    is never a production dependency and is explicitly designed to be run in
    a discussion context, light testing seems reasonable.
    
    To simulate a bad hostname, add
    
    ```python
    socket.getfqdn = lambda: b"\xc9".decode("utf-8")
    ```
    
    to the top of the script.
    
    To simulate a bad `.tensorboard-info` directory and test the quoting
    behavior, run
    
    ```shell
    export TMPDIR="$(mktemp -d)/uh oh/" &&
    mkdir -p "${TMPDIR}/.tensorboard-info" &&
    chmod 000 "${TMPDIR}/.tensorboard-info" &&
    python ./tensorboard/tools/diagnose_tensorboard.py
    ```
    
    To cross-check the autoidentification logic:
    
    ```
    $ python tensorboard/tools/diagnose_tensorboard.py |
    > awk '/version / { print $NF }'
    e093841ffaea564cb2410e0b430bd0c552ada208
    $ git hash-object tensorboard/tools/diagnose_tensorboard.py
    e093841ffaea564cb2410e0b430bd0c552ada208
    $ git rev-parse HEAD:tensorboard/tools/diagnose_tensorboard.py
    e093841ffaea564cb2410e0b430bd0c552ada208
    $ git cat-file blob e093841ffaea564cb2410e0b430bd0c552ada208 |
    > diff -u tensorboard/tools/diagnose_tensorboard.py - | wc -l
    0
    ```
    
    wchargin-branch: diagnose-me
    wchargin authored May 16, 2019
    Configuration menu
    Copy the full SHA
    a1bbb2a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4b47649 View commit details
    Browse the repository at this point in the history

Commits on May 17, 2019

  1. Use six.add_metaclass for Python 3 compatibility (tensorflow#2242)

    Summary:
    Fixes tensorflow#2121.
    
    Test Plan:
    
        $ git grep '__metaclass__' | wc -l
        0
    
    wchargin-branch: six-add-metaclass
    wchargin authored May 17, 2019
    Configuration menu
    Copy the full SHA
    b17cef4 View commit details
    Browse the repository at this point in the history

Commits on May 18, 2019

  1. Fix build for Bazel 0.25 (tensorflow#2243)

    Summary:
    Fixes tensorflow#2181. Thankfully, the `rules_webtesting` scene has gotten a bit
    saner, requiring fewer explicitly defined transitive dependencies,
    though it looks like the ones that we do have need to be manually kept
    in sync (e.g., `bazel_skylib`).
    
    Test Plan:
    Running `bazel build //...` and `bazel test //...` works in Bazel 0.25.2
    in both Python 2 and Python 3.
    
    wchargin-branch: bazel-0.25
    wchargin authored May 18, 2019
    Configuration menu
    Copy the full SHA
    52a9d40 View commit details
    Browse the repository at this point in the history

Commits on May 20, 2019

  1. build: use mirror.tensorflow.org, now populated (tensorflow#2245)

    Summary:
    It’s easier for TensorBoard team members to upload files to the
    TensorFlow.org mirror than the Bazel mirror. Many of our files were not
    mirrored, and fetches from GitHub can be noticeably slow. (For instance,
    the Bazel 0.22.0 binary is 1.8–2.0 seconds from the TF mirror and 8.5–12
    seconds from GitHub.) As of this commit, all `mirror.bazel.build` URLs
    are replaced with `mirror.tensorflow.org` URLs, and all such URLs
    contain valid content.
    
    Along the way, I swapped out the defunct numericjs source to a host that
    actually still resolves.
    
    On Travis, getting Bazel and running `bazel fetch //tensorboard/...`
    typically takes about 44 seconds. Let’s see if this speeds that up.
    
    Test Plan:
    Check that Bazel URLs resolve:
    
    ```
    $ git grep -Pho '(?<=")https?://mirror\.tensorflow\.org/[^"]*' |
    > grep -vF '${BAZEL}' | sort | uniq |
    > xargs -n 1 -P 32 -- \
    > sh -c 'curl -sfL "$1" >/dev/null && echo OK || echo FAIL' unused |
    > sort | uniq -c
        231 OK
    ```
    
    Check that the Travis URL resolves:
    
    ```
    $ BAZEL=0.22.0
    $ curl -sfL "http://mirror.tensorflow.org/github.com/bazelbuild/bazel/releases/download/${BAZEL}/bazel-${BAZEL}-linux-x86_64" |
    > shasum -a 256
    8474ed28ed4998e2f5671ddf3a9a80ae9e484a5de3b8b70c8b654c017c65d363
    ```
    
    Check that we caught ’em all:
    
    ```
    $ git grep mirror.bazel | wc -l
    0
    ```
    
    wchargin-branch: mirror-tensorflow-org
    wchargin authored May 20, 2019
    Configuration menu
    Copy the full SHA
    6bc1ff2 View commit details
    Browse the repository at this point in the history

Commits on May 21, 2019

  1. github: update issue templates (tensorflow#2178)

    Summary:
    This commit adds issue templates for bug reports, feature requests, and
    installation problems, with specific instructions for each.
    
    This also resolves the nag from GitHub to move to the new issue template
    workflow.
    
    I created these by following the “issue template wizard” described here:
    <https://help.github.com/en/articles/creating-issue-templates-for-your-repository>
    
    Test Plan:
    I’ve committed this to the default branch of my fork. Try drafting an
    issue there: <https://github.com/wchargin/tensorboard/issues/>.
    
    wchargin-branch: github-issue-templates
    wchargin authored May 21, 2019
    1 Configuration menu
    Copy the full SHA
    14f38dc View commit details
    Browse the repository at this point in the history
  2. Move content from mesh_visualizer to mesh (tensorflow#2199)

    At PR tensorflow#2168, it was recommended to call mesh_visualizer plugin a mesh
    plugin. As a result, the Python code lives in tensorboard/plugins/mesh
    while the frontend lives in tensorboard/plugins/mesh_visualizer. This
    change moves frontend code into t/p/mesh.
    stephanwlee authored May 21, 2019
    Configuration menu
    Copy the full SHA
    daba329 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    998b1b2 View commit details
    Browse the repository at this point in the history

Commits on May 22, 2019

  1. Configuration menu
    Copy the full SHA
    00495e1 View commit details
    Browse the repository at this point in the history
  2. Fix issue where we werent initializing knn properly (tensorflow#2200)

    While debugging the standalone projector app, we discovered a bug caused
    by the divergence between the umap-js and the `umap.d.ts` typings that
    we maintain in this repo. This bug caused an error when initializing
    very small datasets. This PR fixes the incorrect usage of
    `umap.initializeFit` and updates the types to match the library.
    cannoneyed authored and wchargin committed May 22, 2019
    Configuration menu
    Copy the full SHA
    4de3936 View commit details
    Browse the repository at this point in the history
  3. hparams: fix demo (remove group_name argument) (tensorflow#2258)

    Summary:
    In tensorflow#2188, I removed the `group_name` parameter from the Keras callback,
    but forgot to remove it from the call site in the demo code.
    
    Test Plan:
    Running `bazel run //tensorboard/plugins/hparams:hparams_demo` now
    works. Previously, it failed with the error, “unexpected keyword
    argument 'group_name'”.
    
    wchargin-branch: hparams-demo-no-group-name
    wchargin authored May 22, 2019
    Configuration menu
    Copy the full SHA
    158e3c1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f170b86 View commit details
    Browse the repository at this point in the history
  5. build: fix forward to Bazel 0.26 (tensorflow#2267)

    Summary:
    A bunch of changes here required due to `--incompatible_depset_union`
    and consequent transitive upgrades.
    
    The new depset union makes inefficient use more apparent. I opted to
    change our own uses as locally and minimally as possible rather than
    fixing them to be more efficient, for the sake of keeping things simple.
    (Or, rather, I first tried to do things the efficient way by
    accumulating lists of transitive depsets, but due to lack of types the
    refactoring was too hard to keep track of to be worth it. The simple
    option just requires application of one of two Vim macros at each call
    site, with just a bit of thought to guess which one is right.)
    
    The change to `Vulcanize.java` was already present within google3.
    
    Test Plan:
    Both `bazel build //tensorboard` and `bazel test //...` work with Bazel
    version 0.26.0rc12.
    
    wchargin-branch: bazel-0.26.0rc12
    wchargin authored May 22, 2019
    Configuration menu
    Copy the full SHA
    5409739 View commit details
    Browse the repository at this point in the history

Commits on May 23, 2019

  1. Add ability to customize examples for custom AI platform models (tens…

    …orflow#2268)
    
    Cloud AI Platform models can have custom prediction code that takes in examples in any format the modeler wants. But WIT requires examples as lists, dicts, or example protos by design. So add the ability to transform examples to the custom format for cloud users that need this capability.
    jameswex authored May 23, 2019
    Configuration menu
    Copy the full SHA
    cc8e59f View commit details
    Browse the repository at this point in the history
  2. vz-example-viewer: fix int feature list type (tensorflow#2266)

    Summary:
    Caught during a Clutz upgrade. From context, it looks like `ints` should
    be an `Int64List`, as is already the case in `parseFeature` below.
    
    Test Plan:
    This preserves existing behavior. To exercise the codepath, run
    
    ```
    bazel run //tensorboard/plugins/interactive_inference/tf_interactive_inference_dashboard/demo:agedemoserver
    ```
    
    then navigate to `/tf-interactive-inference-dashboard/age_demo.html` in
    a browser. Select a data point in the plot. In the list of features for
    that data point (on the left side of the screen), click the “+” button
    immediately below the bottom feature. Add an `Int` feature, and set its
    value to some number. Select a different data point, then select the
    first data point again, and observe that the new feature and value are
    still present.
    
    wchargin-branch: vzev-ints-list-type
    wchargin authored May 23, 2019
    Configuration menu
    Copy the full SHA
    555236a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b3546cc View commit details
    Browse the repository at this point in the history
  4. Add PR curves and F1 score to WIT (tensorflow#2264)

    Per user requests, adding PR curves and F1 score to performance tab of WIT for binary classification models.
    jameswex authored May 23, 2019
    Configuration menu
    Copy the full SHA
    6826df7 View commit details
    Browse the repository at this point in the history
  5. build: fix lint errors (tensorflow#2274)

    Summary:
    Changes in tensorflow#2267 displeased the Google linter: `list(my_depset)` is
    banned because it’s not obvious that this forces iteration, so we switch
    to the far clearer `.to_list()` everywhere.
    
    The venerable linter further demands that docstrings be added, even for
    drive-by fixes.
    
    Test Plan:
    A test import succeeds; all Google-internal tests pass.
    
    wchargin-branch: import-lint
    wchargin authored May 23, 2019
    Configuration menu
    Copy the full SHA
    9bbf305 View commit details
    Browse the repository at this point in the history

Commits on May 24, 2019

  1. Add ability to set attributions in WIT (tensorflow#2252)

    Enabling WIT to be able to display feature-level attributions for individual predictions if the model provides it.
    jameswex authored May 24, 2019
    Configuration menu
    Copy the full SHA
    49fed7e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e2120cd View commit details
    Browse the repository at this point in the history
  3. Improve the performance and scalability of pod viewer (tensorflow#2254)

    The change includes:
    * Proto changes: crsDurationUs to AllReduceComputeDurationUs and AllReduceSyncDurationUs. Src(Dst)CoreId to Src(Dst)CoreIds. Remove replica id.
    * Removing the channel id selector slider from the topology graph
    * Avoid recomputing Topodata when selectedMetricIdx changed.
    * Fix stack bar chart for backward compatibility
    * d3 update for stack_bar_chart
    * Update d3 changes for topology graph
    qiuminxu authored and stephanwlee committed May 24, 2019
    Configuration menu
    Copy the full SHA
    2101d87 View commit details
    Browse the repository at this point in the history
  4. Add more options for TPU profiling (tensorflow#2262)

    * Improve capture profile dialog
    
    * Make tracing attempts also a GPU option
    
    * Address review comments
    
    * Minor fix
    qiuminxu authored May 24, 2019
    Configuration menu
    Copy the full SHA
    e3b9963 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    399b86b View commit details
    Browse the repository at this point in the history

Commits on May 28, 2019

  1. Configuration menu
    Copy the full SHA
    39c80de View commit details
    Browse the repository at this point in the history

Commits on May 29, 2019

  1. Extensible plugin infrastructural changes (tensorflow#2257)

    This is the change based on tensorflow/community#90.
    
    The change makes two improvements:
    - allow dynamic plugins (as spec in the RFC; uses entry_points to discover) to be loaded
    - change plugins_listing contract to include metadata about plugins including their respective FE entry point
    stephanwlee authored May 29, 2019
    Configuration menu
    Copy the full SHA
    af8a478 View commit details
    Browse the repository at this point in the history

Commits on May 30, 2019

  1. core: always gate data selector behind query param (tensorflow#2288)

    Summary:
    We’d like to serve dashboard registration metadata from the backend, as
    will be the case for dynamically loaded plugins. This is straightforward
    except for the scalar plugin’s `useDataSelector` bit, which depends on
    the query parameter. This patch changes moves the query parameter gating
    from the scalar plugin to the core frontend.
    
    Test Plan:
    Verify that the following behavior is the same before and after this
    change: (a) when the URL has no query parameters, neither the scalars
    dashboard nor the images dashboard shows a data selector; and (b) when
    the URL has `?EnableDataSelector`, the scalars dashboard has a data
    selector and no run selector, while the images dashboard has a run
    selector and no data selector.
    
    wchargin-branch: top-level-data-selector-flag
    wchargin authored May 30, 2019
    Configuration menu
    Copy the full SHA
    6b1ac28 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    234fb36 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e3a5f42 View commit details
    Browse the repository at this point in the history
  4. Zoom with mouse wheel only when alt key is pressed (tensorflow#2221)

    Default mouse wheel to zoom is rather obnoxious since large area of the
    TensorBoard is zoomable area.
    
    Fixes tensorflow#2214.
    stephanwlee authored May 30, 2019
    Configuration menu
    Copy the full SHA
    be51de4 View commit details
    Browse the repository at this point in the history
  5. fix tooltip position (tensorflow#2285)

    * fix tooltip position
    
    * Fix padding to move tooltip right bottom
    
    * Use Number instead of ~~
    
    * Calculate the tooltip position based on the layout.
    qiuminxu authored May 30, 2019
    Configuration menu
    Copy the full SHA
    34877c7 View commit details
    Browse the repository at this point in the history

Commits on May 31, 2019

  1. test: ensure that build URLs are valid (tensorflow#2289)

    Summary:
    This tests that URLs point to the TensorFlow mirror (as opposed to the
    Bazel mirror) and that they resolve to valid archives.
    
    Test Plan:
    Run `./tensorboard/tools/mirror_urls_test.sh`, and note that it passes
    with no output. Then apply the following patch to add some bad URLs:
    
    ```diff
    diff --git a/WORKSPACE b/WORKSPACE
    index 3943b0cf..d3975dfe 100644
    --- a/WORKSPACE
    +++ b/WORKSPACE
    @@ -9,6 +9,9 @@ http_archive(
         urls = [
             # tag 0.7.0 resolves to commit 6741f733227dc68137512161a5ce6fcf283e3f58 (2019-02-08 18:37:26 +0100)
             "http://mirror.tensorflow.org/github.com/bazelbuild/bazel-skylib/archive/0.7.0.tar.gz",
    +        "http://mirror.tensorflow.org/example.com/nonexistent.txt",
    +        "http://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/archive/0.7.0.tar.gz",
    +        "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/archive/0.7.0.tar.gz",
             "https://github.com/bazelbuild/bazel-skylib/archive/0.7.0.tar.gz",
         ],
     )
    ```
    
    Re-run the test, and note that it fails with exit code 1 and this text:
    
    ```
    The following URLs are not properly mirrored:
      - http://mirror.tensorflow.org/example.com/nonexistent.txt
    Please comment on your PR asking a TensorBoard core team member
    to mirror these URLs per instructions in http://b/133880558.
    
    The following URLs point to the legacy Bazel mirror:
    WORKSPACE:13:        "http://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/archive/0.7.0.tar.gz",
    WORKSPACE:14:        "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/archive/0.7.0.tar.gz",
    Please update them to use http://mirror.tensorflow.org/ instead.
    
    ```
    
    Tested on Git v2.15.1, which is what Travis uses.
    
    wchargin-branch: mirror-urls-test
    wchargin authored May 31, 2019
    Configuration menu
    Copy the full SHA
    dab66d2 View commit details
    Browse the repository at this point in the history
  2. Add user friendly message when scroll on chart (tensorflow#2295)

    Now that we have only enabled scroll zooming when pressing ALT, we
    should provide message indicating that the affordance has changed.
    
    Also changed the panning to also work with the ALT key.
    stephanwlee authored May 31, 2019
    Configuration menu
    Copy the full SHA
    21a8fb6 View commit details
    Browse the repository at this point in the history

Commits on Jun 1, 2019

  1. Fix typos (tensorflow#2300)

    abhinavsagar authored and wchargin committed Jun 1, 2019
    Configuration menu
    Copy the full SHA
    4267862 View commit details
    Browse the repository at this point in the history

Commits on Jun 3, 2019

  1. update author email in pip package (tensorflow#2298)

    opensource@ is owned by Google's Open Source Programs Office and is used
    primarily for reporting code of conduct violations and open source
    licensing issues.  It shouldn't be used as the author email for
    packages.
    willnorris authored and wchargin committed Jun 3, 2019
    Configuration menu
    Copy the full SHA
    e5dcd7e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2c0624e View commit details
    Browse the repository at this point in the history
  3. Add option to select which model to use for counterfactual computation (

    tensorflow#2255)
    
    This PR adds the ability to choose which model to use for for counterfactual example computation (Previously, it was computed with respect to first model).
    tolga-b authored and jameswex committed Jun 3, 2019
    Configuration menu
    Copy the full SHA
    efd8a94 View commit details
    Browse the repository at this point in the history
  4. Cleanup: remove unused tf-regex-group (tensorflow#2302)

    Checked the correctness of tf-image-dashboard after removal.
    stephanwlee authored Jun 3, 2019
    Configuration menu
    Copy the full SHA
    74b83ba View commit details
    Browse the repository at this point in the history
  5. core: define plugin metadata on the backend (tensorflow#2299)

    Summary:
    Until now, the `registry.ts` module has stored dashboard metadata (tab
    name, reload behavior, etc.). This commit enables defining that metadata
    on the backend in a backward-compatible way, to facilitate dynamic
    plugin loading. There is no user-observable change, and legacy plugins
    continue to work. (We convert a proper subset of the core plugins for
    demonstration purposes.)
    
    Test Plan:
    Modify `audio_plugin.py` to add an ES module definition:
    
    ```python
      def es_module_path(self):
        # DO NOT SUBMIT
        return '/magic.js'
    ```
    
    Modify `tf-image-dashboard.html` to remove the `registerDashboard` call.
    
    Then check the behavior of the following dashboards:
    
      - scalars, which defines `frontend_metadata` _and_ registers itself on
        the frontend, should work properly;
      - images, which defines `frontend_metadata` but does not register
        itself on the frontend, should work properly;
      - histograms, which does not define `frontend_metadata` but does
        register itself on the frontend, should work properly;
      - audio, which defines an ES module path, should show the message,
        “iframe plugin loading not yet supported”.
    
    wchargin-branch: send-metadata
    wchargin authored Jun 3, 2019
    Configuration menu
    Copy the full SHA
    32bafd7 View commit details
    Browse the repository at this point in the history

Commits on Jun 4, 2019

  1. hparams: add sample_uniform (tensorflow#2259)

    Summary:
    Resolves tensorflow#2246.
    
    Test Plan:
    Unit tests added, and demo updated; the demo still works.
    
    wchargin-branch: hparams-sample-uniform
    wchargin authored Jun 4, 2019
    Configuration menu
    Copy the full SHA
    692cf69 View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2019

  1. mesh: fix steps slider (tensorflow#2306)

    Summary:
    The steps slider was supposed to be capped at the number of steps, but
    in fact was always capped at 100 due to a typo in the Polymer binding.
    Fixes tensorflow#2270.
    
    Test Plan:
    Check out tensorflow#2265 and run the mesh demo to generate test data. Then,
    launch TensorBoard with the mesh data and observe that the slider now
    goes from 0 to 9 instead of 0 to 100, and that moving along the entire
    range of the slider is now useful.
    
    wchargin-branch: mesh-fix-steps
    wchargin authored Jun 5, 2019
    Configuration menu
    Copy the full SHA
    96efde4 View commit details
    Browse the repository at this point in the history
  2. Add demo application for mesh plugin (tensorflow#2265)

    Summary:
    This includes a parser for simple ASCII PLY files (intentionally
    restricted to those that can be parsed by a simple implementation).
    
    Test Plan:
    With TensorFlow 1.x, run
    
    ```
    bazel run //tensorboard/plugins/mesh:mesh_demo -- \
        --mesh_path="${PWD}/tensorboard/plugins/mesh/test_data/icosphere.ply"
    ```
    
    and then point TensorBoard at `/tmp/mesh_demo` to see some mesh data.
    Drag the step slider to see different colors at every step.
    podlipensky authored and wchargin committed Jun 5, 2019
    Configuration menu
    Copy the full SHA
    203d4e1 View commit details
    Browse the repository at this point in the history
  3. build: upgrade rules_closure to HEAD (tensorflow#2308)

    Summary:
    This pulls in bazelbuild/rules_closure#383 to fix tensorflow#2297, and integrates
    the same fix into our own `Vulcanize.java` for consistency.
    
    This diff includes a jscompiler upgrade from `v20190325` to `v20190528`.
    
    Test Plan:
    The `//tensorboard` target still builds and appears to run fine, with
    cursory inspection.
    
    Changing the `href` attribute of the help button in `tf-tensorboard` to
    `mailto:[email protected]` now builds and works properly; prior to this
    commit, that failed to build, as described in tensorflow#2297.
    
    wchargin-branch: rules-closure-mailto-fix
    wchargin authored Jun 5, 2019
    Configuration menu
    Copy the full SHA
    cb310d6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d1104f6 View commit details
    Browse the repository at this point in the history
  5. Enable WIT usage in JupyterLab/Cloud AI Platform notebooks (tensorflo…

    …w#2301)
    
    Update WitWidget packaging/logic to enable it to work in JupyterLab notebooks, which handle extensions like WitWidget differently than standard Jupyter notebooks. This also enables use in Cloud AI Platform notebooks.
    jameswex authored Jun 5, 2019
    Configuration menu
    Copy the full SHA
    dcda58b View commit details
    Browse the repository at this point in the history
  6. core: stabilize and use plugin_metadata (tensorflow#2304)

    Summary:
    This patch switches first-party plugins from calling `registerDashboard`
    on the frontend to implementing `plugin_metadata` on the backend.
    
    This requires reworking the “dashboard containers stamped” logic, whose
    purpose is to introduce a Polymer data dependency from the `dom-repeat`
    stamping state to the dashboard rendering. Previously, all containers
    were stamped simultaneously, but this may no longer be the case; we must
    instead track exactly which containers have been stamped.
    
    Plugin ordering was also previously defined implicitly on the frontend;
    we shift that ordering to the backend.
    
    Test Plan:
    Check that basic functionality still works (dashboards display as
    intended and in the correct order). Click through every dashboard to
    verify that the proper web component is rendered. Verify that navigating
    to `/#wat` displays a “no such dashboard” message, but navigating to
    `/#scalars` shows no such message even before the plugins listing loads.
    Verify that TensorBoard works properly when pointed at an empty logdir.
    
    Then, check that all plugins were migrated (except for the core plugin,
    which has no frontend):
    
    ```
    $ git grep -l registerDashboard
    tensorboard/components/tf_tensorboard/registry.ts
    $ comm -3 \
    > <(git grep -l 'class .*TBPlugin' ':!*test.py' | sort) \
    > <(git grep -l 'def frontend_metadata' ':!*test.py' | sort) \
    > ;
    tensorboard/plugins/core/core_plugin.py
    ```
    
    wchargin-branch: core-use-pluginmetadata
    wchargin authored Jun 5, 2019
    Configuration menu
    Copy the full SHA
    1992f58 View commit details
    Browse the repository at this point in the history
  7. core: exclude CorePlugin from plugins_listing (tensorflow#2305)

    Summary:
    The `plugins_listing` response has long included a `"core"` key. Prior
    to tensorflow#2299 and tensorflow#2304, this did nothing; now, it properly emits a warning,
    because the frontend does not know how to render such a plugin. There’s
    no reason that the frontend needs to know about this plugin at all.
    
    Test Plan:
    Observe that the “Plugin has no loading mechanism and no baked-in
    registry entry: core” warning no longer appears in the JS console.
    
    wchargin-branch: core-verb
    wchargin authored Jun 5, 2019
    Configuration menu
    Copy the full SHA
    ada2604 View commit details
    Browse the repository at this point in the history
  8. core: move ES module path into FrontendMetadata (tensorflow#2317)

    Summary:
    The two loading mechanisms are now specified in the same data object, so
    switching from one to the other requires only a single change.
    
    The HTTP API and the frontend are unchanged.
    
    Test Plan:
    Modify the scalar plugin’s `frontend_metadata` to use an ES module path:
    
    ```diff
    diff --git a/tensorboard/plugins/scalar/scalars_plugin.py b/tensorboard/plugins/scalar/scalars_plugin.py
    index 1b864a74..2e06c86a 100644
    --- a/tensorboard/plugins/scalar/scalars_plugin.py
    +++ b/tensorboard/plugins/scalar/scalars_plugin.py
    @@ -85,7 +85,8 @@ class ScalarsPlugin(base_plugin.TBPlugin):
    
       def frontend_metadata(self):
         return super(ScalarsPlugin, self).frontend_metadata()._replace(
    -        element_name='tf-scalar-dashboard',
    +        #element_name='tf-scalar-dashboard',
    +        es_module_path='/magic.js',
             use_data_selector=True,
         )
    ```
    
    Then, launch TensorBoard and note that the `plugins_listing` response
    contains the right values for both the scalar and image plugins.
    
    wchargin-branch: es-module-metadata
    wchargin authored Jun 5, 2019
    Configuration menu
    Copy the full SHA
    b4db8ec View commit details
    Browse the repository at this point in the history
  9. core: add support for iframe loading (tensorflow#2318)

    Summary:
    We create a same-origin iframe and add to it a `<script>` element that
    dynamically imports the plugin entry point and invokes its `render`er.
    
    For now, the plugin frame has no way to communicate with the host. In
    the future, we’d like to be able to (e.g.) send “reload” signals from
    host to plugin, and enable the plugin to query the host for global state
    like the run selection.
    
    Test Plan:
    Cannibalize an existing plugin to provide an ES module entry point:
    
    ```diff
    diff --git a/tensorboard/plugins/scalar/scalars_plugin.py b/tensorboard/plugins/scalar/scalars_plugin.py
    index 1b864a74..6ba2b98b 100644
    --- a/tensorboard/plugins/scalar/scalars_plugin.py
    +++ b/tensorboard/plugins/scalar/scalars_plugin.py
    @@ -24,6 +24,7 @@ from __future__ import print_function
    
     import collections
     import csv
    +import textwrap
    
     import six
     from six import StringIO
    @@ -62,6 +63,7 @@ class ScalarsPlugin(base_plugin.TBPlugin):
         return {
             '/scalars': self.scalars_route,
             '/tags': self.tags_route,
    +        '/scalars.js': self._serve_module,
         }
    
       def is_active(self):
    @@ -85,10 +87,28 @@ class ScalarsPlugin(base_plugin.TBPlugin):
    
       def frontend_metadata(self):
         return super(ScalarsPlugin, self).frontend_metadata()._replace(
    -        element_name='tf-scalar-dashboard',
    +        es_module_path='/scalars.js',  # DO NOT SUBMIT, obviously
             use_data_selector=True,
         )
    
    +  @wrappers.Request.application
    +  def _serve_module(self, request):
    +    module = textwrap.dedent("""
    +        console.log("scalars.js: loaded module under origin:", window.origin);
    +        export function render() {
    +          console.log("scalars.js: rendering");
    +          document.body.innerHTML = `
    +            <h1>meet the new scalars dashboard</h1>
    +            <ul>
    +              <li>loss: &#x1F4C9;</li>
    +              <li>accuracy: &#x1F4C8;</li>
    +            </ul>
    +            <p>nice job, keep it up</p>
    +          `;
    +        }
    +    """).strip()
    +    return http_util.Respond(request, module, 'application/javascript')
    +
       def index_impl(self):
         """Return {runName: {tagName: {displayName: ..., description: ...}}}."""
         if self._db_connection_provider:
    ```
    
    Then verify that the plugin renders properly:
    
    ![Screenshot of hacked up scalars plugin](https://user-images.githubusercontent.com/4317806/58985670-c1531a00-8790-11e9-9b10-3fbe293c3c2d.png)
    
    Also check that the reload button does not affect it (nor raise a
    console error), and that switching among dashboards does not restamp the
    iframe.
    
    wchargin-branch: iframe-loading
    wchargin authored Jun 5, 2019
    Configuration menu
    Copy the full SHA
    b549bfd View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2019

  1. build: use tf.test.main for mesh:demo_utils_test (tensorflow#2319)

    Summary:
    This test case already contains actual TensorFlow code, via the `GFile`
    use in the code under test. Within Google, such tests must be run via
    `tf.test.main()` or `absltest.main()`, and the TensorFlow-specific code
    should be in a `tf.test.TestCase` as well (though this is not strictly
    required).
    
    Test Plan:
    Verified that this patch fixes a test that’s broken when syncing into
    Google3.
    
    wchargin-branch: tf-test-mesh-test
    wchargin authored Jun 6, 2019
    Configuration menu
    Copy the full SHA
    1bb320d View commit details
    Browse the repository at this point in the history
  2. test: use absltest for tensorboard.test (tensorflow#2321)

    Summary:
    Within Google, tests that call certain functions must be run via either
    `tf.test` or `absltest`. When possible, we’d like to use `absltest` so
    that the tests can be run in notf settings. Thus, we change the backing
    implementation of `tensorboard.test` from `unittest` to `absltest`.
    
    We retain the `tensorboard.test` layer to add the `get_temp_dir` method,
    which is provided by `tf.test` but not `absltest`, and which our tests
    often expect to use.
    
    This has the side benefit that we get lots of assertions for free,
    including `assertStartsWith`, `assertEndsWith`, and `assertLen`, as well
    as fancy ones like `assertSequenceAlmostEqual` and `assertUrlEqual`.
    (Unfortunately, we still lack `tf.test`’s `assertProtoEquals`.)
    
    Test Plan:
    Existing tests pass. Googlers, see <http://cl/251757823>.
    
    wchargin-branch: tb-test-absltest
    wchargin authored Jun 6, 2019
    Configuration menu
    Copy the full SHA
    353e7c7 View commit details
    Browse the repository at this point in the history
  3. Fix py3 issue with AI Platform models (tensorflow#2311)

    In WIT, models that accept JSON as input were failing in python 3 notebooks due to how bytes_list protos are handled.
    jameswex authored Jun 6, 2019
    Configuration menu
    Copy the full SHA
    46c510d View commit details
    Browse the repository at this point in the history
  4. In WIT, set_target sets ground truth feature (tensorflow#2314)

    set_target now sets the ground truth feature in WIT as well. Before, user had to select ground truth feature in Fairness&Performance panel even after setting it in WitConfig.
    tolga-b authored and jameswex committed Jun 6, 2019
    Configuration menu
    Copy the full SHA
    30dbc10 View commit details
    Browse the repository at this point in the history
  5. scalars: speed up test and mark as “medium” (tensorflow#2327)

    Summary:
    Addresses performance issues within Google: <http://b/134690650>. This
    speeds up the test by 20–25%.
    
    Test Plan:
    That the test still passes suffices.
    
    wchargin-branch: scalars-test-speed
    wchargin authored Jun 6, 2019
    Configuration menu
    Copy the full SHA
    2990da4 View commit details
    Browse the repository at this point in the history
  6. cleanup: add typing for sinon-chai (tensorflow#2313)

    sinon-chai comes preinstalled with web-component-tester.
    We can make use of it except it misses the typing information.
    stephanwlee authored Jun 6, 2019
    Configuration menu
    Copy the full SHA
    1a610a8 View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2019

  1. Set base URI for plugin iframe (tensorflow#2329)

    Plugins are developed with a relative to its package in mind. Without
    setting the baseURI, the iframe has base path of
    http[s]://[TBPATH]/[pathPrefix] which forces all relative paths the
    plugin uses require 'data/plugin/[name]/' prefix, which is unnatural.
    
    This change sets the base URI of the plugin iframe to
    http[s]://[TBPATH]/[pathPrefix]/data/plugin/[name]/.
    stephanwlee authored Jun 7, 2019
    Configuration menu
    Copy the full SHA
    228b0aa View commit details
    Browse the repository at this point in the history
  2. infra: upgrade three.js to r104 from r77 (tensorflow#2326)

    Notable changes:
    - Vertex shader require related glsl code block
    - other API changes in between
    - WebGLRenderer.render no longer takes 4 inputs. Instead, you must set
      renderTarget manually.
    - BufferAttribute.prototype.count is important and attribute.array is
      discourage in favor of setArray
    
    Notable no changes:
    - Types are not updated.
      - DefinitelyType no longer provide the latest
        typing of three in favor TypeScript in three.js repo. For the time
        being, we have decided not to pursue this as downloading the archive
        would fetch unnecessarily large file (examples dir is 300+MB).
      - TypeScript complains about mixing UMD and module when using
        newer types from three.js
    stephanwlee authored Jun 7, 2019
    Configuration menu
    Copy the full SHA
    1f56953 View commit details
    Browse the repository at this point in the history
  3. ci: pin to non-broken nightlies (tensorflow#2332)

    Summary:
    Due to <tensorflow/tensorflow#29536>.
    
    This unblocks our CI until tomorrow’s nightlies are pushed.
    
    Test Plan:
    Fingers crossed.
    
    wchargin-branch: pin-20190606-nightly
    wchargin authored Jun 7, 2019
    Configuration menu
    Copy the full SHA
    31c00fb View commit details
    Browse the repository at this point in the history
  4. infra: use base.setAttribute instead .href (tensorflow#2334)

    Closure security conformance test guard against almost all instances of
    setting .href. Since we will not be using the goog.safe APIs for now, we
    will be using setAttribute instead.
    stephanwlee authored Jun 7, 2019
    Configuration menu
    Copy the full SHA
    196ecfe View commit details
    Browse the repository at this point in the history
  5. Fixed incorrect runs-selector rendering (tensorflow#2333)

    Nature of the bug:
    Sidebar tf-runs-selector is a bit trickier in term of layout: its height
    depends both on number/size of the content (# of runs) and size of the
    viewport (show scrollbar if it does not fit in the sidebar).
    
    To confine the size of the tf-runs-selector w.r.t the height of its
    container (whose height is not defined by content but its sibling sizes
    which are computed by respective descendents), we need to make each flex
    container `overflow: hidden`. `overflow: hidden` makes child and
    child-flex-container compute height w.r.t, the flex-container with
    `overflow: hidden`.
    
    When run numbers are low, we make tf-runs-selector's height computed
    w.r.t. descendent heights by not putting `height: 100%`.
    
    Confirmed the change both on Chrome 75 and Firefox 66.
    stephanwlee authored Jun 7, 2019
    Configuration menu
    Copy the full SHA
    1aa9e53 View commit details
    Browse the repository at this point in the history

Commits on Jun 10, 2019

  1. mesh: handle cancelled requests properly (tensorflow#2315)

    This fixes tensorflow#2271 by ignoring cancelled requests.
    podlipensky authored and wchargin committed Jun 10, 2019
    Configuration menu
    Copy the full SHA
    7a4ef58 View commit details
    Browse the repository at this point in the history

Commits on Jun 11, 2019

  1. Configuration menu
    Copy the full SHA
    b6fe420 View commit details
    Browse the repository at this point in the history
  2. Remove experimental data selector (tensorflow#2290)

    DataSelector was an experimental feature, when using Database backed
    backend, allowed improved user experience in choosing data with built-in
    notion of experiments.
    
    The team has no plans to make tangible improvements to it and want to
    re-consider the data selection story more holistically.
    stephanwlee authored Jun 11, 2019
    Configuration menu
    Copy the full SHA
    b764306 View commit details
    Browse the repository at this point in the history

Commits on Jun 12, 2019

  1. frontend: reinstate registration for conditional plugins (tensorflow#…

    …2340)
    
    Summary:
    Plugins whose backends are provided via “loaders” rather than the
    plugins themselves may fail to load. We still want to allow those
    plugins to display a message in the frontend indicating what must be
    done to enable them (e.g., update TensorFlow, start a `tfdbg` debugger),
    which requires registering their frontends unconditionally.
    
    This is a short-term hack to retain functionality prior to tensorflow#2304 (with
    the minor change that these plugins will now always appear at the end of
    the list). We’ll want to replace this with a better mechanism when time
    permits.
    
    Fixes tensorflow#2338.
    
    Test Plan:
    Launch TensorBoard without TensorFlow installed and with no flags other
    than `--logdir`. Note that the beholder, debugger, hparams, what-if
    tool, and profile dashboards all have valid entries in the “inactive”
    dropdown, displaying appropriate help messages.
    
    Verify that of the plugins listed in `default.py`, all those provided
    via loaders now have `registerDashboard` statements.
    
    wchargin-branch: register-conditional-plugins
    wchargin authored Jun 12, 2019
    Configuration menu
    Copy the full SHA
    48665fe View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2019

  1. ci: unpin 2019-06-06 nightlies (tensorflow#2337)

    Summary:
    This reverts commit 31c00fb.
    
    Test Plan:
    CI suffices.
    
    wchargin-branch: unpin-20190606-nightly
    wchargin authored Jun 13, 2019
    Configuration menu
    Copy the full SHA
    1423975 View commit details
    Browse the repository at this point in the history
  2. proto: sync to TensorFlow v1.14.0-rc1 (tensorflow#2345)

    Summary:
    These are synced to TensorFlow tag `v1.14.0-rc1`, which resolves to
    648ea74ea01deda6f13db83770564a2660d15925.
    
    New rewrite rules are required in the update script due to new
    references to `tensorflow.*` protos. Existing rewrite rules in the test
    case suffice.
    
    Test Plan:
    Running `bazel test //tensorboard/compat/proto:proto_test` now passes in
    a virtualenv with `tensorflow==1.14.0rc1` installed. This is _not_ the
    same as current TF nightlies, due to changes in TensorFlow HEAD.
    
    wchargin-branch: proto-sync-v1.14.0-rc1
    wchargin authored Jun 13, 2019
    Configuration menu
    Copy the full SHA
    78db135 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2019

  1. Configuration menu
    Copy the full SHA
    298fb6d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    62178a7 View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2019

  1. Refactoring of the parallel-coordinates element. (tensorflow#2223)

    - Converted the code into typescript and introduced several cooperating classes to implement the behavior.
    - Changed 'schema' to be an object containing all columns (visible and non visible) with a boolean associated with each one to denote whether it is currently displayed. The old format of the schema is preserved under the deprecated field 'visibleSchema' of 'schema'. The goal is eventually to make everyone use 'schema' and to remove 'visibleSchema'.
    erzel authored and stephanwlee committed Jun 17, 2019
    Configuration menu
    Copy the full SHA
    6db3f42 View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2019

  1. diagnose: detect missing genfiles (tensorflow#2353)

    Summary:
    If a TensorBoard installation omits compiled proto bindings, the
    `tensorboard.summary._tf.summary` module cannot be imported, which
    triggers a TensorFlow warning about a “missing TensorBoard
    installation”. We can check for this condition in our self-diagnosis
    script.
    
    Test Plan:
    From the TensorBoard repository:
    
    ```
    $ dtb="$(readlink -e ./tensorboard/tools/diagnose_tensorboard.py)"
    $ filter() { awk 'ok && /^#/ { exit; }; /###.*Avoid/ { ok = 1; }; ok'; }
    $ python "${dtb}" | filter
    ### Suggestion: Avoid `tensorboard` packages without genfiles
    
    Your current directory contains a `tensorboard` Python package that
    does not include generated files. This can happen if your current
    directory includes the TensorBoard source tree (e.g., you are in the
    TensorBoard Git repository). Consider changing to a different
    directory.
    
    $ PYTHONPATH="${PYTHONPATH}:$(readlink -e .)" python "${dtb}" | filter
    ### Suggestion: Avoid `tensorboard` packages without genfiles
    
    Your Python path contains a `tensorboard` package that does not
    include generated files. This can happen if your current directory
    includes the TensorBoard source tree (e.g., you are in the TensorBoard
    Git repository). The following directories from your Python path may
    be problematic:
    
      - current directory
      - '/HOMEDIR/git/tensorboard' (duplicate underlying directory)
    
    $ (cd / && python "${dtb}" | filter | wc -l)
    0
    ```
    
    wchargin-branch: diagnose-missing-genfiles
    wchargin authored Jun 18, 2019
    Configuration menu
    Copy the full SHA
    dcc50b8 View commit details
    Browse the repository at this point in the history
  2. Add S3 write support for non-TensorFlow writer (tensorflow#2260)

    * Add S3 write support for non-TensorFlow writer
    
    * Remove commented line
    
    * Fix tests and string encodings
    
    * Skip S3 writer tests with real TensorFlow since moto won't work
    
    * Code review changes
    
    * A few more review changes
    
    * Fix python2 issues
    
    * Skip flush if tempfile returns None content
    
    * Some additional code review changes
    
    * A few more code review changes
    orionr authored and nfelt committed Jun 18, 2019
    Configuration menu
    Copy the full SHA
    1cbac0b View commit details
    Browse the repository at this point in the history
  3. plugins: add initializer on base plugin class (tensorflow#2360)

    Summary:
    Prior to this change, defining a (possibly dynamically loaded) plugin
    without this initializer would yield the rather inscrutable error
    
    ```
      File "/VIRTUAL_ENV/tensorboard/plugins/base_plugin.py", line 253, in load
        return self._plugin_class(context)
    TypeError: object() takes no parameters
    ```
    
    whose stack trace does not contain the offending plugin code at all.
    (The error is because initializers are effectively inherited in Python.)
    
    Test Plan:
    Cherry-pick tensorflow#2354, delete its example plugin’s `__init__`, and note that
    the example still works. (You’ll have to build TensorBoard’s Pip package
    and install it into a virtualenv.)
    
    wchargin-branch: plugin-empty-initializer
    wchargin authored Jun 18, 2019
    Configuration menu
    Copy the full SHA
    052a8ea View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2019

  1. cleanup: fixed few typos. (tensorflow#2364)

    Common typo catcher caught few things in our recent PR tensorflow#2223.
    Closure type system annotates return type with "@return" instead of
    "@returns".
    stephanwlee authored Jun 19, 2019
    Configuration menu
    Copy the full SHA
    99edb83 View commit details
    Browse the repository at this point in the history
  2. ci: add trailing whitespace test (tensorflow#2365)

    Summary:
    Prevents regressions of nice fixes like tensorflow#2364.
    
    Test Plan:
    Run the script, and note that it passes with no output. Then remove
    `README.md` from the exceptions list and add `nonexistent.txt`, and
    observe that the script fails with:
    
    ```
    Superfluous trailing whitespace:
    README.md:10:For in-depth information on the Graph Visualizer, see this tutorial: $
    README.md:18:through setting up and using TensorBoard. There's an associated $
    README.md:36:For more details, see $
    README.md:69:For this, you need $
    
    Stale exceptions (no whitespace problems; prune exceptions list):
    nonexistent.txt
    ```
    
    wchargin-branch: whitespace-hygiene-test
    wchargin authored Jun 19, 2019
    Configuration menu
    Copy the full SHA
    3ccafba View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2019

  1. Update references to Dandelion’s GitHub account (tensorflow#1682)

    Summary:
    Their primary account is now @decentralion. The repository link is
    forwarded by GitHub, but it’s better for to link to the canonical
    address.
    
    Test Plan:
    One link is modified; clicking the link works.
    
    Running `git grep -i 'dan\(delion\)\?mane'` returns no results.
    
    wchargin-branch: decentralionize
    wchargin authored Jun 20, 2019
    Configuration menu
    Copy the full SHA
    f373f51 View commit details
    Browse the repository at this point in the history
  2. diagnose: wrap diagnostics in <details> element (tensorflow#2367)

    Summary:
    The output of `pip freeze` in particular can be multiple pages long. We
    do want this output, but we don’t want to scroll through it.
    
    Test Plan:
    Run the diagnosis script and copy the output into a GitHub comment box
    to preview the rendered Markdown. Note that it’s now compact—
    
    ![screenshot of rendered diagnostics output with `<details>` element][1]
    
    —and that you can click the “Diagnostics output” to expand the full
    contents.
    
    [1]: https://user-images.githubusercontent.com/4317806/59795069-465d2980-928f-11e9-893c-d8c62d99d592.png
    
    wchargin-branch: diagnostics-details
    wchargin authored Jun 20, 2019
    Configuration menu
    Copy the full SHA
    2f49487 View commit details
    Browse the repository at this point in the history
  3. tf-runs-selector: make it take up parent's width. (tensorflow#2366)

    Especially when name of the run is short and size of the window is large,
    tf-runs-selector was not taking up the size of the parent width. This bug
    was quite subtle for our demo/test data because data location string was
    long enough to make the tf-runs-selector take up wider width. By manually
    removing the data location string (length of run names do not matter), we
    were able to reproduce the bug.
    
    This change makes tf-runs-selector take up the width of the parent.
    Because we use position relative-absolute trick, we have to consider the
    size of the parent's (or relative container) padding.
    
    Fixes tensorflow#2358.
    stephanwlee authored Jun 20, 2019
    Configuration menu
    Copy the full SHA
    0f6282d View commit details
    Browse the repository at this point in the history
  4. Load projector plugin dynamically (tensorflow#2356)

    Build projector frontend code as a separate binary and loaded that as a
    source (not from webfiles) in projector_plugin.
    
    Made changes to our pip packaging to include the projector FE binaries.
    Made changes to tensorboard dependencies to make local development easy.
    
    Tested:
      - local dev by running `pip setup.py develop` in source tree A then
        running TensorBoard in source tree B
      - tested pip package building and running TensorBoard
      - added smoke test that tests the projector frontend binary endpoint.
    stephanwlee authored Jun 20, 2019
    Configuration menu
    Copy the full SHA
    9789dbf View commit details
    Browse the repository at this point in the history
  5. WIT updates for cloud AI platform (tensorflow#2369)

    Fixing up WIT usage in cloud AI platform models.
    jameswex authored Jun 20, 2019
    Configuration menu
    Copy the full SHA
    b90a9a0 View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2019

  1. build: support --incompatible_depset_is_not_iterable

    Summary:
    One of many changes needed for Bazel 0.27.0; see tensorflow#2355.
    
    Test Plan:
    The following command now works on Bazel 0.27.0:
    
    ```
    bazel run \
      --incompatible_depset_is_not_iterable=true \
      --incompatible_disable_deprecated_attr_params=false \
      --incompatible_new_actions_api=false \
      --incompatible_no_support_tools_in_action_inputs=false \
      --incompatible_use_python_toolchains=false \
      //tensorboard -- --logdir ~/tensorboard_data
    ```
    
    With the same `--incompatible_*` flags, all targets build and all tests
    pass.
    
    wchargin-branch: bazel-depset-is-not-iterable
    wchargin committed Jun 21, 2019
    Configuration menu
    Copy the full SHA
    1896abe View commit details
    Browse the repository at this point in the history
  2. build: support --incompatible_disable_deprecated_attr_params

    Summary:
    One of many changes needed for Bazel 0.27.0; see tensorflow#2355. This one is
    solved by a simple protobuf upgrade.
    
    Test Plan:
    The following command now works on Bazel 0.27.0:
    
    ```
    bazel run \
      --incompatible_depset_is_not_iterable=true \
      --incompatible_disable_deprecated_attr_params=true \
      --incompatible_new_actions_api=false \
      --incompatible_no_support_tools_in_action_inputs=false \
      --incompatible_use_python_toolchains=false \
      //tensorboard -- --logdir ~/tensorboard_data
    ```
    
    With the same `--incompatible_*` flags, all targets build and all tests
    pass.
    
    wchargin-branch: bazel-disable-deprecated-attr-params
    wchargin committed Jun 21, 2019
    Configuration menu
    Copy the full SHA
    b5f4507 View commit details
    Browse the repository at this point in the history
  3. build: support --incompatible_new_actions_api

    Summary:
    One of many changes needed for Bazel 0.27.0; see tensorflow#2355.
    
    TODO: Is using `paths.join` everywhere really the recommended path? The
    previous form was substantially more convenient and no less principled,
    and the documentation on `paths.join` suggests that it doesn’t insert
    backslashes properly on Windows.
    
    Test Plan:
    The following command now works on Bazel 0.27.0:
    
    ```
    bazel run \
      --incompatible_depset_is_not_iterable=true \
      --incompatible_disable_deprecated_attr_params=true \
      --incompatible_new_actions_api=true \
      --incompatible_no_support_tools_in_action_inputs=false \
      --incompatible_use_python_toolchains=false \
      //tensorboard -- --logdir ~/tensorboard_data
    ```
    
    With the same `--incompatible_*` flags, all targets build and all tests
    pass.
    
    wchargin-branch: bazel-new-actions-api
    wchargin committed Jun 21, 2019
    Configuration menu
    Copy the full SHA
    4ba5f51 View commit details
    Browse the repository at this point in the history
  4. build: support --incompatible_no_support_tools_in_action_inputs

    Summary:
    One of many changes needed for Bazel 0.27.0; see tensorflow#2355.
    
    As mentioned in a comment, the fact that `collect_runfiles` continues to
    be required surprises me: the `_tsc` `sh_binary` clearly declares `data`
    dependencies on both Node and `tsc.js`, but those are apparently not
    being included in the runfiles even when `_tsc` is passed in `tools`.
    
    Test Plan:
    The following command now works on Bazel 0.27.0:
    
    ```
    bazel run \
      --incompatible_depset_is_not_iterable=true \
      --incompatible_disable_deprecated_attr_params=true \
      --incompatible_new_actions_api=true \
      --incompatible_no_support_tools_in_action_inputs=true \
      --incompatible_use_python_toolchains=false \
      //tensorboard -- --logdir ~/tensorboard_data
    ```
    
    With the same `--incompatible_*` flags, all targets build and all tests
    pass.
    
    wchargin-branch: bazel-no-support-tools-in-action-inputs
    wchargin committed Jun 21, 2019
    Configuration menu
    Copy the full SHA
    51fb079 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    688aabd View commit details
    Browse the repository at this point in the history
  6. Add Docker instructions in tensorboard-in-notebooks (tensorflow#2336)

    Running TensorBoard in a Jupyter notebook inside a Docker container
    requires explicitly exposing additional ports. This commit adds a
    paragraph in the tensorboard-in-notebooks file, explaining the usage in
    the **Setup** section:
    
    ![Screenshot of new “Setup” section, as rendered in Colab][1]
    
    [1]: https://user-images.githubusercontent.com/4317806/59947291-b4d1f100-9421-11e9-852e-0bc322fb69c0.png
    brunapinos authored and wchargin committed Jun 21, 2019
    Configuration menu
    Copy the full SHA
    52dd12a View commit details
    Browse the repository at this point in the history
  7. build: add tool to create deterministic tarballs (tensorflow#2362)

    Summary:
    We plan to promote TensorBoard’s Pip packages to Bazel targets, but the
    filenames of these targets can’t actually be statically determined: they
    must include the TensorBoard version number, which is defined in a
    Python module. Instead, we’ll build a tarball containing the two wheels.
    Building tarballs deterministically with system tools is famously
    troublesome (you can do it with GNU `tar` and a lot of flags, but not
    portably), and it seems that the standard approach is to use Python’s
    built-in `tarfile` library.
    
    Implementation based off of <servo/servo#12244>,
    but with changes to make it Python 3-compatible, to use our code style,
    and to remove some unneeded machinery. Original is Apache-2 licensed.
    
    Test Plan:
    End-to-end tests included. Replacing the body of `_run_tool` with
    
    ```python
        return subprocess.check_output(["tar", "czf"] + args)
    ```
    
    causes the `test_invariant_under_mtime` test case to fail for the right
    reason.
    
    wchargin-branch: deterministic-tgz
    wchargin authored Jun 21, 2019
    Configuration menu
    Copy the full SHA
    fce7a8a View commit details
    Browse the repository at this point in the history

Commits on Jun 24, 2019

  1. graph: Add default compat-node-title (tensorflow#2375)

    There are many variants of the tf-graph-dashboard. We recently, to
    support other type of compatibility check, added a required field of
    "compat-node-title" and in the process broke other apps. This change
    makes other app behave exactly the same while keeping the
    customizability.
    stephanwlee authored Jun 24, 2019
    Configuration menu
    Copy the full SHA
    99ada06 View commit details
    Browse the repository at this point in the history
  2. what-if: upgrade what-if source to be tf 2.0 compatible (tensorflow#2331

    )
    
    Upgrade inference_utils to be tf 2.0 compatible
    stephanwlee authored Jun 24, 2019
    Configuration menu
    Copy the full SHA
    861be4e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    895799e View commit details
    Browse the repository at this point in the history
  4. build: promote Pip wheels to Bazel target (tensorflow#2363)

    Summary:
    Running `bazel build //tensorboard/pip_package` now actually builds the
    Pip package. Other targets can depend on the built wheels, which are
    provided in a tarball. Smoke tests have been separated to a new
    `:test_pip_package` target.
    
    Test Plan:
    Check that everything builds:
    
    ```
    $ bazel build //tensorboard/pip_package 2>/dev/null
    $ echo $?
    0
    $ tar tzf bazel-bin/tensorboard/pip_package/pip_packages.tar.gz
    tensorboard-1.15.0a0-py2-none-any.whl
    tensorboard-1.15.0a0-py3-none-any.whl
    $ bazel run //tensorboard/pip_package:test_pip_package >/dev/null 2>&1
    $ echo $?
    0
    $ tmpdir="$(mktemp -d)"
    $ bazel run //tensorboard/pip_package:build_pip_package -- "${tmpdir}" \
    > >/dev/null 2>/dev/null
    $ ls -1 "${tmpdir}"
    tensorboard-1.15.0a0-py2-none-any.whl
    tensorboard-1.15.0a0-py3-none-any.whl
    ```
    
    Then:
    
      - Add an `assert False` to the `pb` function in `scalar/summary.py`,
        and verify that `:test_pip_package` fails with default options but
        passes with `--tf-version ""`.
      - Add an `assert False` to `tensorboard/main.py` and verify that the
        test fails even with `--tf-version ""`.
      - Add `def foo(): yield from None` to `tensorboard/main.py`, and
        verify that, when run in a Python 3 virtualenv, the test fails by
        default but passes with `--default-python-only`.
    
    wchargin-branch: bazel-pip-package
    wchargin authored Jun 24, 2019
    Configuration menu
    Copy the full SHA
    0783b9c View commit details
    Browse the repository at this point in the history
  5. cleanup: fix all remaining trailing whitespace (tensorflow#2381)

    Summary:
    Per @nfelt’s suggestion. Also unbreaks the build.
    
    Generated with:
    
        git grep -Ilz '  *$' | xargs -0 sed -i 's/  *$//'
    
    Test Plan:
    Running `./tensorboard/tools/whitespace_hygiene_test.py` now passes.
    
    wchargin-branch: cleanup-whitespace
    wchargin authored Jun 24, 2019
    Configuration menu
    Copy the full SHA
    3ab710a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6399b85 View commit details
    Browse the repository at this point in the history
  7. plugins: add sample dynamically loaded plugin (tensorflow#2354)

    Summary:
    This plugin can eventually replace the `tensorboard-plugin-example`
    repository; it’ll be easier for us to keep it up to date if it’s in the
    same repository as main TensorBoard. And it has tests!
    
    Test Plan:
    Run `bazel test //tensorboard/plugins/example:smoke_test` to start.
    Then, modify `setup.py` to remove the `entry_points` entry, and note
    that the test fails. Separately, modify line 42 of `__init__.py` to
    serve the JS under `/not_index.js` instead; the test should again fail.
    
    Test the development workflow: Follow the instructions in `README.md`.
    Then, edit `widgets.js` (say, add another exclamation point) and refresh
    to see changes live without restarting TensorBoard:
    
    ![screenshot of “Hello TensorBoard!” in example plugin][1]
    
    [1]: https://user-images.githubusercontent.com/4317806/59641012-cb700380-9114-11e9-8323-c811388df31c.png
    
    wchargin-branch: example-dynamic-plugin
    wchargin authored Jun 24, 2019
    Configuration menu
    Copy the full SHA
    afecb68 View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2019

  1. Configuration menu
    Copy the full SHA
    016ab58 View commit details
    Browse the repository at this point in the history