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

Unable to generate visualization: Unable to initialize visualization #2806

Closed
dagondagon666 opened this issue Jan 7, 2020 · 16 comments
Closed
Assignees

Comments

@dagondagon666
Copy link

What happened:
Trying to use the Visualization Creator inside Pipeline > Experiment.
Type: TFDV
Source: gs://ml-pipeline-playground/tfx_taxi_simple/data/data.csv

Received:

Internal error: Post http://ml-pipeline-ml-pipeline-visualizationserver:8888: EOF
Unable to initialize visualization request.
github.com/kubeflow/pipelines/backend/src/common/util.Wrap
	backend/src/common/util/error.go:246
github.com/kubeflow/pipelines/backend/src/apiserver/server.(*VisualizationServer).generateVisualizationFromRequest
	backend/src/apiserver/server/visualization_server.go:77
github.com/kubeflow/pipelines/backend/src/apiserver/server.(*VisualizationServer).CreateVisualization
	backend/src/apiserver/server/visualization_server.go:26
github.com/kubeflow/pipelines/backend/api/go_client._VisualizationService_CreateVisualization_Handler.func1
	bazel-out/k8-opt/bin/backend/api/linux_amd64_stripped/go_client_go_proto%/github.com/kubeflow/pipelines/backend/api/go_client/visualization.pb.go:228
main.apiServerInterceptor
	backend/src/apiserver/interceptor.go:30
github.com/kubeflow/pipelines/backend/api/go_client._VisualizationService_CreateVisualization_Handler
	bazel-out/k8-opt/bin/backend/api/linux_amd64_stripped/go_client_go_proto%/github.com/kubeflow/pipelines/backend/api/go_client/visualization.pb.go:230
google.golang.org/grpc.(*Server).processUnaryRPC
	external/org_golang_google_grpc/server.go:966
google.golang.org/grpc.(*Server).handleStream
	external/org_golang_google_grpc/server.go:1245
google.golang.org/grpc.(*Server).serveStreams.func1.1
	external/org_golang_google_grpc/server.go:685
runtime.goexit
	GOROOT/src/runtime/asm_amd64.s:1333

What did you expect to happen:
Generate a Visualization of the given data just as in the documentation:
https://www.kubeflow.org/docs/pipelines/sdk/python-based-visualizations/

@ajchili
Copy link
Member

ajchili commented Jan 8, 2020

Hey @keeplearnin. While developing the python-based-visualizations I ran into issues with older versions of TFDV and TFMA. Unfortunately, I did not have ample time to fully resolve the issues faced and I am unsure if they were resolved after my departure from Pipelines. From my understanding, the TFX data in the ml-pipeline-playground is not compatible with the version of TFDV and TFMA that is used to generate visualizations. If possible, can you add the logs from the ml-pipeline-visualization-service within your Kubernetes cluster?

@ajchili
Copy link
Member

ajchili commented Jan 8, 2020

/assign @ajchili

@felihong
Copy link

felihong commented Jan 13, 2020

Hey @ajchili , I'm running into similar issue while trying to visualize the outputs from a component:

  • Environment: Kubeflow 0.7 deployed in GKE
  • Type: Table
  • Source: gs://ml-pipeline-playground/tfx_taxi_simple/data/data.csv
    (here I also tried my own bucket, where the service account pipeline-runner has edit access)
  • Received (exactly the same as above):
Internal error: Post http://ml-pipeline-ml-pipeline-visualizationserver:8888: EOF 
Unable to initialize visualization request.
github.com/kubeflow/pipelines/backend/src/common/util.Wrap
\tbackend/src/common/util/error.go:246\ngithub.com/kubeflow/pipelines/backend/src/apiserver/server.

I checked the logs of Pod ml-pipeline-ml-pipeline-visualizationserver which returns multiple

server.py:error:unrecognized arguments: {}

As the augment is optional, do I have to define something here?

Thank you!

@ajchili
Copy link
Member

ajchili commented Jan 13, 2020

Hey @felihong, thanks for the additional report! I will try to duplicate your cluster and see why the issue is occurring. While it has been a bit since I have worked on this, I do not believe that you have to provide arguments for the table visualization. I will confirm this and see where the issue is arising.

