Update my_pages/developer_decisions.py
Browse files
my_pages/developer_decisions.py
CHANGED
|
@@ -1,35 +1,7 @@
|
|
| 1 |
import streamlit as st
|
|
|
|
| 2 |
|
| 3 |
def render():
|
| 4 |
-
# Define pipeline stages
|
| 5 |
-
stages = [
|
| 6 |
-
{"label": "Data Collection", "icon": "📥", "questions": [
|
| 7 |
-
"Where will you source the data from?",
|
| 8 |
-
"How will you ensure data quality?",
|
| 9 |
-
"Will you balance classes?"
|
| 10 |
-
]},
|
| 11 |
-
{"label": "Preprocessing", "icon": "🛠️", "questions": [
|
| 12 |
-
"What features will you select?",
|
| 13 |
-
"Will you impute missing values or remove them?",
|
| 14 |
-
"How will you handle outliers?"
|
| 15 |
-
]},
|
| 16 |
-
{"label": "Model Selection", "icon": "🤖", "questions": [
|
| 17 |
-
"Which algorithms will you consider?",
|
| 18 |
-
"Will you use pre-trained models?",
|
| 19 |
-
"How will you handle hyperparameters?"
|
| 20 |
-
]},
|
| 21 |
-
{"label": "Training", "icon": "🏋️", "questions": [
|
| 22 |
-
"What loss function will you use?",
|
| 23 |
-
"How will you split train/validation?",
|
| 24 |
-
"Will you use early stopping?"
|
| 25 |
-
]},
|
| 26 |
-
{"label": "Evaluation", "icon": "📊", "questions": [
|
| 27 |
-
"What metrics will you use?",
|
| 28 |
-
"Will you test on unseen data?",
|
| 29 |
-
"Will you consider fairness metrics?"
|
| 30 |
-
]}
|
| 31 |
-
]
|
| 32 |
-
|
| 33 |
# Initialize session state
|
| 34 |
if "active_stage" not in st.session_state:
|
| 35 |
st.session_state.active_stage = None
|
|
@@ -37,8 +9,8 @@ def render():
|
|
| 37 |
st.markdown("<h2 style='text-align: center;'>Developer Decisions Pipeline</h2>", unsafe_allow_html=True)
|
| 38 |
|
| 39 |
# Display pipeline horizontally
|
| 40 |
-
cols = st.columns(len(
|
| 41 |
-
for idx, stage in enumerate(
|
| 42 |
with cols[idx]:
|
| 43 |
if st.button(f"{stage['icon']}\n{stage['label']}", key=f"btn_{idx}"):
|
| 44 |
st.session_state.active_stage = idx
|
|
@@ -47,7 +19,7 @@ def render():
|
|
| 47 |
|
| 48 |
# Display sub-questions for the active stage
|
| 49 |
if st.session_state.active_stage is not None:
|
| 50 |
-
stage =
|
| 51 |
st.markdown(f"### {stage['icon']} {stage['label']}")
|
| 52 |
for q in stage["questions"]:
|
| 53 |
st.write(f"- {q}")
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
+
from utils import development_stages
|
| 3 |
|
| 4 |
def render():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
# Initialize session state
|
| 6 |
if "active_stage" not in st.session_state:
|
| 7 |
st.session_state.active_stage = None
|
|
|
|
| 9 |
st.markdown("<h2 style='text-align: center;'>Developer Decisions Pipeline</h2>", unsafe_allow_html=True)
|
| 10 |
|
| 11 |
# Display pipeline horizontally
|
| 12 |
+
cols = st.columns(len(development_stages))
|
| 13 |
+
for idx, stage in enumerate(development_stages):
|
| 14 |
with cols[idx]:
|
| 15 |
if st.button(f"{stage['icon']}\n{stage['label']}", key=f"btn_{idx}"):
|
| 16 |
st.session_state.active_stage = idx
|
|
|
|
| 19 |
|
| 20 |
# Display sub-questions for the active stage
|
| 21 |
if st.session_state.active_stage is not None:
|
| 22 |
+
stage = development_stages[st.session_state.active_stage]
|
| 23 |
st.markdown(f"### {stage['icon']} {stage['label']}")
|
| 24 |
for q in stage["questions"]:
|
| 25 |
st.write(f"- {q}")
|