Skip to content

uploader: validate tensors before uploading them #3624

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

Merged
merged 6 commits into from
May 13, 2020

Conversation

caisq
Copy link
Contributor

@caisq caisq commented May 12, 2020

  • Motivation for features / changes
    • Guard against malformed tensor data points in the uploader: fail during
      upload time instead of serving time.
  • Technical description of changes
    • In _TensorBatchedRequestSender, try to parse a TensorProto before sending it
      to tensorboard.dev server.
    • Add unit tests for the catching of malformed tensors.
    • Some existing unit tests are modified. They previously used malformed TensorProto values.
  • Screenshots of UI changes
    • image
  • Detailed steps to verify changes work correctly (as executed by you)
    • Unit tests added, as stated above.
    • Verified error catching using a real logdir with malformed histogram tensors.
  • Performance benchmarks:
    • I ran the uploader 8 times, using the stock histograms_demo logdir.
    • 4 times with and 4 times without tensor validation, in interleaved order.
    • Total time it takes to finish uploading the logdir:
      • With validation: 80.3±0.03 s (mean±SD)
      • Without validation: 80.2±0.004 s
      • Absolute diff: 0.033 s
      • Relative diff: 0.04%
      • Independent samples t-test: t = 1.88, p = 0.108

@caisq caisq requested a review from ericdnielsen May 12, 2020 20:18
@caisq caisq merged commit 7bab765 into tensorflow:master May 13, 2020
caisq added a commit to caisq/tensorboard that referenced this pull request May 19, 2020
* Motivation for features / changes
  * Guard against malformed tensor data points in the uploader: fail during
    upload time instead of serving time.
* Technical description of changes
  * In `_TensorBatchedRequestSender`, try to parse a `TensorProto` before sending it
    to tensorboard.dev server.
  * Add unit tests for the catching of malformed tensors.
  * Some existing unit tests are modified. They previously used malformed `TensorProto` values.
* Screenshots of UI changes
  * ![image](https://user-images.githubusercontent.com/16824702/81740043-51eaad80-946a-11ea-9d35-c8e4d7f19836.png)
* Detailed steps to verify changes work correctly (as executed by you)
  * Unit tests added, as stated above.
  * Verified error catching using a real logdir with malformed histogram tensors.
* Performance benchmarks:
  * I ran the uploader 8 times, using the stock histograms_demo logdir.
  * 4 times with and 4 times without tensor validation, in interleaved order.
  * Total time it takes to finish uploading the logdir:
    * With validation: 80.3±0.03 s (mean±SD)
    * Without validation: 80.2±0.004 s
    * Absolute diff: 0.033 s
    * Relative diff: 0.04%
    * Independent samples t-test: t = 1.88, p = 0.108
caisq added a commit that referenced this pull request May 27, 2020
* Motivation for features / changes
  * Guard against malformed tensor data points in the uploader: fail during
    upload time instead of serving time.
* Technical description of changes
  * In `_TensorBatchedRequestSender`, try to parse a `TensorProto` before sending it
    to tensorboard.dev server.
  * Add unit tests for the catching of malformed tensors.
  * Some existing unit tests are modified. They previously used malformed `TensorProto` values.
* Screenshots of UI changes
  * ![image](https://user-images.githubusercontent.com/16824702/81740043-51eaad80-946a-11ea-9d35-c8e4d7f19836.png)
* Detailed steps to verify changes work correctly (as executed by you)
  * Unit tests added, as stated above.
  * Verified error catching using a real logdir with malformed histogram tensors.
* Performance benchmarks:
  * I ran the uploader 8 times, using the stock histograms_demo logdir.
  * 4 times with and 4 times without tensor validation, in interleaved order.
  * Total time it takes to finish uploading the logdir:
    * With validation: 80.3±0.03 s (mean±SD)
    * Without validation: 80.2±0.004 s
    * Absolute diff: 0.033 s
    * Relative diff: 0.04%
    * Independent samples t-test: t = 1.88, p = 0.108
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants