analytical-viz: restore Apply memory-min button
An "Apply memory-min" button was removed when the 3 latency-optimal buttons were added. Consequence: after clicking any latency-optimal button, the sidebar sliders drift from the memory-min caption and there was no way to sync them back without restarting the app or manually adjusting each slider. Restore the button, positioned below the caption and above the 3 latency-optimal buttons. Clicking it snaps cp/tp/pp/dp/cp_placement to what the caption shows and clears _pl_active_scope to "full" so the Physical Layout tab stops filtering. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -185,6 +185,18 @@ with st.sidebar.expander("Parallelism", expanded=True):
|
||||
f"{_default_suggestion.pes_used} PEs "
|
||||
f"(cp_placement={_default_suggestion.cp_placement})"
|
||||
)
|
||||
# Memory-min apply — snap sliders back to what the caption says.
|
||||
if st.button("Apply memory-min", width='stretch',
|
||||
key="_sb_apply_memmin",
|
||||
help="Set sliders to the memory-min config shown above "
|
||||
"(smallest deployment that fits)."):
|
||||
st.session_state["cp"] = _snap(_default_suggestion.cp, _CP_OPTS)
|
||||
st.session_state["tp"] = _snap(_default_suggestion.tp, _TP_OPTS)
|
||||
st.session_state["pp"] = _snap(_default_suggestion.pp, _PP_OPTS)
|
||||
st.session_state["dp"] = 1
|
||||
st.session_state["cp_placement"] = _default_suggestion.cp_placement
|
||||
st.session_state["_pl_active_scope"] = "full"
|
||||
st.rerun()
|
||||
# Three latency-optimal apply buttons — pick a scope, load the
|
||||
# latency-min Pareto config into the sidebar sliders.
|
||||
from tests.analytical_visualization.auto_explore import (
|
||||
|
||||
Reference in New Issue
Block a user