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

Add code for python visualization service #1651

Merged
merged 36 commits into from
Aug 1, 2019

Conversation

ajchili
Copy link
Member

@ajchili ajchili commented Jul 22, 2019

This PR adds code to create a visualization service for Kubeflow Pipelines. Currently, it lacks deployment and service yaml files, these will be added with an additional PR once necessary. Additionally, due to python 3 issues encountered with Bazel, the tests are not run automatically.


This change is Reviewable

@ajchili
Copy link
Member Author

ajchili commented Jul 22, 2019

/assign @IronPan

@ajchili
Copy link
Member Author

ajchili commented Jul 22, 2019

/assign @neuromage

@ajchili
Copy link
Member Author

ajchili commented Jul 23, 2019

/assign @kevinbache

@ajchili
Copy link
Member Author

ajchili commented Jul 23, 2019

/hold
Adding additional comments and explanations.

@ajchili
Copy link
Member Author

ajchili commented Jul 30, 2019

/retest

@ajchili
Copy link
Member Author

ajchili commented Jul 30, 2019

/test kubeflow-pipeline-sample-test

* 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
@IronPan
Copy link
Member

IronPan commented Jul 31, 2019

/lgtm

Copy link
Contributor

@kevinbache kevinbache left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/LGTM



class Exporter:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: extra whitespace

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did not add due to PEP8 complaining about additional whitespace.

backend/src/apiserver/visualization/exporter.py Outdated Show resolved Hide resolved
backend/src/apiserver/visualization/exporter.py Outdated Show resolved Hide resolved
# HTML generator and exporter object
html_exporter = HTMLExporter()
template_file = "templates/{}.tpl".format(template_type.value)
html_exporter.template_file = str(Path.cwd() / template_file)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check out __file__ rather than cwd.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would require the usage of PurePath.parent to determine the parent route of the file, is that ideal for this?

backend/src/apiserver/visualization/server.py Outdated Show resolved Hide resolved
backend/src/apiserver/visualization/server.py Outdated Show resolved Hide resolved
backend/src/apiserver/visualization/server.py Outdated Show resolved Hide resolved
backend/Dockerfile.visualization Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot removed the lgtm label Jul 31, 2019
@ajchili
Copy link
Member Author

ajchili commented Jul 31, 2019

/hold
Recent changes have resulted in unexpected latency for generated visualizations. I am investigating why this is occurring.

Issue stemmed from a recreation of an exporter object per request, this was resolved by creating a global exporter.
@ajchili
Copy link
Member Author

ajchili commented Aug 1, 2019

/hold cancel

@IronPan
Copy link
Member

IronPan commented Aug 1, 2019

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: IronPan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 65233ff into kubeflow:master Aug 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants