Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run the mlflow web-based user interface from Amazon SageMaker?

I want to use the mlflow web-based user interface from a notebook on Amazon SageMaker. But the given address http://127.0.0.1:5000 doesn't seeem to work.

I have installed mlflow on a SageMaker notebook.

This code runs nicely:

import mlflow
mlflow.start_run()
mlflow.log_param("my", "param")
mlflow.log_metric("score", 100)
mlflow.end_run()

And then if I run

! mlflow ui

I get the expected result:

[2019-04-09 11:15:52 +0000] [17980] [INFO] Starting gunicorn 19.9.0
[2019-04-09 11:15:52 +0000] [17980] [INFO] Listening at: http://127.0.0.1:5000 (17980)
[2019-04-09 11:15:52 +0000] [17980] [INFO] Using worker: sync
[2019-04-09 11:15:52 +0000] [17983] [INFO] Booting worker with pid: 17983

However, after that when going to http://127.0.0.1:5000 in my browser, nothing loads.

My guess it that 127.0.0.1 is not the right address, but how can I know which address to use instead?

like image 614
emiliew Avatar asked Apr 09 '19 12:04

emiliew


1 Answers

Hi and thank you for using SageMaker!

Unfortunately, it appears that mlflow isn't compatible with SageMaker at this time. We do provide a feature that can support these scenarios. SageMaker includes a plugin called jupyter-server-proxy which allows other web applications to be hosted on your SageMaker Notebook Instance, such as TensorBoard.

In the case of mlflow, I was almost able to get your example working by visiting https://mynotebookinstance.notebook.us-east-1.sagemaker.aws/proxy/5000/ (notice how the port number is moved to the end), but unfortunately mlflow displays an error since it currently assumes that it is not running at the root URL path.

I've created an issue in the mlflow GitHub repo: https://github.com/mlflow/mlflow/issues/1120 Please "Star" this issue to keep up-to-date on its status.

Best, Kevin

like image 102
Kevin McCormick Avatar answered Oct 16 '22 12:10

Kevin McCormick