How to Use MLflow For Managing ML/AI Projects?

There are many machine learning libraries, and codes written in various languages, and managing a large project involving this multitude is difficult. Open-source platforms like MLflow help to streamline machine learning development, including tracking experiments, packaging code into replicable runs, and sharing and deploying models. It offers a set of lightweight APIs that can be used with any existing machine learning application or library (TensorFlow, PyTorch, etc).

MLflow components include Tracking, which is an API to log parameters, code, and results in machine learning experiments and compare them using an interactive UI. Next is Projects which consists of a code packaging format for reproducible runs using Conda and Docker, so you can share your ML code with others. And then there are Models which are used for model packaging format and tools that let you deploy the same model (from any ML library) to batch and real-time scoring on platforms such as Docker, Apache Spark, Azure ML, AWS SageMaker, etc. Lastly, it has a Model Registry which is a centralized model store, set of APIs, and UI, to collaboratively manage the full lifecycle of MLflow Models.

Getting Started

  • Download Anaconda installer for MacOS.
  • In your terminal window, run:
  • Double-click the .pkg file.
  • Follow the prompts on the installer screens.
  • If you are unsure about any setting, accept the defaults. You can change them later.
  • To make the changes take effect, close and then re-open your terminal window.
  • Test your installation. In your terminal window or Anaconda Prompt, run the below command.
    conda list

A list of installed packages appears (refer to screenshot above) if it has been installed correctly. Now you are all set to install MLflow using the below steps.

  • Download the package from Git and run the below command.
    pip install mlflow
  • Based on which DB you want to use; you must install the dependencies. For example, if SQL ML data is stored in SQL, run the below command.
    pip install mlflow-skinny sqlalchemy alembic sqlparse
  • Once you run the flow, run the below command to enable UI. After you had run the command, the UI can be accessed in the browser with the URL: http://localhost:5000 or
    mlflow ui

What Are the Advantages of Working on MLflow on Cloud?

Working on MLflow projects on cloud resources can solve many problems associated with running the application on physical desktop computers.

    • Resources like number CPUs, RAM/memory, and storage, are scalable as per requirements.
    • It provides remote access to powerful resources for running computing-resource intensive AI/ML workloads if the project requirement is such.
    • You can access your MLflow projects on the cloud from anywhere in the world from any desktop/laptop/mobile device with internet connectivity.

It is possible to store large volumes of MLflow projects/databases in the cloud.

Apps4Rent Can Help

Apps4Rent offer virtual/remote desktops on the cloud which are scalable based on your requirement for exploring MLflow and any of the integration platform(s). MLflow works only on Mac OS and Apps4Rent can provide either a Mac OS virtual machine or virtual machine, within which another instance of the virtual machine with Mac OS in it. Since the virtual/remote desktop is on the cloud, it can be accessed from any local PC/laptop, Windows, or Mac, which has internet connectivity. No configuration change is required on your local PC/laptop. Call, chat or email our virtual/remote desktop specialists, available 24/7 for assistance.

Comments are closed.

Submit Your Requirement