Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

โ€œInvest in yourself โ€” your confidence is always worth it.โ€

Explore Cosmetic Hospitals

Start your journey today โ€” compare options in one place.

Step-by-Step: Install & Run MLflow on Windows

Hereโ€™s a step-by-step guide to install and run MLflow on Windows, covering setup, UI launch, and test tracking. This works on Windows 10/11 with Python โ‰ฅ 3.8.


โœ… Step-by-Step: Install & Run MLflow on Windows


๐Ÿงฐ Step 1: Install Python (if not already installed)

MLflow works best with Python 3.8โ€“3.11.


๐Ÿ’ก Step 2 (Recommended): Create a Virtual Environment

Open Command Prompt or PowerShell and run:

python -m venv mlflow-env
.mlflow-envScriptsactivate
Code language: CSS (css)

This isolates dependencies for MLflow.


๐Ÿ“ฆ Step 3: Upgrade pip

Still inside the virtual environment:

python -m pip install --upgrade pip

๐Ÿš€ Step 4: Install MLflow

Run:

pip install mlflow

Verify it installed:

mlflow --version

You should see something like:

mlflow, version 2.21.3
Code language: CSS (css)

๐ŸŒ Step 5: Launch the MLflow Tracking UI

Run:

mlflow ui
or
start mlflow ui

This will start a local server at:

http://127.0.0.1:5000
Code language: JavaScript (javascript)

Visit this URL in your browser to access the MLflow UI.


๐Ÿงช Step 6: Run a Test MLflow Tracking Script

Save the following as test_mlflow.py:

import mlflow
import mlflow.sklearn
from sklearn.ensemble import RandomForestRegressor
from sklearn.datasets import load_diabetes
from sklearn.model_selection import train_test_split

# ๐Ÿ”ง Set tracking URI to the running server
mlflow.set_tracking_uri("http://127.0.0.1:5000")

# Load dataset
data = load_diabetes()
X_train, X_test, y_train, y_test = train_test_split(data.data, data.target)

# Enable autologging
mlflow.sklearn.autolog()

# Start tracking
with mlflow.start_run():
    model = RandomForestRegressor()
    model.fit(X_train, y_train)
    score = model.score(X_test, y_test)
    print("Model score:", score)
Code language: PHP (php)

Run the script:

This opens a new command prompt window for the UI, leaving your current terminal free.

Then in the same terminal:

python mlflow_test.py

Now go back to your MLflow UI (http://127.0.0.1:5000) and you will see the run logged.

โœ… What Just Happened:

  • โœ… Your ML model trained (RandomForestRegressor)
  • โœ… The modelโ€™s score was printed: 0.3752
  • โœ… The run was logged to MLflow’s tracking server at http://127.0.0.1:5000
  • โœ… A run name like learned-hound-363 was auto-generated
  • โœ… The script output gave you two links:

๐Ÿ“ Step 7: Where is the data saved?

MLflow creates a folder named:

mlruns/

This contains all experiment logs and metrics.


๐Ÿงผ Optional Cleanup

To stop the MLflow UI:

  • Press Ctrl + C in the terminal

To deactivate the virtual environment:

deactivate

๐Ÿ› ๏ธ Troubleshooting Tips

IssueSolution
mlflow: command not foundMake sure you’re in the virtual environment. Activate with .mlflow-envScriptsactivate
Port 5000 busyRun mlflow ui --port 5001
UI not openingUse full URL http://127.0.0.1:5000 in your browser
Python 3.13 issuesDowngrade to Python 3.10 or 3.11 for stability

One Code

import mlflow
import mlflow.sklearn
from sklearn.ensemble import RandomForestRegressor
from sklearn.datasets import load_diabetes
from sklearn.model_selection import train_test_split

# ๐Ÿ”ง Set tracking URI to the running server
mlflow.set_tracking_uri("http://127.0.0.1:5000")
mlflow.set_experiment("MyImprovedExperiment")

# Load dataset
data = load_diabetes()
X_train, X_test, y_train, y_test = train_test_split(data.data, data.target)

# Enable autologging
mlflow.sklearn.autolog()

# Start tracking
with mlflow.start_run():
    model = RandomForestRegressor()
    model.fit(X_train, y_train)
    score = model.score(X_test, y_test)

    print("Model score:", score)

    # Optional: log manually with input example
    input_example = X_train[0:1]
    mlflow.sklearn.log_model(
        sk_model=model,
        artifact_path="model",
        input_example=input_example,
    )

mlflow.log_param("learning_rate", 0.1)
mlflow.log_metric("accuracy", 0.87)
mlflow.sklearn.log_model(model, "my_model")
Code language: PHP (php)

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services โ€” all in one place.

Explore Hospitals
Iโ€™m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at <a href="https://www.cotocus.com/">Cotocus</a>. I share tech blog at <a href="https://www.devopsschool.com/">DevOps School</a>, travel stories at <a href="https://www.holidaylandmark.com/">Holiday Landmark</a>, stock market tips at <a href="https://www.stocksmantra.in/">Stocks Mantra</a>, health and fitness guidance at <a href="https://www.mymedicplus.com/">My Medic Plus</a>, product reviews at <a href="https://www.truereviewnow.com/">TrueReviewNow</a> , and SEO strategies at <a href="https://www.wizbrand.com/">Wizbrand.</a> Do you want to learn <a href="https://www.quantumuting.com/">Quantum Computing</a>? <strong>Please find my social handles as below;</strong> <a href="https://www.rajeshkumar.xyz/">Rajesh Kumar Personal Website</a> <a href="https://www.youtube.com/TheDevOpsSchool">Rajesh Kumar at YOUTUBE</a> <a href="https://www.instagram.com/rajeshkumarin">Rajesh Kumar at INSTAGRAM</a> <a href="https://x.com/RajeshKumarIn">Rajesh Kumar at X</a> <a href="https://www.facebook.com/RajeshKumarLog">Rajesh Kumar at FACEBOOK</a> <a href="https://www.linkedin.com/in/rajeshkumarin/">Rajesh Kumar at LINKEDIN</a> <a href="https://www.wizbrand.com/rajeshkumar">Rajesh Kumar at WIZBRAND</a> <a href="https://www.rajeshkumar.xyz/dailylogs">Rajesh Kumar DailyLogs</a>

Related Posts

Top 10 No-Code Platforms Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, no-code platforms have become essential for businesses and individuals looking to build powerful applications, websites, and automations without the need for programming knowledge. These…

Read More

Top 10 AI Training Data Platforms Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, AI training data platforms have become the backbone of successful machine learning (ML) and artificial intelligence (AI) projects. These platforms streamline the process of…

Read More

Top 10 AI Poster & Flyer Design Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, AI-powered poster and flyer design tools have revolutionized the way businesses, marketers, educators, and creators produce visually stunning promotional materials. These tools leverage artificial…

Read More

Top 10 Collaboration Platforms Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, collaboration platforms are more essential than ever. As remote and hybrid work environments continue to thrive, having the right collaboration tool can be the…

Read More

The 5 Most Popular Email APIs Among Developers In 2026

In the modern world, where everything is going digital, email is among the most important means of communication both in personal and business life. As a developer,…

Read More

Top 10 Construction Management Software Tools in 2026: Features, Pros, Cons & Comparison

Introduction Construction Management Software (CMS) has become indispensable in 2026 for efficiently handling various aspects of construction projects, ranging from budgeting, scheduling, resource allocation, project tracking, to…

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
0
Would love your thoughts, please comment.x
()
x