|
import streamlit as st |
|
from graphviz import Digraph |
|
|
|
|
|
SWIM_LANES = { |
|
"Data Pipelines": "๐", |
|
"Build and Train Models": "๐งช", |
|
"Deploy and Predict": "๐" |
|
} |
|
|
|
|
|
graph = Digraph() |
|
graph.attr(rankdir="LR") |
|
graph.attr(fontsize="20") |
|
graph.attr(compound="true") |
|
|
|
|
|
with graph.subgraph(name="cluster_0") as c: |
|
c.attr(color="gray") |
|
c.attr(label=SWIM_LANES["Data Pipelines"]) |
|
c.node_attr.update(style="filled", color="white") |
|
c.node("๐ Data Collection") |
|
c.node("๐งน Data Cleaning") |
|
c.node("๐ง Data Transformation") |
|
|
|
with graph.subgraph(name="cluster_1") as c: |
|
c.attr(color="gray") |
|
c.attr(label=SWIM_LANES["Build and Train Models"]) |
|
c.node_attr.update(style="filled", color="white") |
|
c.node("๐ Feature Engineering") |
|
c.node("โ๏ธ Model Selection") |
|
c.node("๐ Model Training") |
|
|
|
with graph.subgraph(name="cluster_2") as c: |
|
c.attr(color="gray") |
|
c.attr(label=SWIM_LANES["Deploy and Predict"]) |
|
c.node_attr.update(style="filled", color="white") |
|
c.node("๐ข Model Deployment") |
|
c.node("๐ก Model Serving") |
|
c.node("๐ฎ Predictions") |
|
|
|
|
|
with graph.subgraph(name="cluster_3") as c: |
|
c.attr(color="lightblue") |
|
c.attr(label="Reinforcement Learning Human Feedback") |
|
c.node_attr.update(style="filled", color="white") |
|
c.node("๐ Feedback Collection") |
|
c.node("๐ค Feedback Processing") |
|
c.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") |
|
|
|
|
|
st.graphviz_chart(graph.source) |
|
|