As an FYI I just started my final semester at school so I may run into delays but I will update this ticket as frequently as I can, thanks!

@edacostacambioupgrade
Copy link

edacostacambioupgrade commented Jan 15, 2020

@ajchili fyi, a fresh GCP kf cluster gets this error too.
(kind of fresh, at commit ee207f2)

@enriquedacostacambio
Copy link

enriquedacostacambio commented Jan 15, 2020

I think the problem is in the way the arguments are sent to the visualization server.
i think

builds the body using each parameter as a form post field equivalent to this:

curl 'http://localhost:8888/' -H 'content-type: application/x-www-form-urlencoded' -H 'accept: */*' --data-binary 'arguments={}&source=gs://mybucket/data.csv&type=tfdv'

while server.py expects a single form field called "arguments" with the parameters expressed as "command line" arguments, equivalent to this:

curl 'http://localhost:8888/' -H 'content-type: application/x-www-form-urlencoded' -H 'accept: */*' --data-binary 'arguments=--arguments {} --source gs://mybucket/data.csv --type tfdv'

i created a container with he visualizer image (gcr.io/ml-pipeline/visualization-server:0.1.27) and i was able to reproduce for failure with the first curl command.

my command

root@3458739067ce:/src# curl 'http://localhost:8888/' -H 'content-type: application/x-www-form-urlencoded' -H 'accept: */*' --data-binary 'arguments={}&source=gs://mybucket/data.csv&type=tfdv'
curl: (52) Empty reply from server

server output:

root@3458739067ce:/src# python3 server.py 
### later... 
usage: server.py [-h] [--type TYPE] [--source SOURCE] [--arguments ARGUMENTS]
server.py: error: unrecognized arguments: {}
root@3458739067ce:/src#

(the process exists due to a bad request, i think that's another issue)

@enriquedacostacambio
Copy link

enriquedacostacambio commented Jan 15, 2020

@ajchili i just retested those commands with gcr.io/ml-pipeline/visualization-server:0.1.31 and gcr.io/ml-pipeline/visualization-server:0.1.40 and both work when using the standard "forms fields" format of the command instead of the "command line" format that worked for 0.1.27.

At least in my case the error was a result of using pipelines 0.1.31 with visualization-server 0.1.27.

@keeplearnin do you have a similar setup?

this is the pr that changed how the parameters are sent: #1951

@enriquedacostacambio
Copy link

enriquedacostacambio commented Jan 15, 2020

@ajchili
Copy link
Member

ajchili commented Jan 16, 2020

Hey @enriquedacostacambio, thanks for taking a deep dive into this issue and discovering the cause! I do not know if I have the bandwidth at the moment to continue the work that you have started. If possible, can you submit a PR with a fix for the manifests file? If not, I can get around to it on the weekend.

@felihong
Copy link

Hi @edacostacambioupgrade , I changed the visualization-server version to 0.1.31 and it works fine, thanks for debugging! 😎

@enriquedacostacambio
Copy link

Sounds good. I created kubeflow/manifests#709 targeting v0.7-branch
Thanks! Have a great semester!

@dagondagon666
Copy link
Author

@enriquedacostacambio Changing visualization-server version 0.1.31 works for me as well! Thanks a lot!

@ajchili
Copy link
Member

ajchili commented Jan 17, 2020

@edacostacambioupgrade thanks! I LGTM'd it and assigned @IronPan who oversaw the project during development, he should be able to help get it approved and tested.

@ajchili
Copy link
Member

ajchili commented Jan 30, 2020

Looks like this should be resolved by kubeflow/manifests#802. I will test in my own cluster before closing this issue.

@Bobgy
Copy link
Contributor

Bobgy commented Feb 26, 2020

/close
Looks like the issue is fixed

@k8s-ci-robot
Copy link
Contributor

@Bobgy: Closing this issue.

In response to this:

/close
Looks like the issue is fixed

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

magdalenakuhn17 pushed a commit to magdalenakuhn17/pipelines that referenced this issue Oct 22, 2023
…ow#2806)

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.0.0-20200622213623-75b288015ac9 to 0.1.0.
- [Release notes](https://github.com/golang/crypto/releases)
- [Commits](https://github.com/golang/crypto/commits/v0.1.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants