Giter VIP home page Giter VIP logo

experiment-tracking-with-mlflow's Introduction

Experiment Tracking with MLflow ๐Ÿ“ˆ

Interactive guide to experiment tracking with MLflow.

Open In Colab

Set up mlflow tracking server

  1. Create an Azure Container Registry if you don't have one yet:
az acr create --resource-group <YOUR_RESOURCE_GROUP> --name <YOUR_ACR_REGISTRY_NAME> --sku Basic --admin-enabled true
  1. Fill in the .env file in this project:
    • RESOURCE_GROUP: The name of your resource group (<YOUR_RESOURCE_GROUP> from step 1)
    • ACR_NAME: The name of your Azure Container Registry (<YOUR_ACR_REGISTRY_NAME> from step 1)
    • ACR_CONTAINER_NAME: The name of your container image (e.g. mlflow_image)
    • ACR_USERNAME: The username of your ACR
    • ACR_PASSWORD: The password of your ACR
    • AKS_CLUSTER_NAME: The name of your AKS cluster (free to choose)

Note: You can find your ACR credentials with: az acr credential show --name <YOUR_ACR_REGISTRY_NAME>

  1. Export the environment variables from the .env file:
set -a
source .env
set +a
  1. Build the container image:
docker build --platform linux/amd64 . -t ${ACR_NAME}.azurecr.io/${ACR_CONTAINER_NAME}:latest
  1. Push the container image to your ACR:
az login
az acr login --name $ACR_NAME
docker push ${ACR_NAME}.azurecr.io/${ACR_CONTAINER_NAME}:latest

Note: You can check if the image is pushed to your ACR with: az acr repository list --name $ACR_NAME --output table

  1. Create an AKS cluster:
az aks create --resource-group $RESOURCE_GROUP --name $AKS_CLUSTER_NAME --node-count 1 --generate-ssh-keys
  1. Get the credentials for your AKS cluster:
az aks get-credentials --resource-group $RESOURCE_GROUP --name $AKS_CLUSTER_NAME
  1. Create a Kubernetes secret for your ACR:
kubectl create secret docker-registry acr-secret --docker-server=$ACR_NAME.azurecr.io --docker-username=$ACR_USERNAME --docker-password=$ACR_PASSWORD
  1. Apply the deployment file to your AKS cluster:
kubectl apply -f mlflow-deployment.yaml
  1. Wait for the external IP to be assigned to the service. You can check the status with:
kubectl get service mlflow-service --watch

Once the EXTERNAL-IP is assigned, you can access your MLflow instance using that IP address on port 80 (i.e., http://< EXTERNAL-IP >/).

  1. Cleanup
az group delete --name $RESOURCE_GROUP

Or, if you want to keep your resource group, you can delete the AKS cluster and/or the ACR registry:

az aks delete --resource-group $RESOURCE_GROUP --name $AKS_CLUSTER_NAME --yes --no-wait
az acr delete --resource-group $RESOURCE_GROUP --name $ACR_NAME --yes --no-wait

experiment-tracking-with-mlflow's People

Contributors

dunnkers avatar ykerus avatar

Stargazers

Nick Imanzi avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.