skip to Main Content

What I want to do:
I am trying to execute mlflow ui in the SageMaker Studio Lab terminal to run a local mlflow server and be able to view it in the tab next to my SageMaker Studio Lab tab.

What I tried so far:

  1. executing mlflow ui in the SageMaker Studio Lab terminal (which returns success message and info that it is listening at http://127.0.0.1:5000) and then setting port forwarding between SageMaker Studio Lab instance and my local machine with ssh -L 5000:localhost:5000 studio-lab-user@<ip>, however that returned "Connection timed out"
  2. executing mlflow ui --host 0.0.0.0 in the SageMaker Studio Lab terminal – this didn’t help either as I am still getting connection refused in my browser.

2

Answers


  1. Hey SlimakSlimak 👋

    SageMaker Studio Lab is a free service with (frustratingly) limited options when it comes to customisability. Unfortunately, port forwarding is not possible within Studio Lab.

    You can achieve your desired outcome by signing-up for an AWS Account, and creating a SageMaker Studio Domain. Once created, you’ll need to make a VPC with internet access, and establish a connection between Studio and your new VPC. This guide provides a good overview of the process.

    A note about pricing…

    SageMaker is in the AWS Free Tier (see more here), so you can use certain functionality for 2 months without incurring any cost.

    You’re eligible for 250 hours per month of ml.t3.medium-powered notebooks in SageMaker Studio for free.

    Alternative Options

    • DagsHub is a ML-optimised version of GitHub/GitLab, offering a free tier with fully-managed MLflow included. I have used this myself and rate them rather highly.
    • Hosting MLflow on AWS Fargate (guide here). You should note, however, that Fargate is not in the AWS free tier, and you may wish to follow the guide but swap out Fargate for an EC2 instance (e.g. t3.micro) that’s included free for 12 months on the Free Tier.

    Good luck!

    Login or Signup to reply.
  2. Direct port forwarding is not possible with SageMaker Studio Lab, but you can use the following solution for port forwarding in SageMaker Studio: https://github.com/aws-samples/sagemaker-ssh-helper

    This solution uses AWS Systems Manager (SSM) to register a container in SSM, and then creates a session between your machine and the Session Manager service. You can then ssh into SageMaker notebook containers via the SSM session and use the Linux shell to configure SSH port forwarding.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search