Commit Graph

3 Commits

Author SHA1 Message Date
Kirin Patel 2eac092800 Improve visualization server docker image (#2003)
* Updated Dockerfile.visualization to take advantage of caching and switched base image

* Removed tensorflow from requirements.txt and added new package to third_party_licenses.csv
2019-08-30 12:48:23 -07:00
Kirin Patel d32519d829 Fixed directory provided to COPY command (#1783) 2019-08-09 09:43:25 -07:00
Kirin Patel 65233ffa3b Add code for python visualization service (#1651)
* Setup initial server with roc_curve visualization

* Created Dockerfile.visualization

* Fixed import issue

* Changed implementation of generate_html_from_notebook to allow template type to be specified

* Added tfdv.py

* Added unit tests for exporter.py

* Deleted __init__.py

* visualizations/ -> visualization/

* Added requirements.txt and updated Dockerfile.visualization to use it

* Updated .travis.yml to run python visualization unit tests

* Fixed travis file path issue

* Continued testing to fix travis test issues

* Removed jupyter from pip3 install

Previously included to ensure python3 kernel was accessible to jupyter_client.

* Updated requirements.txt to included ipykernel

* Removed maxDiff limit for all python tests

* Sorted keys within args dictionary to ensure tests do not fail due to dictionary order

* Created requirements-test.txt

* Added input_path argument support for python service

Also adds check for missing input_path argument and returns 400 error if argument is missing.

* Updated Copyright in Dockerfile.visualization

* Updated snapshot to include all tests

* Added types, additional comments, and TemplateType enum

Also made additional style changes

* Formatted template files

* Addressed most feedback made by @kevinbache

* Revert "Formatted template files"

This reverts commit a7afd7b8af. This was done due to issues faced by the templating engine.

* Fixed comment placement and switched os -> Path

* Changed way exporter is implemented to use importlib

* Reverted to str.format due to python comparability issue

Python 3.6 introduced support for f-stringsl, this results in the tests failing when run in a python 3.5 environment

* Added unit tests for tornado web server

* Added license script for open source compliance

* Added line between file comment and license to match exporter.py

* Updated server structure

* Created Exporter class
* Introduced ability to specify visualization timeout (default is 100 seconds)
* Added more comments
* Broke up post function in VisualizationHandler to call multiple function rather than handling all logic within post function
* Updated imports
* Updated tests

* Addressed additional feedback from @kevinbache

* Fixed snapshot for test_exporter

* Comments -> Docstring Comments and other small fixes

* Fixed missing and incorrect typings
* shutdown_kernel is now private method of Exporter class

* Added missing and updated docstring comments in server.py

* Resolved latency issue with visualization server

Issue stemmed from a recreation of an exporter object per request, this was resolved by creating a global exporter.
2019-08-01 11:30:15 -07:00