|
import streamlit as st |
|
from graphviz import Digraph |
|
|
|
|
|
SWIM_LANES = { |
|
"Data Pipelines": "๐", |
|
"Build and Train Models": "๐งช", |
|
"Deploy and Predict": "๐" |
|
} |
|
|
|
|
|
graph = Digraph() |
|
graph.attr(rankdir="TB") |
|
graph.attr(fontsize="20") |
|
graph.attr(compound="true") |
|
graph.attr(nodesep="0.5") |
|
|
|
|
|
graph.node("๐ Data Collection") |
|
graph.node("๐งน Data Cleaning") |
|
graph.node("๐ง Data Transformation") |
|
graph.node("๐ Feature Engineering") |
|
graph.node("โ๏ธ Model Selection") |
|
graph.node("๐ Model Training") |
|
graph.node("๐ข Model Deployment") |
|
graph.node("๐ก Model Serving") |
|
graph.node("๐ฎ Predictions") |
|
graph.node("๐ Feedback Collection") |
|
graph.node("๐ค Feedback Processing") |
|
graph.node("โ๏ธ Model Updating") |
|
|
|
|
|
graph.edge("๐ Data Collection", "๐งน Data Cleaning") |
|
graph.edge("๐งน Data Cleaning", "๐ง Data Transformation") |
|
graph.edge("๐ง Data Transformation", "๐ Feature Engineering") |
|
graph.edge("๐ Feature Engineering", "โ๏ธ Model Selection") |
|
graph.edge("โ๏ธ Model Selection", "๐ Model Training") |
|
graph.edge("๐ Model Training", "๐ข Model Deployment") |
|
graph.edge("๐ข Model Deployment", "๐ก Model Serving") |
|
graph.edge("๐ก Model Serving", "๐ฎ Predictions") |
|
graph.edge("๐ฎ Predictions", "๐ Feedback Collection") |
|
graph.edge("๐ Feedback Collection", "๐ค Feedback Processing") |
|
graph.edge("๐ค Feedback Processing", "โ๏ธ Model Updating") |
|
graph.edge("โ๏ธ Model Updating", "๐ Model Training") |
|
|
|
|
|
with graph.subgraph(name="cluster_0") as c: |
|
c.attr(rank="1") |
|
c.attr(label=SWIM_LANES["Data Pipelines"]) |
|
c.edge("๐ Data Collection", "๐งน Data Cleaning", style="invis") |
|
c.edge("๐งน Data Cleaning", "๐ง Data Transformation", style="invis") |
|
|
|
with graph.subgraph(name="cluster_1") as c: |
|
c.attr(rank="2") |
|
c.attr(label=SWIM_LANES["Build and Train Models"]) |
|
c.edge("๐ Feature Engineering", "โ๏ธ Model Selection", style="invis") |
|
c.edge("โ๏ธ Model Selection", "๐ Model Training", style="invis") |
|
|
|
with graph.subgraph(name="cluster_2") as c: |
|
c.attr(rank="3") |
|
c.attr(label=SWIM_LANES["Deploy and Predict"]) |
|
c.edge("๐ข Model Deployment", "๐ก Model Serving", style="invis") |
|
c.edge("๐ก Model Serving", "๐ฎ Predictions", style="invis") |
|
|
|
with graph.subgraph(name="cluster_3") as c: |
|
c.attr(rank="4") |
|
c.attr(label="Reinforcement Learning Human Feedback") |
|
c.edge("๐ฎ Predictions", "๐ Feedback Collection", style="invis") |
|
c.edge("๐ Feedback Collection", "๐ค Feedback Processing", style="invis") |
|
c.edge("๐ค Feedback Processing", "โ๏ธ Model Updating", style="invis") |
|
|
|
|
|
|
|
st.graphviz_chart(graph.source) |