You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在Amazon SageMaker Notebook中访问MLflow Web UI?本地地址失效求助

Fixing MLflow UI Access in Amazon SageMaker Notebook

I get it, that 127.0.0.1:5000 not loading is frustrating—here's why it's happening and how to fix it quickly:

The problem is your SageMaker Notebook runs on a remote AWS instance, so 127.0.0.1 points to the instance's local loopback, not your own machine's. Your browser can't reach that private address directly. Let's go through two reliable solutions:

Option 1: Use SageMaker's Proxy (Easiest for Most Users)

SageMaker has a built-in proxy system that lets you access services running on the instance via your notebook's URL. Here's how:

  1. Start MLflow UI with the correct host binding
    In your notebook cell, run this command instead of just mlflow ui:

    !mlflow ui --host 0.0.0.0 --port 5000
    

    You'll see logs confirming it's listening on 0.0.0.0:5000 (instead of only the instance's localhost):

    [2019-04-09 11:15:52 +0000] [17980] [INFO] Listening at: http://0.0.0.0:5000 (17980)

  2. Build your access URL
    SageMaker's proxy URL follows this pattern:

    https://<your-notebook-instance-name>.notebook.<aws-region>.sagemaker.aws/proxy/5000/
    

    For example, if your instance is named ml-experiment-notebook and you're in us-west-2, the URL would be:

    https://ml-experiment-notebook.notebook.us-west-2.sagemaker.aws/proxy/5000/
    

    Paste this into your browser, and you'll see the MLflow UI load up.

Option 2: SSH Port Forwarding (For Users with SSH Access)

If you have SSH access to your SageMaker instance (using an EC2 key pair), you can forward the instance's 5000 port to your local machine:

  1. Start MLflow on the instance (default host is fine here):
    !mlflow ui --port 5000
    
  2. Run this SSH command on your local terminal (replace placeholders with your details):
    ssh -i /path/to/your-key.pem -L 5000:127.0.0.1:5000 ec2-user@<instance-public-ip>
    
    Once the SSH connection is active, you can open http://127.0.0.1:5000 in your local browser to access MLflow.

Option 1 is the go-to for most SageMaker users since it works directly through the notebook's web interface without extra setup.

内容的提问来源于stack exchange,提问作者emiliew

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.12 05:00:32