File size: 765 Bytes
80bb933
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import streamlit as st
import mlflow
from mlflow.tracking import MlflowClient
import pandas as pd

st.title("Model Performance & Monitoring")

client = MlflowClient()
experiments = client.search_experiments()

exp_names = [exp.name for exp in experiments]
selected_exp = st.selectbox("Select Experiment", exp_names)

exp = client.get_experiment_by_name(selected_exp)
runs = client.search_runs(exp.experiment_id)

runs_df = pd.DataFrame([
    {
        "run_id": r.info.run_id,
        "status": r.info.status,
        "accuracy": r.data.metrics.get("accuracy"),
        "rmse": r.data.metrics.get("rmse"),
    }
    for r in runs
])

st.dataframe(runs_df)

st.markdown("For full details, access the MLflow UI at http://127.0.0.1:5000")