Update app.py
Browse files
app.py
CHANGED
@@ -13,42 +13,23 @@ graph = Digraph()
|
|
13 |
graph.attr(rankdir="LR")
|
14 |
graph.attr(fontsize="20")
|
15 |
graph.attr(compound="true")
|
|
|
16 |
|
17 |
-
#
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
c.node("๐ Model Training")
|
33 |
-
|
34 |
-
with graph.subgraph(name="cluster_2") as c:
|
35 |
-
c.attr(color="gray")
|
36 |
-
c.attr(label=SWIM_LANES["Deploy and Predict"])
|
37 |
-
c.node_attr.update(style="filled", color="white")
|
38 |
-
c.node("๐ข Model Deployment")
|
39 |
-
c.node("๐ก Model Serving")
|
40 |
-
c.node("๐ฎ Predictions")
|
41 |
-
|
42 |
-
# Add the RLHF step
|
43 |
-
with graph.subgraph(name="cluster_3") as c:
|
44 |
-
c.attr(color="lightblue")
|
45 |
-
c.attr(label="Reinforcement Learning Human Feedback")
|
46 |
-
c.node_attr.update(style="filled", color="white")
|
47 |
-
c.node("๐ Feedback Collection")
|
48 |
-
c.node("๐ค Feedback Processing")
|
49 |
-
c.node("โ๏ธ Model Updating")
|
50 |
-
|
51 |
-
# Define the edges
|
52 |
graph.edge("๐ Data Collection", "๐งน Data Cleaning")
|
53 |
graph.edge("๐งน Data Cleaning", "๐ง Data Transformation")
|
54 |
graph.edge("๐ง Data Transformation", "๐ Feature Engineering")
|
@@ -62,5 +43,31 @@ graph.edge("๐ Feedback Collection", "๐ค Feedback Processing")
|
|
62 |
graph.edge("๐ค Feedback Processing", "โ๏ธ Model Updating")
|
63 |
graph.edge("โ๏ธ Model Updating", "๐ Model Training")
|
64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
# Render the graph in Streamlit
|
66 |
-
st.graphviz_chart(graph.source)
|
|
|
13 |
graph.attr(rankdir="LR")
|
14 |
graph.attr(fontsize="20")
|
15 |
graph.attr(compound="true")
|
16 |
+
graph.attr(nodesep="0.5")
|
17 |
|
18 |
+
# Define the nodes
|
19 |
+
graph.node("๐ Data Collection")
|
20 |
+
graph.node("๐งน Data Cleaning")
|
21 |
+
graph.node("๐ง Data Transformation")
|
22 |
+
graph.node("๐ Feature Engineering")
|
23 |
+
graph.node("โ๏ธ Model Selection")
|
24 |
+
graph.node("๐ Model Training")
|
25 |
+
graph.node("๐ข Model Deployment")
|
26 |
+
graph.node("๐ก Model Serving")
|
27 |
+
graph.node("๐ฎ Predictions")
|
28 |
+
graph.node("๐ Feedback Collection")
|
29 |
+
graph.node("๐ค Feedback Processing")
|
30 |
+
graph.node("โ๏ธ Model Updating")
|
31 |
+
|
32 |
+
# Add the edges
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
graph.edge("๐ Data Collection", "๐งน Data Cleaning")
|
34 |
graph.edge("๐งน Data Cleaning", "๐ง Data Transformation")
|
35 |
graph.edge("๐ง Data Transformation", "๐ Feature Engineering")
|
|
|
43 |
graph.edge("๐ค Feedback Processing", "โ๏ธ Model Updating")
|
44 |
graph.edge("โ๏ธ Model Updating", "๐ Model Training")
|
45 |
|
46 |
+
# Add the swim lanes
|
47 |
+
with graph.subgraph(name="cluster_0") as c:
|
48 |
+
c.attr(rank="same")
|
49 |
+
c.attr(label=SWIM_LANES["Data Pipelines"])
|
50 |
+
c.edge("๐ Data Collection", "๐งน Data Cleaning", style="invis")
|
51 |
+
c.edge("๐งน Data Cleaning", "๐ง Data Transformation", style="invis")
|
52 |
+
|
53 |
+
with graph.subgraph(name="cluster_1") as c:
|
54 |
+
c.attr(rank="same")
|
55 |
+
c.attr(label=SWIM_LANES["Build and Train Models"])
|
56 |
+
c.edge("๐ Feature Engineering", "โ๏ธ Model Selection", style="invis")
|
57 |
+
c.edge("โ๏ธ Model Selection", "๐ Model Training", style="invis")
|
58 |
+
|
59 |
+
with graph.subgraph(name="cluster_2") as c:
|
60 |
+
c.attr(rank="same")
|
61 |
+
c.attr(label=SWIM_LANES["Deploy and Predict"])
|
62 |
+
c.edge("๐ข Model Deployment", "๐ก Model Serving", style="invis")
|
63 |
+
c.edge("๐ก Model Serving", "๐ฎ Predictions", style="invis")
|
64 |
+
|
65 |
+
with graph.subgraph(name="cluster_3") as c:
|
66 |
+
c.attr(rank="same")
|
67 |
+
c.attr(label="Reinforcement Learning Human Feedback")
|
68 |
+
c.edge("๐ฎ Predictions", "๐ Feedback Collection", style="invis")
|
69 |
+
c.edge("๐ Feedback Collection", "๐ค Feedback Processing", style="invis")
|
70 |
+
c.edge("๐ค Feedback Processing", "โ๏ธ Model Updating", style="invis")
|
71 |
+
|
72 |
# Render the graph in Streamlit
|
73 |
+
st.graphviz_chart(graph.source)
|